Click here to Skip to main content

ATL / WTL / STL

 
Questioncopying AAComBSTR to BYTE PinmemberV K 220-Nov-12 21:56 
AnswerRe: copying AAComBSTR to BYTE PinmvpRichard MacCutchan20-Nov-12 22:28 
AnswerRe: copying AAComBSTR to BYTE Pinmemberhacker240union23-Nov-12 0:27 
QuestionC++ Delegate/Events PinmemberEdward G Dana14-Nov-12 18:15 
AnswerRe: C++ Delegate/Events PinmvpRichard MacCutchan14-Nov-12 21:57 
GeneralRe: C++ Delegate/Events PinmemberEdward G Dana15-Nov-12 14:35 
GeneralRe: C++ Delegate/Events PinmvpRichard MacCutchan16-Nov-12 0:45 
AnswerRe: C++ Delegate/Events Pinmemberpasztorpisti20-Nov-12 3:53 
GeneralRe: C++ Delegate/Events PinmemberEDanaII20-Nov-12 17:23 
QuestionReturn FALSE in InitInstance causes crash in 64Bits Pinmemberkhaliloenit8-Nov-12 2:01 
AnswerRe: Return FALSE in InitInstance causes crash in 64Bits PinmemberAlbert Holguin10-Dec-12 5:30 
QuestionHow to get used dll's path information programetically? Pinmemberlitu kumar6-Nov-12 20:38 
AnswerRe: How to get used dll's path information programetically? PinmvpRichard MacCutchan6-Nov-12 22:40 
GeneralRe: How to get used dll's path information programetically? [modified] Pinmemberlitu kumar7-Nov-12 0: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? PinmvpRichard MacCutchan7-Nov-12 5:54 
GeneralRe: How to get used dll's path information programetically? Pinmemberlitu kumar7-Nov-12 18:11 
GeneralRe: How to get used dll's path information programetically? PinmvpRichard MacCutchan7-Nov-12 22:34 
GeneralRe: How to get used dll's path information programetically? Pinmemberlitu kumar7-Nov-12 23:35 
GeneralRe: How to get used dll's path information programetically? PinmvpRichard MacCutchan8-Nov-12 1:16 
GeneralRe: How to get used dll's path information programetically? [modified] Pinmemberlitu kumar8-Nov-12 3:58 
GeneralRe: How to get used dll's path information programetically? PinmvpRichard MacCutchan8-Nov-12 5:03 
GeneralRe: How to get used dll's path information programetically? Pinmemberlitu kumar15-Nov-12 20:53 
GeneralRe: How to get used dll's path information programetically? PinmvpRichard MacCutchan16-Nov-12 0:50 
AnswerRe: How to get used dll's path information programetically? Pinmemberhacker240union23-Nov-12 0:41 
Questiondetect close event with CAsyncSocket [modified] Pinmemberbkelly135-Nov-12 11:32 
QuestionIntermediate GUI Techniques Pinmemberbkelly132-Nov-12 4:21 
AnswerRe: Intermediate GUI Techniques PinmvpRichard MacCutchan2-Nov-12 7:20 
Questionproblem with sprintf_s() on win 7 PinmemberMember 93537761-Nov-12 22:34 
AnswerRe: problem with sprintf_s() on win 7 PinmvpRichard MacCutchan1-Nov-12 23:50 
GeneralRe: problem with sprintf_s() on win 7 Pinmemberbkelly132-Nov-12 4:16 
GeneralRe: problem with sprintf_s() on win 7 PinmvpRichard MacCutchan2-Nov-12 7:15 
GeneralRe: problem with sprintf_s() on win 7 PinmemberMember 93537764-Nov-12 17:34 
GeneralRe: problem with sprintf_s() on win 7 PinmvpRichard MacCutchan4-Nov-12 22:26 
AnswerRe: problem with sprintf_s() on win 7 PinmemberH.Brydon26-Nov-12 20:36 
Questionwsageterror() Pinmemberbkelly131-Nov-12 16:28 
AnswerRe: wsageterror() PinmvpRichard MacCutchan1-Nov-12 23:48 
QuestionSTL map issue in VS2010 PinmemberSubhash Madhukar30-Oct-12 4:47 
AnswerRe: STL map issue in VS2010 PinmvpRichard MacCutchan30-Oct-12 7:04 
Questionhow do i copy a CImage DIB to clipboard PinmemberMember 951640015-Oct-12 12:15 
AnswerRe: how do i copy a CImage DIB to clipboard PinmemberAndrew Cherednik15-Oct-12 12:41 
QuestionWhy does this fail - CFile / SeekToEnd? [modified] Pinmembercharlieg10-Oct-12 7:43 
AnswerRe: Why does this fail - CFile / SeekToEnd? Pinmembercharlieg10-Oct-12 10:31 
AnswerRe: Why does this fail - CFile / SeekToEnd? PinmemberAndrew Cherednik10-Oct-12 12:23 
GeneralRe: Why does this fail - CFile / SeekToEnd? Pinmembercharlieg11-Oct-12 3:20 
AnswerRe: Why does this fail - CFile / SeekToEnd? PinmvpRichard MacCutchan10-Oct-12 22:45 
GeneralRe: Why does this fail - CFile / SeekToEnd? Pinmembercharlieg11-Oct-12 3:30 
GeneralRe: Why does this fail - CFile / SeekToEnd? Pinmembercharlieg11-Oct-12 5:53 
GeneralRe: Why does this fail - CFile / SeekToEnd? PinmvpRichard MacCutchan11-Oct-12 12:19 
GeneralRe: Why does this fail - CFile / SeekToEnd? Pinmembercharlieg11-Oct-12 12:34 
GeneralRe: Why does this fail - CFile / SeekToEnd? PinmvpRichard MacCutchan11-Oct-12 13:01 

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
Web04 | 2.8.150129.1 | Last Updated 10 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid