cppclean icon indicating copy to clipboard operation
cppclean copied to clipboard

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

Open Chaosmeister opened this issue 8 years ago • 1 comments

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 avatar Nov 02 '17 16:11 Chaosmeister

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

Chaosmeister avatar Nov 03 '17 08:11 Chaosmeister