TungVan
asked on
read binary file to buffer using globalalloc/copymemory
Hi,
Here is part of my code:
__________________________
Open file For Binary Access Write As fileTemp
Put fileTemp, , m_version
m_FileNumber = fileTemp
If m_FileNumber <> 0 Then
memory_handle = GlobalAlloc(GMEM_MOVEABLE,
If memory_handle Then
memory_pointer = GlobalLock(memory_handle)
CopyMemory ByVal memory_pointer, m_FileNumber, _
LOF(m_FileNumber)
GlobalUnlock memory_handle
End If
End If
__________________________
Is it the good way to do it?
And how can i watch the value that memory_pointer is pointing to?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I try to serialize/deserialize instance of object class to the memory in vb6...
One of its use is for clipboard:
I want to serialize the object to the memory, and pass the memory pointer to the clipboard for copying