Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float ReadFloat(int processId, DWORD address)
- {
- ULONG ulPtr = NULL;
- DWORD dwBytesRead = 0;
- uint8_t buf[0x1000] = { 0 };
- COPY_MEMORY copyMem;// = new COPY_MEMORY();
- copyMem.pid = processId;
- copyMem.targetPtr = address;
- copyMem.localbuf = (ULONGLONG)buf;
- copyMem.size = 4;
- copyMem.write = FALSE;
- DeviceIoControl(hDevice, IOCTL_Memory, ©Mem, sizeof(copyMem), &ulPtr, sizeof(ulPtr), &dwBytesRead, NULL);
- //printf("Message received from kerneland : %x\n", ulPtr);
- //printf("Bytes read : %d\n", dwBytesRead);
- return *(float*)(&ulPtr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement