Hello
Firstly I so sorry my bad english.
I hope mpgh users help me
I write c++ dll.
I use dll in form code
Sources here:
Source Files:
Main.cpp
#include <Windows.h>
extern int DesignMain();
DWORD WINAPI Main(LPVOID ParaMetre)
{
DesignMain();
return 1;
}
BOOL APIENTRY DllMain(HMODULE xH,DWORD xD,LPVOID xL)
{
if(xD==DLL_PROCESS_ATTACH)
{
CreateThread(0,0x1000,(LPTHREAD_START_ROUTINE)Main,0,0,0);
}
return 1;
}
Header Files:
HackMenu.cpp:
#include "HackMenu.h"
using namespace Test;
int DesignMain()
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
HackMenu^ xHack=gcnew HackMenu();
Application::Run(xHack);
return 1;
}
I ınject the dll any game form coming. Thats verry good and cool.
I add button textbox commobox I add ALLL AND ANY ERROR COME THATS VERRY GOOD!
BUT I ADD WEBBROWSER AND DEBUG. Not come any error but I ınject any game: Game is freeze!
I try add form2 and I add button form2 . If click button form1 come and form1 have webbrowser.
I ınject game dll and form2 come not problems ! But click button Dont come form1 and I have this Error :
ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current threads is not in a single-threaded apartment
I search google but I cant solved Please help me please Thats so important
Note: I use vb 2012 and .net framework 4.0