Hi all,
I have a program that suppose to scan an image, load it into memory and then grab it from there and send it to the server.
However the scan part works fine, also the load to memory also the calling the image from memory works fine.
The problem arise when I try to use CopyMemory api call.
Example (VB):
Private Sub SendToServer()
CopyMemory Text1.Text, hMem, hsize
End Sub
Where the "Text1.Text" is the destination, the hMem is the memory handle and the iSize is the size.
When I try to run it, it crashes not only the app but VB also - simply dissapears from the screen.
Here is how I drclare copyMemory:
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Src As Any, ByVal cb As Long)
Thanks a lot,
Gabi.
I have a program that suppose to scan an image, load it into memory and then grab it from there and send it to the server.
However the scan part works fine, also the load to memory also the calling the image from memory works fine.
The problem arise when I try to use CopyMemory api call.
Example (VB):
Private Sub SendToServer()
CopyMemory Text1.Text, hMem, hsize
End Sub
Where the "Text1.Text" is the destination, the hMem is the memory handle and the iSize is the size.
When I try to run it, it crashes not only the app but VB also - simply dissapears from the screen.
Here is how I drclare copyMemory:
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Dest As Any, Src As Any, ByVal cb As Long)
Thanks a lot,
Gabi.