Click here to Skip to main content
15,911,848 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Listbox Problem.. Pin
Christian Graus25-Feb-08 22:30
protectorChristian Graus25-Feb-08 22:30 
GeneralRe: Listbox Problem.. Pin
ptr2void25-Feb-08 22:43
ptr2void25-Feb-08 22:43 
GeneralRe: Listbox Problem.. Pin
ptr2void25-Feb-08 23:34
ptr2void25-Feb-08 23:34 
QuestionHow to synchronize the system's configuration status between nodes? Pin
Member 454227225-Feb-08 3:03
Member 454227225-Feb-08 3:03 
GeneralConvert Struct Pin
javad_200524-Feb-08 1:35
javad_200524-Feb-08 1:35 
GeneralRe: Convert Struct Pin
prasad_som24-Feb-08 3:22
prasad_som24-Feb-08 3:22 
GeneralRe: Convert Struct Pin
javad_200524-Feb-08 5:36
javad_200524-Feb-08 5:36 
GeneralRe: Convert Struct Pin
Mark Salsbery24-Feb-08 10:17
Mark Salsbery24-Feb-08 10:17 
The simplest method would be to create a Byte array the size of the structure and copy the structure bytes to the array.
    MyStruct mystruct;
    array<Byte>^ ByteArray = gcnew array<Byte>(sizeof(MyStruct));
    for (int i = 0; i < sizeof(MyStruct); i++)
        ByteArray[i] = ((unsigned char *)&mystruct)[i];
    Socket ^s;
    s->Send(ByteArray);
There's other problems which may or may not be a factor in your situation See here[^]

A more robust solution is to make classes/structs serializable so the conversion to/from a Byte array
is built in to the class.

Mark





Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Convert Struct Pin
javad_200525-Feb-08 2:14
javad_200525-Feb-08 2:14 
GeneralRe: Convert Struct Pin
Mark Salsbery25-Feb-08 5:50
Mark Salsbery25-Feb-08 5:50 
GeneralVisual c++ NET printing Pin
mikobi22-Feb-08 0:00
mikobi22-Feb-08 0:00 
GeneralRe: Visual c++ NET printing Pin
led mike22-Feb-08 6:59
led mike22-Feb-08 6:59 
GeneralRe: Visual c++ NET printing Pin
mikobi24-Feb-08 22:47
mikobi24-Feb-08 22:47 
QuestionC# -&gt; C++ call issue Pin
Jais Joy21-Feb-08 19:18
Jais Joy21-Feb-08 19:18 
GeneralRe: C# -&gt; C++ call issue Pin
Mark Salsbery22-Feb-08 6:20
Mark Salsbery22-Feb-08 6:20 
GeneralWeb Application Vs Windows applications Pin
sathishin21-Feb-08 7:13
sathishin21-Feb-08 7:13 
GeneralRe: Web Application Vs Windows applications Pin
Christian Graus21-Feb-08 20:29
protectorChristian Graus21-Feb-08 20:29 
GeneralRe: Web Application Vs Windows applications Pin
sathishin25-Feb-08 6:18
sathishin25-Feb-08 6:18 
GeneralError with Substring. Pin
msogun20-Feb-08 18:12
msogun20-Feb-08 18:12 
GeneralRe: Error with Substring. Pin
Mark Salsbery21-Feb-08 8:05
Mark Salsbery21-Feb-08 8:05 
QuestionPassing Data Between Forms, I tried and failed :) Pin
Badboy22TR20-Feb-08 14:59
Badboy22TR20-Feb-08 14:59 
GeneralRe: Passing Data Between Forms, I tried and failed :) Pin
Paul Conrad29-Feb-08 8:05
professionalPaul Conrad29-Feb-08 8:05 
GeneralRe: Passing Data Between Forms, I tried and failed :) Pin
Badboy22TR29-Feb-08 9:11
Badboy22TR29-Feb-08 9:11 
GeneralI can write a ListView record but I can't read one Pin
BuckBrown20-Feb-08 12:11
BuckBrown20-Feb-08 12:11 
GeneralRe: I can write a ListView record but I can't read one Pin
Christian Graus20-Feb-08 13:18
protectorChristian Graus20-Feb-08 13:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.