??????????DLL?????
// mydll.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
DWORD WINAPI MyThreadProc1( LPVOID pParam );
DWORD WINAPI MyThreadProc2( LPVOID pParam );
BOOL APIENTRY DllMain( HANDLE hModule??
DWORD  ul_reason_for_call??
LPVOID lpReserved
)
{
switch ( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
{
MessageBox( NULL?? "DLL????????????"?? "???"?? MB_ICONINFORMATION );
DWORD dwThreadId;
HANDLE myThread1 = CreateThread(NULL?? 0?? (LPTHREAD_START_ROUTINE)MyThreadProc1?? NULL?? 0?? &dwThreadId);
HANDLE myThread2 = CreateThread(NULL?? 0?? (LPTHREAD_START_ROUTINE)MyThreadProc2?? NULL?? 0?? &dwThreadId);
break;
}
case DLL_PROCESS_DETACH:
{
MessageBox( NULL?? "DLL?????????ж???"?? "???"?? MB_ICONINFORMATION );
break;
}
}
return TRUE;
}
DWORD WINAPI MyThreadProc1( LPVOID pParam )
{
MessageBox( NULL?? "DLL????????1??"?? "???"?? MB_ICONINFORMATION );
return 0;
}
DWORD WINAPI MyThreadProc2( LPVOID pParam )
{
MessageBox( NULL?? "DLL????????2??"?? "???"?? MB_ICONINFORMATION );