Click here to Skip to main content
15,900,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ memory question Pin
mdexch14-Jul-06 7:58
mdexch14-Jul-06 7:58 
AnswerRe: C++ memory question Pin
Joe Woodbury12-Jul-06 14:11
professionalJoe Woodbury12-Jul-06 14:11 
GeneralRe: C++ memory question Pin
kanduripavan12-Jul-06 20:46
kanduripavan12-Jul-06 20:46 
GeneralRe: C++ memory question Pin
Joe Woodbury13-Jul-06 0:11
professionalJoe Woodbury13-Jul-06 0:11 
Questionsscanf will only put value in first variable Pin
Evilpixie12-Jul-06 11:32
Evilpixie12-Jul-06 11:32 
AnswerRe: sscanf will only put value in first variable [modified] Pin
earl12-Jul-06 12:46
earl12-Jul-06 12:46 
GeneralRe: sscanf will only put value in first variable Pin
Evilpixie12-Jul-06 13:11
Evilpixie12-Jul-06 13:11 
GeneralRe: sscanf will only put value in first variable Pin
earl12-Jul-06 13:14
earl12-Jul-06 13:14 
GeneralRe: sscanf will only put value in first variable Pin
Evilpixie12-Jul-06 13:17
Evilpixie12-Jul-06 13:17 
AnswerRe: sscanf will only put value in first variable Pin
Stephen Hewitt12-Jul-06 14:08
Stephen Hewitt12-Jul-06 14:08 
QuestionColor management in CDC Pin
TchouTchou Project12-Jul-06 11:23
TchouTchou Project12-Jul-06 11:23 
AnswerRe: Color management in CDC Pin
A_Fa12-Jul-06 20:09
A_Fa12-Jul-06 20:09 
QuestionHow can I convert to TIFF file format? [modified] Pin
Cris12-Jul-06 9:47
Cris12-Jul-06 9:47 
AnswerRe: How can I convert to TIFF file format? Pin
Christian Graus12-Jul-06 9:55
protectorChristian Graus12-Jul-06 9:55 
AnswerRe: How can I convert to TIFF file format? Pin
Joe Woodbury12-Jul-06 10:28
professionalJoe Woodbury12-Jul-06 10:28 
GeneralRe: How can I convert to TIFF file format? Pin
Cris13-Jul-06 2:00
Cris13-Jul-06 2:00 
GeneralRe: How can I convert to TIFF file format? Pin
Joe Woodbury13-Jul-06 8:19
professionalJoe Woodbury13-Jul-06 8:19 
AnswerRe: How can I convert to TIFF file format? Pin
earl12-Jul-06 12:42
earl12-Jul-06 12:42 
GeneralRe: How can I convert to TIFF file format? Pin
Cris13-Jul-06 1:45
Cris13-Jul-06 1:45 
GeneralRe: How can I convert to TIFF file format? Pin
earl13-Jul-06 5:12
earl13-Jul-06 5:12 
QuestionPlease,help me with jar-files in java Pin
beganovic_swe12-Jul-06 9:37
beganovic_swe12-Jul-06 9:37 
AnswerRe: Please,help me with jar-files in java Pin
Christian Graus12-Jul-06 9:43
protectorChristian Graus12-Jul-06 9:43 
GeneralRe: Please,help me with jar-files in java Pin
led mike12-Jul-06 9:49
led mike12-Jul-06 9:49 
GeneralRe: Please,help me with jar-files in java Pin
beganovic_swe12-Jul-06 22:33
beganovic_swe12-Jul-06 22:33 
QuestionCrash in MFC extension DLL [modified] Pin
act_x12-Jul-06 8:23
act_x12-Jul-06 8:23 
i am using some JNI code and talking to a MFC extension DLL

I am using Visual Studio 6 . I get a crash when i try to create a window in one of the exposed functions . The crash seems to be in afxwin1.inl line 19 after the call to CreateEx

CHiddenWindow hiddenWnd ; <br />
<br />
extern "C" int APIENTRY<br />
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)<br />
{<br />
	// Remove this if you use lpReserved<br />
	UNREFERENCED_PARAMETER(lpReserved);<br />
<br />
	if (dwReason == DLL_PROCESS_ATTACH)<br />
	{<br />
		TRACE0("DLLWRAPPER.DLL Initializing!\n");<br />
		<br />
		// Extension DLL one-time initialization<br />
		if (!AfxInitExtensionModule(DllWrapperDLL, hInstance))<br />
			return 0;<br />
<br />
		// Insert this DLL into the resource chain<br />
		// NOTE: If this Extension DLL is being implicitly linked to by<br />
		//  an MFC Regular DLL (such as an ActiveX Control)<br />
		//  instead of an MFC application, then you will want to<br />
		//  remove this line from DllMain and put it in a separate<br />
		//  function exported from this Extension DLL.  The Regular DLL<br />
		//  that uses this Extension DLL should then explicitly call that<br />
		//  function to initialize this Extension DLL.  Otherwise,<br />
		//  the CDynLinkLibrary object will not be attached to the<br />
		//  Regular DLL's resource chain, and serious problems will<br />
		//  result.<br />
		new CDynLinkLibrary(DllWrapperDLL);<br />
		<br />
	}<br />
	else if (dwReason == DLL_PROCESS_DETACH)<br />
	{<br />
		TRACE0("DLLWRAPPER.DLL Terminating!\n");<br />
		// Terminate the library before destructors are called<br />
		AfxTermExtensionModule(DllWrapperDLL);<br />
	}<br />
<br />
<br />
	<br />
	<br />
	<br />
	return 1;   // ok<br />
}<br />
<br />
JNIEXPORT jint JNICALL Java_Blah1<br />
  (JNIEnv *pEnv, jclass)<br />
{<br />
..<br />
hiddenWnd.CreateEx(0 ,::AfxRegisterWndClass( NULL)  , NULL , WS_OVERLAPPED , CRect(10,10,10,10),NULL , 0);<br />
..<br />
<br />
} 

Any ideas on this ?


Engineering is the effort !


-- modified at 14:23 Wednesday 12th July, 2006

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.