<StructLayout(LayoutKind.Sequential)_
Public Structure MCPBusType
Public OutBuffer As String <-- the API function will
fill result here: Initialised to String of 4096 characters
Public OutBufferSize As Integer <-- the length/size of outBuffer
(=4096 of course)
Public ResponseLen As Integer
End Structure
i have define the structure in vb.net but i can not fix the string length
i have do this in vb and it is work , now i would like to convert to vb.net
any one can help and ask my question?
my project need to use .dll files and have some function that i can call
i call fucntion and give MCPBUS and device to function , the result will be store in outbuffer
i only need to call the outbuffer data.
example result "?{:JSUKdkfoe _ _ _ dofjdf "
_ <-- represent null value chr(0) and " " is space
i need null value will be show in output and let me do other process
but now the result is "?{:JSUKdkfoe" and the string length is not correct...
i have found some information from MSDN said that vb.net can not define fix length string....
is it possible to show chr(0) in string and let me do other process in it??
Public Structure MCPBusType
Public OutBuffer As String <-- the API function will
fill result here: Initialised to String of 4096 characters
Public OutBufferSize As Integer <-- the length/size of outBuffer
(=4096 of course)
Public ResponseLen As Integer
End Structure
i have define the structure in vb.net but i can not fix the string length
i have do this in vb and it is work , now i would like to convert to vb.net
any one can help and ask my question?
my project need to use .dll files and have some function that i can call
i call fucntion and give MCPBUS and device to function , the result will be store in outbuffer
i only need to call the outbuffer data.
example result "?{:JSUKdkfoe _ _ _ dofjdf "
_ <-- represent null value chr(0) and " " is space
i need null value will be show in output and let me do other process
but now the result is "?{:JSUKdkfoe" and the string length is not correct...
i have found some information from MSDN said that vb.net can not define fix length string....
is it possible to show chr(0) in string and let me do other process in it??