I am compiling with WINDDK Windows Server 2003 Build Environment and I get a lot of errors. I am so lost. Can anybody please tell me what I am doing wrong?
Code:
#include <ntddk.h>
void DriverUnload(PDRIVER_OBJECT pDriverObject)
{
DbgPrint("DriverExit\n");
}
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DriverObject->DriverUnload = DriverUnload;
DbgPrint("DriverEntry\n");
HANDLE gbHandle = FindWindow(0, "Calculator");
if (gbHandle != NULL) {
DWORD wtpID;
GetWindowThreadProcessId(hWnd, &wtpID);
HANDLE gbProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, wtpID);
BYTE hdata[]={0x72, 0x6F};
DWORD sizehdata = sizeof(hdata);
WriteProcessMemory(gbProcess, (LPVOID)0x5C6600, &hdata, sizehdata, NULL));
CloseHandle(gbProcess);
}
return STATUS_SUCCESS;
}