473,385 Members | 1,764 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,385 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 4340
"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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.