I have a VFP8 project that I compiled into a Multithreaded COM server DLL. I am then adding this DLL as a Reference in a C#.NET project, and calling a function from it. This has been working as expected on WinXP and Win2000. Recently, I tried it on Windows 2003 Server, and the call to the function in COM dll fails. I get the error message: "Object reference not set to an instance of an object." I'm not sure if this is a VFP issue or a .NET issue, but thought perhaps someone else here has run into this, and has some suggestions.
I can't think of any security or firewall issues, as this is all running on the same machine. And I'm pretty sure I have all the files needed, because when I transfer the same files to an XP or W2k machine, it works. The DLL also registered successfully on the Windows 2003 Server.
Here is my VFP code:
On the .NET side, the code is simple, too:
Many thanks,
-sl
I can't think of any security or firewall issues, as this is all running on the same machine. And I'm pretty sure I have all the files needed, because when I transfer the same files to an XP or W2k machine, it works. The DLL also registered successfully on the Windows 2003 Server.
Here is my VFP code:
Code:
DEFINE CLASS SysWrapper as session olepublic
FUNCTION TEST
return "abc"
ENDFUNC
ENDDEFINE
On the .NET side, the code is simple, too:
Code:
using myDll;
myDll.SysWrapperClass myObj = new myDll.SysWrapperClass();
string s = (string) myObj.TEST();
Console.WriteLine(s);
Many thanks,
-sl