Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing an FLL
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Accessing an FLL
Versions des environnements
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01046026
Message ID:
01046026
Vues:
97
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform