How to pass memory address?

Hello,

I have this code I got from the forums awhile back and I am running into the same problem as the original author in that I cannot figure out how to pass a memory address in Xojo in a Declare. I need to pass the memory address 0x02CDCB7A which is the lpBaseAddress needed in ReadProcessMemory. I cannot seem to find any Xojo data type that supports a memory address. Any help would be appreciated.

[code]'BOOL WINAPI ReadProcessMemory(
'In HANDLE hProcess,
'In LPCVOID lpBaseAddress,
'Out LPVOID lpBuffer,
'In SIZE_T nSize,
'Out SIZE_T *lpNumberOfBytesRead
');

dim iPID,iBytesRead,iThreadProcess as integer
Dim data as new MemoryBlock(4)
Const PROCESS_READ = &H10
Dim iBase as UInt32 = 0x02CDCB7A

Declare Function OpenProcess Lib “Kernel32” ( access as Integer, inherit as Boolean, id as Integer ) as Integer
Declare Sub ReadProcessMemory Lib “Kernel32” ( handle as Integer, base as integer, buffer as Ptr, size as Integer, ByRef read as Integer )
Declare Sub CloseHandle Lib “Kernel32” ( handle as Integer )

iPID = 2576
iThreadProcess = OpenProcess( PROCESS_READ, False, iPID)

if iThreadProcess > 0 then
iBytesRead = 0
ReadProcessMemory( iThreadProcess, iBase, data, data.Size, iBytesRead )
CloseHandle( iThreadProcess )
end[/code]

Cast the address as a Ptr:

Dim iBase As Ptr = Ptr(&h02CDCB7A)

Hey Thanks! That worked perfect