
(VB,Winsock) Extracting data from socket.
Sorry, it's LSet, not Let !
LSet mydata = winsockreceivebuffer
RtlMoveMemory might be an alternative.
Alex
Alexander Kienzle schrieb in Nachricht ...
Quote:
>Type myrec
> num_field As Byte
> str_field As String * 2
> flt_field As Single
>End Type
>Dim mydata As myrec
>Let mydata = winsockreceivebuffer
>Hope this helps
>Alex
>Joseph Toulier schrieb in Nachricht ...
>>Hello,
>>I'm developing a VB Client app that receives data from a server via
>Winsock.
>>The Winsock server is developed in C++ and the Client in VB6
>>The VB client receives the following message from the server:
>>numeric_field (1 byte) ---> maps to VB Byte datatype
>>string_field (2 bytes) ---> maps to VB String datatype
>>float_field (4 bytes) ---> maps to VB Single datatype
>>These fields arrives as a single string, so the client receives 7 bytes.
>>Is there a way to "extract" these data into simple VB variables?
>>Thanks in advance
>>Joseph