skuhn
asked on
Directly read a byte of memory using an address
I have an instrument which uses a DLL to read some data.
The DLL gives me a pointer to the location in memory.
I want to read the bytes.
The instrument actually gives 32k bytes of Data.
How do I take the pointer given by the DLL code and read the 32k bytes of data.
The DLL gives me a pointer to the location in memory.
I want to read the bytes.
The instrument actually gives 32k bytes of Data.
How do I take the pointer given by the DLL code and read the 32k bytes of data.
you won't do it with VB. Try with C/Pascal
ASKER
Adjusted points to 140
ASKER
Adjusted points to 150
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thankyou very much for the answer.
I am new to visual basic and would appreciate a bit more detail.
I will try to test the answer, but a few lines of detail from you will probably save me hours.
I am new to visual basic and would appreciate a bit more detail.
I will try to test the answer, but a few lines of detail from you will probably save me hours.
Try something like:
########################## ##########
Dim m_abDATA(0 to 255) as BYTE
MemCopy(m_abData, BufAddr, 256)
Debug.print m_abData(0) ' print 1st byte
########################## ##########
I use these rotines to extract data from binary messages recieved over a serial/tcip link to VB structures, I haven't tried it with the shared memory data aquisition scheme you mention, there should be no problem except for synchronisation, do you have to obey/maintain a semaphore?
##########################
Dim m_abDATA(0 to 255) as BYTE
MemCopy(m_abData, BufAddr, 256)
Debug.print m_abData(0) ' print 1st byte
##########################
I use these rotines to extract data from binary messages recieved over a serial/tcip link to VB structures, I haven't tried it with the shared memory data aquisition scheme you mention, there should be no problem except for synchronisation, do you have to obey/maintain a semaphore?
ASKER
Thankyou, I still have to sort out the details but I am now on track.
I searched microsoft.com for
"RtlMoveMemory" and found more information
I searched microsoft.com for
"RtlMoveMemory" and found more information