Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing an FLL
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Accessing an FLL
Environment versions
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01046026
Message ID:
01046026
Views:
98
Hi all,

Is it possible to access an FLL from C#? Here's what I have right now:
public class CodeMine
{
	[DllImport(@"C:\Old Drive\CM\Common50\CodeMine.fll", EntryPoint="@DispatchAPI@4")]
	public static extern int cmGetFLLVersion();
}
Then, in a method of another class (in the same namespace, I have:
// The next line throws the error.
int version = CodeMine.cmGetFLLVersion();
MessageBox.Show(version.ToString());
I get:
An unhandled exception of type 'System.NullReferenceException' occurred in ActiveDirectory.exe

Additional information: Object reference not set to an instance of an object.
on the line where I have the comment.

I've also tried taking the static declaration off of the CodeMine class, but then I get a compiler error stating the method must be declared static extern.

Anyone?

TIA,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Next
Reply
Map
View

Click here to load this message in the networking platform