All pastes #2066745 Raw Edit

Someone

public text v1 · immutable
#2066745 ·published 2011-05-22 11:21 UTC
rendered paste body
		ptrUser_hInstance = GetModuleHandle(TEXT("engine.dll")); //Pointer
		if (ptrUser_hInstance)
		{
			FARPROC UsernameProcID = GetProcAddress (ptrUser_hInstance, "?GetUserAccount@UNetworkHandler@@UAEPAGXZ" );

			pICFUNC GetUsername; 
			GetUsername = pICFUNC(UsernameProcID); 
			/* The actual call to the function contained in the dll */ 
			Name = GetUsername(); //returns username
			MessageBox(NULL, (LPCWSTR)Name,  (LPCWSTR)L"Username: ", MB_ICONINFORMATION | MB_OK);

			/* Release the Dll */ 
			FreeLibrary(ptrUser_hInstance);

		}