Click here to Skip to main content
11,642,855 members (76,551 online)

ATL / WTL / STL

 
GeneralRe: C++ Delegate/Events Pin
Richard MacCutchan15-Nov-12 23:45
mvpRichard MacCutchan15-Nov-12 23:45 
AnswerRe: C++ Delegate/Events Pin
pasztorpisti20-Nov-12 2:53
memberpasztorpisti20-Nov-12 2:53 
GeneralRe: C++ Delegate/Events Pin
EDanaII20-Nov-12 16:23
memberEDanaII20-Nov-12 16:23 
QuestionReturn FALSE in InitInstance causes crash in 64Bits Pin
khaliloenit8-Nov-12 1:01
memberkhaliloenit8-Nov-12 1:01 
AnswerRe: Return FALSE in InitInstance causes crash in 64Bits Pin
Albert Holguin10-Dec-12 4:30
memberAlbert Holguin10-Dec-12 4:30 
QuestionHow to get used dll's path information programetically? Pin
litu kumar6-Nov-12 19:38
memberlitu kumar6-Nov-12 19:38 
AnswerRe: How to get used dll's path information programetically? Pin
Richard MacCutchan6-Nov-12 21:40
mvpRichard MacCutchan6-Nov-12 21:40 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar6-Nov-12 23:27
memberlitu kumar6-Nov-12 23:27 
Hi Richard,

You mean to initialize 'hmod' to NULL as below -


HMODULE hmod =NULL;
hmod= GetModuleHandle(TEXT("MyApp.dll"));
if(hmod!=NULL)
{
DWORD dwLen = GetModuleFileName(hmod, szPath, MAX_PATH);
wprintf(L"CURRENT DIRECTORY: %s\n" ,szPath);
}
====================================
If the above code stuff as per your indication,then 'GetModuleHandle' not returning NULL .
And it printing the path of EXE not of required 'MyApp.dll'

Kindly guide me if i understood the wrong thing.

modified 7-Nov-12 6:38am.

GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan7-Nov-12 4:54
mvpRichard MacCutchan7-Nov-12 4:54 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar7-Nov-12 17:11
memberlitu kumar7-Nov-12 17:11 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan7-Nov-12 21:34
mvpRichard MacCutchan7-Nov-12 21:34 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar7-Nov-12 22:35
memberlitu kumar7-Nov-12 22:35 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan8-Nov-12 0:16
mvpRichard MacCutchan8-Nov-12 0:16 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar8-Nov-12 2:58
memberlitu kumar8-Nov-12 2:58 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan8-Nov-12 4:03
mvpRichard MacCutchan8-Nov-12 4:03 
GeneralRe: How to get used dll's path information programetically? Pin
litu kumar15-Nov-12 19:53
memberlitu kumar15-Nov-12 19:53 
GeneralRe: How to get used dll's path information programetically? Pin
Richard MacCutchan15-Nov-12 23:50
mvpRichard MacCutchan15-Nov-12 23:50 
AnswerRe: How to get used dll's path information programetically? Pin
hacker240union22-Nov-12 23:41
memberhacker240union22-Nov-12 23:41 
Questiondetect close event with CAsyncSocket Pin
bkelly135-Nov-12 10:32
memberbkelly135-Nov-12 10:32 
QuestionIntermediate GUI Techniques Pin
bkelly132-Nov-12 3:21
memberbkelly132-Nov-12 3:21 
AnswerRe: Intermediate GUI Techniques Pin
Richard MacCutchan2-Nov-12 6:20
mvpRichard MacCutchan2-Nov-12 6:20 
Questionproblem with sprintf_s() on win 7 Pin
Member 93537761-Nov-12 21:34
memberMember 93537761-Nov-12 21:34 
AnswerRe: problem with sprintf_s() on win 7 Pin
Richard MacCutchan1-Nov-12 22:50
mvpRichard MacCutchan1-Nov-12 22:50 
GeneralRe: problem with sprintf_s() on win 7 Pin
bkelly132-Nov-12 3:16
memberbkelly132-Nov-12 3:16 
GeneralRe: problem with sprintf_s() on win 7 Pin
Richard MacCutchan2-Nov-12 6:15
mvpRichard MacCutchan2-Nov-12 6:15 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.150731.1 | Last Updated 10 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid