Click here to Skip to main content
15,918,333 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalwin32api Pin
zeki yugnak17-Oct-02 2:43
zeki yugnak17-Oct-02 2:43 
GeneralRe: win32api Pin
Tomasz Sowinski17-Oct-02 2:49
Tomasz Sowinski17-Oct-02 2:49 
GeneralRe: win32api Pin
zeki yugnak17-Oct-02 2:54
zeki yugnak17-Oct-02 2:54 
GeneralRe: win32api Pin
Tomasz Sowinski17-Oct-02 3:03
Tomasz Sowinski17-Oct-02 3:03 
GeneralRe: win32api Pin
zeki yugnak17-Oct-02 3:05
zeki yugnak17-Oct-02 3:05 
GeneralRe: win32api Pin
zeki yugnak17-Oct-02 2:59
zeki yugnak17-Oct-02 2:59 
GeneralLayered Service Provider - WinSock 2 Pin
Cristi17-Oct-02 2:41
Cristi17-Oct-02 2:41 
Generalobtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:22
Debs17-Oct-02 2:22 
(Using VC++ 6)
I need to obtain the full filename of a dll that is being instantiated as a COM interface.

I am aware of the "GetModuleFileName" procedure and the relevance of the first parameter: NULL gives you the calling exe file, right? Well, I still get the same filename if I use the Instance, so I must be doing something screwy?? I've resorted to hardcoding the dll filename as a constant at the moment, which gets me off the hook temporarily, but this approach won't work indefinitely, so any help is much appreciated.

Code snippet:
CWinApp* App = AfxGetApp ();<br />
	HINSTANCE  hInstance = App->m_hInstance;<br />
	<br />
//hInstance = AfxGetInstanceHandle(); <br />
//I tried this just in case, but returns the same value as m_hInstance<br />
<br />
	TCHAR	cFileName[_MAX_PATH];<br />
	GetModuleFileName (hInstance, cFileName, _MAX_PATH);<br />



Ta!

Debbie
GeneralRe: obtaining a full path filename of a DLL Pin
Tomasz Sowinski17-Oct-02 2:25
Tomasz Sowinski17-Oct-02 2:25 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:42
Debs17-Oct-02 2:42 
GeneralRe: obtaining a full path filename of a DLL Pin
Tomasz Sowinski17-Oct-02 2:47
Tomasz Sowinski17-Oct-02 2:47 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 3:02
Debs17-Oct-02 3:02 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:53
Debs17-Oct-02 2:53 
Generalsizing ListCtrl and columns Pin
Idefix17-Oct-02 1:38
Idefix17-Oct-02 1:38 
Generalworrisome exception Pin
ns17-Oct-02 1:32
ns17-Oct-02 1:32 
GeneralRe: worrisome exception Pin
Prem Kumar17-Oct-02 1:49
Prem Kumar17-Oct-02 1:49 
GeneralRe: worrisome exception Pin
ns17-Oct-02 1:52
ns17-Oct-02 1:52 
GeneralRe: worrisome exception Pin
Tomasz Sowinski17-Oct-02 1:51
Tomasz Sowinski17-Oct-02 1:51 
GeneralPlease Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Redeemer-dk17-Oct-02 1:23
Redeemer-dk17-Oct-02 1:23 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Tomasz Sowinski17-Oct-02 1:26
Tomasz Sowinski17-Oct-02 1:26 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Anonymous17-Oct-02 2:33
Anonymous17-Oct-02 2:33 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Andreas Saurwein17-Oct-02 1:35
Andreas Saurwein17-Oct-02 1:35 
QuestionHow can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 0:46
Renjith Ramachandran17-Oct-02 0:46 
AnswerRe: How can i get the Window Handle... Pin
Tomasz Sowinski17-Oct-02 0:51
Tomasz Sowinski17-Oct-02 0:51 
GeneralRe: How can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 0:57
Renjith Ramachandran17-Oct-02 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.