Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing an FLL
Message
De
01/09/2005 17:19:47
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01046026
Message ID:
01046035
Vues:
20
I don't think so. An FLL has Fox-specific hooks in it.

>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
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform