Copy memory function in vb.net
-
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpDest As any, ByVal hpSource As any, ByVal nBytes As integer) I am converted the vb code into vb.net in this the copy memory function does not work it seems. I am calling the function in the form Call CopyMemory(arrBarCodeInformation(0), ptrBarCodeInfo, size_Renamed) but is showing some error .How to use the copy memory in vb,net here arrBarCodeInformation(0) is an structure value.slove the above problem and also give me the code for the same. pls help me to slove the problem.. :confused::(( :((
-
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef hpDest As any, ByVal hpSource As any, ByVal nBytes As integer) I am converted the vb code into vb.net in this the copy memory function does not work it seems. I am calling the function in the form Call CopyMemory(arrBarCodeInformation(0), ptrBarCodeInfo, size_Renamed) but is showing some error .How to use the copy memory in vb,net here arrBarCodeInformation(0) is an structure value.slove the above problem and also give me the code for the same. pls help me to slove the problem.. :confused::(( :((
http://www.codeproject.com/vb/net/CopyMemory_in_Net.asp Try this article right here on Code Project
Posted by The ANZAC
-
http://www.codeproject.com/vb/net/CopyMemory_in_Net.asp Try this article right here on Code Project
Posted by The ANZAC
I have tryied but i need to copy the integer value into the structure variable .how can i do that.pls give me the code .its very difficult for me to convert.pls help me its very urgent.... :((:((:((
-
I have tryied but i need to copy the integer value into the structure variable .how can i do that.pls give me the code .its very difficult for me to convert.pls help me its very urgent.... :((:((:((
I love how many people post 'it's very urgent' but don't give anything resembling the info that people need to help.
sundar_mca wrote:
i need to copy the integer value into the structure variable
Assuming that you have a block of memory that represents the struct, you can presumably use marshalling to copy the block of memory across. Or, you can cast that memory location to BE the struct, and copy them manually.
sundar_mca wrote:
.pls give me the code
That you would even ask this, based on the info you've provided ( nearly none ), tells me that you're in over your head. Try posting the information that describes the problem, then perhaps we can help.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I love how many people post 'it's very urgent' but don't give anything resembling the info that people need to help.
sundar_mca wrote:
i need to copy the integer value into the structure variable
Assuming that you have a block of memory that represents the struct, you can presumably use marshalling to copy the block of memory across. Or, you can cast that memory location to BE the struct, and copy them manually.
sundar_mca wrote:
.pls give me the code
That you would even ask this, based on the info you've provided ( nearly none ), tells me that you're in over your head. Try posting the information that describes the problem, then perhaps we can help.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
sorry for sending such messages.i hav etryied the marshaling function muct i want to copy the integer value to structure how can i do it using marshal function
-
sorry for sending such messages.i hav etryied the marshaling function muct i want to copy the integer value to structure how can i do it using marshal function
If all you're doing is marshalling a structure back and forth to unmanaged code, you DO NOT NEED the CopyMemory function. Post more of this code that your trying to translate so we can help. If you don't, there's nothing we can do to help!
Dave Kreskowiak Microsoft MVP - Visual Basic