[HELP] Runtime Error! (Working Menu)

Posts 1–15 of 15 · Page 1 of 1
[HELP] Runtime Error! (Working Menu)
So I got my menu finally working.



It originally has 45 features, but when /me put all 45 it crashes (I am going to fix that), also need to re-align the title.

When I closed the D3D9 Test Environment I got his error:



Does anyone know where originally this comes from, or how to fix it?

When I tried the hack in Combat Arms, I joined a game, and Combat Arms crashed, you can hear the Error message box pop-up but nothing shows.

Please help a fellow coder
Are you releasing the font and lines?? if not you shuld...
Yeah thats what I thought.
I release the Font once, in the PostReset:

Code:
			if (pFont != NULL){
				pFont->Release();
			}
Quote Originally Posted by -Dimensions- View Post
I release the Font once, in the PostReset:

Code:
			if (pFont != NULL){
				pFont->Release();
			}
you shuld release them when the process closes as folowing:

Code:
BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    //Create your threads here to startup routines
    break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    pLine->Release();
    pFont->Release();
        break;
    }
    return TRUE;
}
Quote Originally Posted by Mr.Mageman View Post


you shuld release them when the process closes as folowing:

Code:
BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    //Create your threads here to startup routines
    break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    pLine->Release();
    pFont->Release();
        break;
    }
    return TRUE;
}
Thanks for the reply, but when I tried to use your code, the Test Environment didn't open. Then I tried this:

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
		pFont->Release();
	}

	return TRUE;
}
and test9.exe stopped responding.

Any more solutions?

Edit: Thanks for the reply though.

Another Edit:

I tried:

Code:
	switch (dwReason)
	{    
		case DLL_PROCESS_ATTACH:
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
		break;
		case DLL_THREAD_ATTACH:
		case DLL_THREAD_DETACH:
		case DLL_PROCESS_DETACH:
		pFont->Release();
		break;
    }
and still got the same error.

More help please
Quote Originally Posted by -Dimensions- View Post
Thanks for the reply, but when I tried to use your code, the Test Environment didn't open. Then I tried this:

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
		pFont->Release();
	}

	return TRUE;
}
and test9.exe stopped responding.

Any more solutions?

Edit: Thanks for the reply though.
Why the fuck are you releasing the font at startup??

do like this instead:

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);

	if (dwReason == DLL_PROCESS_ATTACH)
	{
		CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
	}
        
	if (dwReason == DLL_PROCESS_DEATTACH)
	{
		pFont->Release();
                pLine->Release();
	}

	return TRUE;
}
Don't use that test environment. The test environment itself does not close properly (check it yourself by just opening and closing the application).

Use another, or make your own
Use the Release folder not the Debug
Quote Originally Posted by Stephen View Post
Use the Release folder not the Debug
Umm... I know that...

Quote Originally Posted by Mr.Mageman View Post


Why the fuck are you releasing the font at startup??

do like this instead:

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);

	if (dwReason == DLL_PROCESS_ATTACH)
	{
		CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
	}
        
	if (dwReason == DLL_PROCESS_DEATTACH)
	{
		pFont->Release();
                pLine->Release();
	}

	return TRUE;
}

Code:
1>.\Base.cpp(579) : error C2065: 'DLL_PROCESS_DEATTACH' : undeclared identifier
1>.\Base.cpp(582) : error C2065: 'pLine' : undeclared identifier
1>.\Base.cpp(582) : error C2227: left of '->Release' must point to class/struct/union/generic type
1>        type is ''unknown-type''
No Such thing as PROCESS_DEATTACH.

More help please!
Quote Originally Posted by -Dimensions- View Post
Umm... I know that...




Code:
1>.\Base.cpp(579) : error C2065: 'DLL_PROCESS_DEATTACH' : undeclared identifier
1>.\Base.cpp(582) : error C2065: 'pLine' : undeclared identifier
1>.\Base.cpp(582) : error C2227: left of '->Release' must point to class/struct/union/generic type
1>        type is ''unknown-type''
No Such thing as PROCESS_DEATTACH.

More help please!
pLine = ID3DXLine = You don't have it
DLL_RPOCESS_DEATTACH = DLL_PROCESS_DETACH

kthxbai.
yea i saw it in his sig that he needed help, lol!! and after i posted i seen the last post haha
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?