I know that the standard doesn't define the size of the int and long types,
but in the real world most (if not all) C++ compilers on windows do define
an int = long = 32 bit. You said it's not a problem as long as his app is
confined to 32 bit windows, which is not true, if the C++ long is a 32 bit
value the .NET value must be an int, not a long.
A .NET long (C# or whatever) is a 64 bit integer value. That means that the
C++ long MUST be an 64 bit integer too, which is not true for most (if not
all) DLL's compiled with a 32 bit compiler on windows 32 bit and that's what
Nicholas assumed when he said that the OP should change it's (C#) long's
into int's.
Willy.
"John Torville" <no_spam@_nospam.com> wrote in message
news:(E-Mail Removed)...
|> Please re-read Nicholas answer, he is talking about the C# code.
|
| His statement that "in C++ a long is a 32-bit integer" is incorrect. Nor
is
| a C++ "int" 32 bits for that matter. C++ doesn't define the size of these
| types and I was pointing that out more for the benefit of the original op
| (it's just good to know, especially when writing portable code). C# has
| nothing to do it

|
|