Code: Select all
Private Function GetDWORD(ByVal lAddr As Long) As Long
Call NtWriteVirtualMemory(-1, GetDWORD, ByVal lAddr, 4, ByVal 0&)
End Function
h=App.hInstance
Debug GetDWORD(h+&H3C)
Code: Select all
Procedure.l GetDWORD(lAddr.l)
pid.l = GetCurrentProcessId_()
pHandle.l = OpenProcess_(#PROCESS_ALL_ACCESS, #False, pid)
Debug pHandle
Debug GetDWORD
Debug lAddr
WriteProcessMemory_(pHandle,GetDWORD,lAddr,4,0)
EndProcedure
h.l = GetModuleHandle_(0)
Debug GetDWORD(h+$3C)
Please correct me where i am going wrong
yea i m not using NtWriteVirtualMemory as it is not defined in PB yea i can use OpenLibrary but i want to see the point Why i always get 0 with PB where am i going wrong