G
Guest
I am writing a C# application which is to call a DLL which another group in
the company I work for wrote for a Windows Application.
The functions in the DLL, which I am calling, are all prefaced with "FAR
PASCAL EXPORT".
In my application I have declared:
[DllImport(@("dll path and name")]
public static extern int AT_Devfice_Get_Status(int DeviceNumber);
..
..
..
serial = AT_Device_Get_Status(1);
..
..
..
Were I call the function, AT_Device_Get_Status(1), the function breeaks and
the message:
An unhandled exception of type 'System.NullRefernceException' occurred in
Vaprel.exe
Additional information: Object reference not set to an instance of an object.
I believe that this error or exception may be caused by the decleration of
the function in the C# code. I don't know how to declare the 'FAR PASCAL
EXTERN' in C#. How do I do this?
the company I work for wrote for a Windows Application.
The functions in the DLL, which I am calling, are all prefaced with "FAR
PASCAL EXPORT".
In my application I have declared:
[DllImport(@("dll path and name")]
public static extern int AT_Devfice_Get_Status(int DeviceNumber);
..
..
..
serial = AT_Device_Get_Status(1);
..
..
..
Were I call the function, AT_Device_Get_Status(1), the function breeaks and
the message:
An unhandled exception of type 'System.NullRefernceException' occurred in
Vaprel.exe
Additional information: Object reference not set to an instance of an object.
I believe that this error or exception may be caused by the decleration of
the function in the C# code. I don't know how to declare the 'FAR PASCAL
EXTERN' in C#. How do I do this?