Originally Posted by Kynox @ "http://kynox.wordpress.com/2009/05/31/new-blog/"
I’ll be posting about how to host the CLR for .NET executables so you can run them in the context of another process later on; giving examples in both Managed C++ and Unmanaged C++
Code:
#include <Windows.h>
#pragma managed
DWORD WINAPI ThreadStartRoutine(LPVOID lpThreadParameter)
{
System::Windows::Forms::MessageBox::Show("Hello");
return 0;
}
#pragma unmanaged
BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
if ( dwReason == DLL_PROCESS_ATTACH )
CreateThread( NULL, 0, ThreadStartRoutine, NULL, 0, NULL );
return TRUE;
}
that's your hint