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

Managed C++/CLI

 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable [modified] Pin
marcusab19-Apr-09 11:04
marcusab19-Apr-09 11:04 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
N a v a n e e t h19-Apr-09 15:34
N a v a n e e t h19-Apr-09 15:34 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Luc Pattyn19-Apr-09 16:10
sitebuilderLuc Pattyn19-Apr-09 16:10 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
N a v a n e e t h19-Apr-09 17:02
N a v a n e e t h19-Apr-09 17:02 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Mark Salsbery20-Apr-09 8:31
Mark Salsbery20-Apr-09 8:31 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Luc Pattyn20-Apr-09 8:40
sitebuilderLuc Pattyn20-Apr-09 8:40 
AnswerRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Mark Salsbery19-Apr-09 6:40
Mark Salsbery19-Apr-09 6:40 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
marcusab19-Apr-09 10:55
marcusab19-Apr-09 10:55 
Thank you very very very much Big Grin | :-D , you got me going in the right direction, see my answer to Navaneeth for more info.


Almost, pDataByte is a System::Object^ {System.Array}, not an array<unsigned char=""> {Length = 0x4} as with QByte. See debug info:
Name         Value           Type
pDataByte    {System.Array}  System::Object^
 [0x0]       0x41 ‘A’        unsigned char
 [0x1]       0x42 ‘B’        unsigned char
 [0x2]       0x43 ‘C’        unsigned char
 [0x3]       0x44 ‘D’        unsigned char
QByte        {Length=0x4}    unsigned char[]
 [0x0]       0x00 ‘’         unsigned char
 [0x1]       0x00 ‘’         unsigned char
 [0x2]       0x00 ‘’         unsigned char
 [0x3]       0x00 ‘’         unsigned char


So I get compilation error:
<br />
error C2665: 'System::Runtime::InteropServices::Marshal::Copy' : none of the 16 overloads could convert all the argument types<br />

GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Mark Salsbery19-Apr-09 11:12
Mark Salsbery19-Apr-09 11:12 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
marcusab19-Apr-09 11:32
marcusab19-Apr-09 11:32 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
marcusab19-Apr-09 11:44
marcusab19-Apr-09 11:44 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
Mark Salsbery19-Apr-09 11:44
Mark Salsbery19-Apr-09 11:44 
GeneralRe: How to copy/convert System::Object^(unsigned char) to local variable Pin
marcusab19-Apr-09 11:57
marcusab19-Apr-09 11:57 
QuestionDialogBox in C++/CLI Pin
J_E_D_I9-Apr-09 11:29
J_E_D_I9-Apr-09 11:29 
AnswerRe: DialogBox in C++/CLI Pin
Mark Salsbery9-Apr-09 12:26
Mark Salsbery9-Apr-09 12:26 
AnswerRe: DialogBox in C++/CLI Pin
led mike10-Apr-09 4:37
led mike10-Apr-09 4:37 
AnswerRe: DialogBox in C++/CLI Pin
Luc 64801110-Apr-09 7:00
Luc 64801110-Apr-09 7:00 
QuestionCLR Linking takes long time Pin
KASR19-Apr-09 0:50
KASR19-Apr-09 0:50 
AnswerRe: CLR Linking takes long time Pin
Rolf Kristensen9-Apr-09 3:22
Rolf Kristensen9-Apr-09 3:22 
GeneralRe: CLR Linking takes long time Pin
KASR19-Apr-09 3:26
KASR19-Apr-09 3:26 
AnswerRe: CLR Linking takes long time Pin
teejayem9-Apr-09 5:34
teejayem9-Apr-09 5:34 
GeneralRe: CLR Linking takes long time Pin
led mike9-Apr-09 8:31
led mike9-Apr-09 8:31 
GeneralRe: CLR Linking takes long time Pin
Luc 64801110-Apr-09 7:02
Luc 64801110-Apr-09 7:02 
Generala managed array cannot have this element type Pin
Member 20210228-Apr-09 4:44
Member 20210228-Apr-09 4:44 
QuestionWhat is your damage? Pin
led mike8-Apr-09 5:21
led mike8-Apr-09 5:21 

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.