When I add a reference to a COM dll using add reference in by c# console app,
the VB6 COM long variables of a function appears in the intellisense and
debug errors as an int.
From MSDN the sizes of the variables are:
com INT Holds signed 32-bit (4-byte) integers ranging in value from
-2,147,483,648 through 2,147,483,647.
.net int -2,147,483,648 to 2,147,483,647
COM long Holds signed 64-bit (8-byte) integers ranging in value from
-9,223,372,036,854,775,808 through 9,223,372,036,854,775,807 (9.2...E+18).
.net long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
does anyone have a solution to this apart from manually writing interop?
Are there settings I can use to correct this?
Thanks
Mattias Sjögren - 21 Sep 2006 21:34 GMT
>COM long Holds signed 64-bit (8-byte) integers ranging in value from
No it doesn't. The VB6 Long type is equivalent to int in C#, and VB6
never supported any 64-bit integer type.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Bytemaster - 27 Sep 2006 23:44 GMT
The VB6 definitions are that an int is 16-bit and a long is 32-bit. This
equates in
C# to short for 16 bit and int for 32-bit.
> When I add a reference to a COM dll using add reference in by c# console app,
> the VB6 COM long variables of a function appears in the intellisense and
[quoted text clipped - 12 lines]
> Are there settings I can use to correct this?
> Thanks