_ATLModule and GetModuleFileName

G

Guest

I need to get the DLL name in my ATL COM Server project in the .NET environment. I am not using MFC and also not using Managed C++ extensions.

In previous versions of ATL the following worked fine:
char sz[_MAX_PATH];
GetModuleFileName(_Module.m_hInst, sz, _MAX_PATH);

But _Module is now replaced by _ATLModule and this no longer works (no m_hInst).

Can anyone offer a solution? Thanks

Paul.
 
I

Igor Tandetnik

Paul said:
I need to get the DLL name in my ATL COM Server project in the .NET
environment. I am not using MFC and also not using Managed C++
extensions.

In previous versions of ATL the following worked fine:
char sz[_MAX_PATH];
GetModuleFileName(_Module.m_hInst, sz, _MAX_PATH);

But _Module is now replaced by _ATLModule and this no longer works
(no m_hInst).

_AtlBaseModule.GetModuleInstance()

--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top