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

Managed C++/CLI

 
Generalambiguous error Pin
ISUstudent7-Oct-04 14:19
ISUstudent7-Oct-04 14:19 
GeneralStrings Pin
gremlin067-Oct-04 8:04
gremlin067-Oct-04 8:04 
GeneralRe: Strings Pin
George L. Jackson8-Oct-04 2:39
George L. Jackson8-Oct-04 2:39 
GeneralRe: Strings Pin
AnsGe8-Oct-04 21:18
AnsGe8-Oct-04 21:18 
GeneralRe: Strings Pin
Gammill11-Oct-04 8:49
Gammill11-Oct-04 8:49 
GeneralDelegate not working... Pin
David Moody7-Oct-04 4:07
David Moody7-Oct-04 4:07 
Questionanyone know how to connect...? Pin
porac696-Oct-04 14:25
porac696-Oct-04 14:25 
GeneralVery frustrating dllimport code.. Pin
David Moody6-Oct-04 5:42
David Moody6-Oct-04 5:42 
I'm trying to call a C dll function passing a structure that looks like this:

typedef struct
{
long lModuleID;
DWORD dwAddress;
long lType;
BOOL fComplete;
long lLength;
BYTE *pbyData;
WORD wTimeoutMS;
long lErrors;
} MEMACCESS_STRUCT_S;

I translate this into the following structure in my managed C++ code:

[StructLayout(LayoutKind::Sequential)]
public __gc class MEMACCESS_STRUCT_S
{
public:
Int32 devAddr;
Int32 memAddr; // DWORD (UInt32)
Int32 type;
Int16 complete; // BOOL -> TRUE=1, FALSE=0
Int32 length;
Byte data[];
Int16 timeout; // WORD (UInt16)
Int32 err;
};

Everything works great except the variable "data" that holds the byte array. I get garbage when I look at the values for the array. What am I doing wrong? Thank you so much for any help... I'm nearing the point of headbutting my monitor and throwing my mouse out the window over this one!

david

GeneralRe: Very frustrating dllimport code.. Pin
ursus zeta6-Oct-04 9:50
ursus zeta6-Oct-04 9:50 
GeneralRe: Very frustrating dllimport code.. Pin
David Moody7-Oct-04 4:10
David Moody7-Oct-04 4:10 
Generalplease please please help me Pin
youngashish5-Oct-04 22:39
youngashish5-Oct-04 22:39 
GeneralRe: please please please help me Pin
Phil J Pearson5-Oct-04 22:54
Phil J Pearson5-Oct-04 22:54 
GeneralRe: please please please help me Pin
Anonymous5-Oct-04 22:59
Anonymous5-Oct-04 22:59 
Generalproblem Pin
ISUstudent5-Oct-04 14:55
ISUstudent5-Oct-04 14:55 
GeneralRe: problem Pin
Anonymous5-Oct-04 15:27
Anonymous5-Oct-04 15:27 
GeneralRe: problem Pin
Christian Graus5-Oct-04 15:38
protectorChristian Graus5-Oct-04 15:38 
GeneralRe: problem Pin
toxcct5-Oct-04 21:13
toxcct5-Oct-04 21:13 
GeneralRe: problem Pin
Anonymous6-Oct-04 4:11
Anonymous6-Oct-04 4:11 
GeneralRe: problem Pin
R.Pincince13-Oct-04 5:10
R.Pincince13-Oct-04 5:10 
GeneralProject settings Pin
Jose Vicente5-Oct-04 5:41
Jose Vicente5-Oct-04 5:41 
GeneralA CHALLENGE Pin
tobermori4-Oct-04 15:36
tobermori4-Oct-04 15:36 
GeneralDirectX 9 SDK (Summer 2004) Pin
pauldomag3-Oct-04 6:23
pauldomag3-Oct-04 6:23 
GeneralRe: DirectX 9 SDK (Summer 2004) Pin
Christian Graus5-Oct-04 15:41
protectorChristian Graus5-Oct-04 15:41 
GeneralRe: DirectX 9 SDK (Summer 2004) Pin
pauldomag5-Oct-04 22:59
pauldomag5-Oct-04 22:59 
GeneralRe: DirectX 9 SDK (Summer 2004) Pin
Christian Graus6-Oct-04 9:33
protectorChristian Graus6-Oct-04 9:33 

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.