473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

_ATLModule and GetModuleFileName

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.


Nov 22 '05 #1
2 4341
"Paul" <an*******@discussions.microsoft.com> wrote in message
news:EC**********************************@microsof t.com
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
Nov 22 '05 #2
"Paul" <an*******@discussions.microsoft.com> wrote in message
news:EC**********************************@microsof t.com
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
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Yves | last post by:
Hello, Using VB6, i am trying to get the module filename from the cursor positioned on any windows, with the following code (modified from Article ID: Q112649 in MSDN LIBRARY for Visual Studio...
1
by: Paul | last post by:
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...
4
by: Aryeh Katz | last post by:
How can I determine the full name of a c# executable, like the c GetModuleFileName? Thanks. Aryeh
1
by: cashdeskmac | last post by:
I have written a short program which reads from XML and flat text files. I have deployed the apllication wwith the files included but the app can no longer find the files. In the code, I read...
12
by: ORC | last post by:
Hi, I have an application in which I need information of the path to the exe file. The application must run on both compact and full framework and on the Internet I found this code snip that...
5
by: Steve McLellan | last post by:
Hi, Probably an easy one if you know how, but I'm stumped... I've got a function in a DLL and I need to be able to find out the application path of the application that's called it. From my...
2
by: academic | last post by:
This is from something I wrote 15 years ago. Haven't use c since then Wanted to use it now so I cut and pasted into VS2005 on WinXP Now I can't seem to get the types OK GetModuleFileName...
11
by: Mike C# | last post by:
Hi all, Probably a really simple answer to this, but so far I'm having trouble locating the answer. I'm writing an unmanaged VC++ app and I need to grab the currently executing filename and...
4
by: roto23 | last post by:
I wrote a complied c# class (SpulClass). In that class I use this to get the directory it resides in.. System.IO.Directory.GetCurrentDirectory(); When I call this this class (dll) from a c#...
3
by: xoinki | last post by:
hi all, I am trying to fetch the name of the binary.. i.e, for eg, I am running sql.exe doin some operation.. in that I want to fetch the name 'sql.exe' i.e name of the running application.. how do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.