Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing an FLL
Message
From
01/09/2005 17:19:47
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01046026
Message ID:
01046035
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform