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

Managed C++/CLI

 
GeneralRe: Convert vector to managed array Pin
George L. Jackson27-Aug-07 10:38
George L. Jackson27-Aug-07 10:38 
QuestionDefault funcations in a class Pin
Nandu_77b27-Aug-07 0:15
Nandu_77b27-Aug-07 0:15 
AnswerRe: Default funcations in a class Pin
George L. Jackson27-Aug-07 10:30
George L. Jackson27-Aug-07 10:30 
Questionhow to use and declare a Vector Pin
aefmaaradji26-Aug-07 13:43
aefmaaradji26-Aug-07 13:43 
AnswerRe: how to use and declare a Vector Pin
George L. Jackson26-Aug-07 15:51
George L. Jackson26-Aug-07 15:51 
Questiondeclaration and use of a buffer (pile TCP/IP) Pin
aefmaaradji26-Aug-07 13:25
aefmaaradji26-Aug-07 13:25 
QuestionSending Native Struct via TCP Pin
tjkrz26-Aug-07 9:02
tjkrz26-Aug-07 9:02 
AnswerRe: Sending Native Struct via TCP Pin
Mark Salsbery26-Aug-07 10:09
Mark Salsbery26-Aug-07 10:09 
You'd need to create an array of Bytes (for the Socket::Send()) and "serialize" a managed type
into a stream of bytes (representing the structure) in the array.

A couple things to keep in mind:

Structure packing can be different on different languages/platforms.   This means you have to
ensure each of the structure's members is at the appropriate offset in the Byte array.

The BitConverter class can help for converting managed base types to a stream of byes,
but you need to deal with byte order (endian-ness) of multi-byte types if the other
platform is different.  If this is an issue, multi-byte integer types sould be sent using
network byte order.  IPAddress::HostToNetworkOrder() and IPAddress::NetworkToHostOrder()
can do the conversion but the other end needs to know to convert the sent network-order
bytes back to host-order.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

Questioncompute the square root of a number without mathematic functions ..... Pin
mr.mohsen26-Aug-07 8:27
mr.mohsen26-Aug-07 8:27 
AnswerRe: compute the square root of a number without mathematic functions ..... Pin
Luc Pattyn26-Aug-07 10:51
sitebuilderLuc Pattyn26-Aug-07 10:51 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
George L. Jackson27-Aug-07 10:40
George L. Jackson27-Aug-07 10:40 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
Luc Pattyn27-Aug-07 11:10
sitebuilderLuc Pattyn27-Aug-07 11:10 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
George L. Jackson27-Aug-07 12:05
George L. Jackson27-Aug-07 12:05 
GeneralRe: compute the square root of a number Pin
Luc Pattyn27-Aug-07 12:12
sitebuilderLuc Pattyn27-Aug-07 12:12 
GeneralRe: compute the square root of a number Pin
George L. Jackson27-Aug-07 12:23
George L. Jackson27-Aug-07 12:23 
GeneralRe: compute the square root of a number Pin
Luc Pattyn27-Aug-07 14:30
sitebuilderLuc Pattyn27-Aug-07 14:30 
GeneralRe: compute the square root of a number Pin
George L. Jackson27-Aug-07 14:42
George L. Jackson27-Aug-07 14:42 
GeneralRe: compute the square root of a number Pin
Luc Pattyn27-Aug-07 14:56
sitebuilderLuc Pattyn27-Aug-07 14:56 
GeneralRe: compute the square root of a number Pin
George L. Jackson27-Aug-07 15:34
George L. Jackson27-Aug-07 15:34 
GeneralRe: compute the square root of a number Pin
Luc Pattyn27-Aug-07 15:41
sitebuilderLuc Pattyn27-Aug-07 15:41 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
Mark Salsbery27-Aug-07 13:43
Mark Salsbery27-Aug-07 13:43 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
George L. Jackson27-Aug-07 13:59
George L. Jackson27-Aug-07 13:59 
GeneralRe: compute the square root of a number without mathematic functions ..... Pin
Luc Pattyn27-Aug-07 14:26
sitebuilderLuc Pattyn27-Aug-07 14:26 
Questionhow to lanch a timer starting From a method ? Pin
aefmaaradji25-Aug-07 4:49
aefmaaradji25-Aug-07 4:49 
QuestionRe: how to lanch a timer starting From a method ? Pin
George L. Jackson27-Aug-07 12:12
George L. Jackson27-Aug-07 12:12 

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.