Miguel �ngel Chac�n [mailto:[EMAIL PROTECTED]] wrote:
> Thanks, but maybe I don't explain it very well. I need to
> read the values written by another app, that is
> Unmanaged(C++,VB), in a socket. I can't alter the way the
> data is written, because is another app, but I know the
> structure of the data, just like:
>
> (C++) (C#)
> struct aMsg struct aMsg
> { {
> DWORD a; int a;
> DWORD b; int b;
> DWORD c; int c;
> } }
>
> Then, the C++ structure is written in the socket, and then I
> receive the byte[] in C#. I want to do something like (so simple):
>
> byte[] received;
> aMsg myMsg=(aMsg)received;
>
> Is this possible?
Yes, I've offered some solutions to this problem before... the latest being
about two weeks ago. Please check out these threads[1][2] in the archives
and feel free to get back with any questions.
HTH,
Drew
.NET MVP
[1]
http://discuss.develop.com/archives/wa.exe?A2=ind0110A&L=DOTNET&D=0&P=52940
[2]
http://discuss.develop.com/archives/wa.exe?A2=ind0205B&L=DOTNET&D=0&P=38571
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.