Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Displaying Symbol issue......... Pin
Rajesh R Subramanian26-Jan-09 4:15
professionalRajesh R Subramanian26-Jan-09 4:15 
GeneralRe: Displaying Symbol issue......... Pin
toxcct26-Jan-09 4:20
toxcct26-Jan-09 4:20 
JokeRe: Displaying Symbol issue......... Pin
CPallini26-Jan-09 6:48
mveCPallini26-Jan-09 6:48 
QuestionWorking with DB Pin
CodingLover25-Jan-09 18:33
CodingLover25-Jan-09 18:33 
QuestionRe: Working with DB Pin
David Crow26-Jan-09 2:56
David Crow26-Jan-09 2:56 
AnswerRe: Working with DB Pin
Jose David Pujo26-Jan-09 4:38
Jose David Pujo26-Jan-09 4:38 
QuestionAfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex25-Jan-09 17:55
Neptunex25-Jan-09 17:55 
AnswerRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Randor 25-Jan-09 18:23
professional Randor 25-Jan-09 18:23 
Some questions:

1.) Are you expecting to recieve the base address of the DLL or the process executable?
2.) Is the extension DLL initialized properly? AfxInitExtensionModule[^]
3.) Whats the assertion?

Hack alert:
Replacing the call to AfxGetInstanceHandle with the following code might prevent the assertion... but HIDE the root cause of the it. Unsure | :~

(HINSTANCE)&__ImageBase


Why it works:
AfxGetInstanceHandle[^] simply returns the base address of the DLL and __ImageBase is the intrinsic equivalent.

Here is another hacked-up way to get the instance handle:

__inline HINSTANCE MyGetInstanceHandle(LPCTSTR lpModuleName)
{
	HINSTANCE h;
	GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, lpModuleName, &h);
	return h;
}


Don't use the code I have provided to bypass the assertion, it sounds to me like MFC has not been properly initialized.

Best Wishes,
-David Delaune
AnswerRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex26-Jan-09 0:53
Neptunex26-Jan-09 0:53 
GeneralRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Randor 26-Jan-09 9:21
professional Randor 26-Jan-09 9:21 
GeneralRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex3-Mar-09 20:27
Neptunex3-Mar-09 20:27 
QuestionCommunication app. using dial-up modem times out Pin
Member 171596825-Jan-09 17:51
Member 171596825-Jan-09 17:51 
AnswerRe: Communication app. using dial-up modem times out Pin
Jonathan Davies25-Jan-09 23:51
Jonathan Davies25-Jan-09 23:51 
GeneralRe: Communication app. using dial-up modem times out Pin
Member 171596827-Jan-09 20:00
Member 171596827-Jan-09 20:00 
GeneralRe: Communication app. using dial-up modem times out Pin
Jonathan Davies27-Jan-09 21:27
Jonathan Davies27-Jan-09 21:27 
QuestionIs "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 15:16
fitatc25-Jan-09 15:16 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
«_Superman_»25-Jan-09 16:20
professional«_Superman_»25-Jan-09 16:20 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
Joshua Tully25-Jan-09 16:31
Joshua Tully25-Jan-09 16:31 
GeneralRe: Is "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 21:17
fitatc25-Jan-09 21:17 
QuestionNeed help to create GUI application form in C++ and create instalation program for it. Pin
hdavari25-Jan-09 3:11
hdavari25-Jan-09 3:11 
AnswerRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
Maximilien25-Jan-09 4:01
Maximilien25-Jan-09 4:01 
QuestionRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
David Crow26-Jan-09 3:00
David Crow26-Jan-09 3:00 
QuestionItems are not visible in a ListBox [modified] Pin
Elsie25-Jan-09 1:45
Elsie25-Jan-09 1:45 
AnswerRe: Items are not visible in a ListBox Pin
Hans Dietrich25-Jan-09 6:25
mentorHans Dietrich25-Jan-09 6:25 
GeneralRe: Items are not visible in a ListBox Pin
Elsie25-Jan-09 17:40
Elsie25-Jan-09 17:40 

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.