Hi guys,
I get the following error during runtime:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at SXInit(Int32 )
The SXInit method is a native C function I am calling from Managed C++ and the method is expecting a number of integers as
parameters and the constants I am passing have been defined in the C library as "#define xxxx 2100".
My questions are:
1) Why do I see Int32 there?
2) Are the "#define" statements converting themselves to Int32s?
I would appreciate if there is a way around calling C functions and passing them "int" according to the native data type definition
and not Int32 which is a C++ Managed Type since Int32 is an object.
Please let me know
Thanks
Paul
Paul Brun - 24 Feb 2004 19:36 GMT
just to clarify, this is the runtime definition in my "C" library header:
extern int SXInit (int, ...);
Paul
Hi guys,
I get the following error during runtime:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at SXInit(Int32 )
The SXInit method is a native C function I am calling from Managed C++ and the method is expecting a number of integers as
parameters and the constants I am passing have been defined in the C library as "#define xxxx 2100".
My questions are:
1) Why do I see Int32 there?
2) Are the "#define" statements converting themselves to Int32s?
I would appreciate if there is a way around calling C functions and passing them "int" according to the native data type definition
and not Int32 which is a C++ Managed Type since Int32 is an object.
Please let me know
Thanks
Paul
Peter Obel - 03 Mar 2005 23:43 GMT
Paul
Did you ever find the solution, as I am having this problem right now.
Regards
Peter