Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Newbie - Memory sharing in COM Pin
jayart17-Jan-07 6:43
jayart17-Jan-07 6:43 
GeneralRe: Newbie - Memory sharing in COM Pin
led mike17-Jan-07 6:57
led mike17-Jan-07 6:57 
GeneralRe: Newbie - Memory sharing in COM Pin
jayart17-Jan-07 7:11
jayart17-Jan-07 7:11 
GeneralRe: Newbie - Memory sharing in COM Pin
Mark Salsbery17-Jan-07 8:48
Mark Salsbery17-Jan-07 8:48 
GeneralRe: Newbie - Memory sharing in COM Pin
led mike18-Jan-07 4:37
led mike18-Jan-07 4:37 
QuestionProblem loading DLL Pin
Eikthrynir17-Jan-07 5:44
Eikthrynir17-Jan-07 5:44 
QuestionRe: Problem loading DLL Pin
Mark Salsbery17-Jan-07 5:51
Mark Salsbery17-Jan-07 5:51 
AnswerRe: Problem loading DLL Pin
Eikthrynir17-Jan-07 5:56
Eikthrynir17-Jan-07 5:56 
This is how my DllMain looks like:
extern "C" int APIENTRY
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	// Remove this if you use lpReserved
	UNREFERENCED_PARAMETER(lpReserved);

	if (dwReason == DLL_PROCESS_ATTACH)
	{
		TRACE0("MYDLL.DLL Initializing!\n");

		// Extension DLL one-time initialization
		if (!AfxInitExtensionModule(MyDLL, hInstance))
			return 0;

		new CDynLinkLibrary(MyDLL);
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		TRACE0("MYDLL.DLL Terminating!\n");
		// Terminate the library before destructors are called
		AfxTermExtensionModule(MyDLL);
	}
	return 1;   // ok
}


I even put these lines of code right at the begining of DllMain:

CFile log;
log.Open( "log.001", CFile::modeCreate | CFile::modeWrite, NULL );
log.Write( "@", 1 );
log.Close( );


I ran the program using the new version of mydll.dll and NO log.001 was created.
So DllMain does not get executed.
GeneralRe: Problem loading DLL Pin
Mark Salsbery17-Jan-07 6:03
Mark Salsbery17-Jan-07 6:03 
AnswerRe: Problem loading DLL Pin
Eikthrynir17-Jan-07 5:59
Eikthrynir17-Jan-07 5:59 
GeneralRe: Problem loading DLL Pin
Mark Salsbery17-Jan-07 6:04
Mark Salsbery17-Jan-07 6:04 
AnswerRe: Problem loading DLL Pin
David Crow17-Jan-07 5:51
David Crow17-Jan-07 5:51 
QuestionNetwork communication using XDR ? Pin
pc_dev17-Jan-07 4:07
pc_dev17-Jan-07 4:07 
QuestionService problem ? Pin
Sakthiu17-Jan-07 4:07
Sakthiu17-Jan-07 4:07 
QuestionRe: Service problem ? Pin
David Crow17-Jan-07 4:14
David Crow17-Jan-07 4:14 
QuestionHow to insert a triangle (delta) in header of list contrl ? Pin
pc_dev17-Jan-07 3:57
pc_dev17-Jan-07 3:57 
AnswerRe: How to insert a triangle (delta) in header of list contrl ? Pin
Mark Salsbery17-Jan-07 4:38
Mark Salsbery17-Jan-07 4:38 
GeneralRe: How to insert a triangle (delta) in header of list contrl ? Pin
led mike17-Jan-07 5:57
led mike17-Jan-07 5:57 
GeneralRe: How to insert a triangle (delta) in header of list contrl ? Pin
Mark Salsbery17-Jan-07 6:08
Mark Salsbery17-Jan-07 6:08 
GeneralRe: How to insert a triangle (delta) in header of list contrl ? Pin
led mike17-Jan-07 6:10
led mike17-Jan-07 6:10 
GeneralRe: How to insert a triangle (delta) in header of list contrl ? Pin
Mark Salsbery17-Jan-07 6:29
Mark Salsbery17-Jan-07 6:29 
AnswerRe: How to insert a triangle (delta) in header of list contrl ? Pin
Ravi Bhavnani17-Jan-07 6:09
professionalRavi Bhavnani17-Jan-07 6:09 
AnswerRe: How to insert a triangle (delta) in header of list contrl ? Pin
Michael Dunn17-Jan-07 16:04
sitebuilderMichael Dunn17-Jan-07 16:04 
QuestionHow to link a directory to a file ? Pin
kbekri17-Jan-07 3:21
kbekri17-Jan-07 3:21 
QuestionMulitline CEdit field lock up in release build - I am desparate Pin
tieng8617-Jan-07 3:19
tieng8617-Jan-07 3:19 

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.