Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
C++
#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:
C++
#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
Posted

1 solution

Why any body person dont answer me ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900