Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script exception: AttributeError: 'NoneType' object has no attribute 'split' #123

Open
Chaosmeister opened this issue Nov 2, 2017 · 1 comment

Comments

@Chaosmeister
Copy link

The following code causes an exception in the script:

FARPROC WINAPI DelayLoadHook(unsigned dliNotify, PDelayLoadInfo pdli);

extern "C" decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = DelayLoadHook;

FARPROC WINAPI DelayLoadHook(unsigned dliNotify, PDelayLoadInfo pdli)
{
	switch (dliNotify)
	{
		case dliNotePreLoadLibrary:
		{
		}
		break;

		case dliFailGetProc:
		{
		}
		break;
	}

	return nullptr;
}

BOOL WINAPI DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID)
{
	switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
		{
			DisableThreadLibraryCalls(hModule); // Disable DLL_THREAD_ATTACH and DLL_THREAD_DETACH messages
		}
		break;

		case DLL_THREAD_ATTACH:
		{
		}
		break;

		case DLL_THREAD_DETACH:
		{
		}
		break;

		case DLL_PROCESS_DETACH:
		{
		}
		break;
	}
	return TRUE;
}

it runs well without

FARPROC WINAPI DelayLoadHook(unsigned dliNotify, PDelayLoadInfo pdli);

extern "C" decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = DelayLoadHook;
@Chaosmeister
Copy link
Author

extern "C" decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = DelayLoadHook;
seems to be the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant