0

I have a COM object developed in C# which will be consumed in VFP. The object can be loaded by the vfp project on the dev system, by copying the c# dll into the vfp project's main directory, and registering it. I am running the vfp project installed rather than in the vfp environment. In other words, vfp is not open on my dev system, but vs2010 is.. However, the dll project obviously is not being run.

When I move to the test machine, which has neither vfp nor vs, drop in the dll, register it, and try running, nothing happens. Unfortunately, no errors are generated in vfp, and I cannot make changes to the vfp code.

Is there some trick that I need to do before a COM object will run on a system, or some type of registration that VS may have done with the dll on the dev system?

Thank you for any assistance. It is greatly appreciated.

Tim
  • 2,731
  • 9
  • 35
  • 72

3 Answers3

1

This most likely thing is that you're missing dependencies. Can you create and use the object from jscript? you can create a text file in the cmd.exe console and run it directly on most versions of windows (save this text file with a .js file extension);

var x = new ActiveXObject("YourProject.YourCOMServerName");
x.YourSimpleMethod();

WScript.Echo("done");

that will remove VFP from the equation and see if your COM DLL will load at all and might give you a clue as to where to look next.

cirrus
  • 5,624
  • 8
  • 44
  • 62
0

I have a similar situation. I have to register my COM Server (as an Administrator):

$cd <directory containing COM server>
$com.exe /regserver
Jim Lahman
  • 2,691
  • 2
  • 25
  • 21
0

Silly question but is the correct .net framework installed on the test machine? Might be nothing to do with VFP at all.

Might also be worth taking a look at http://msdn.microsoft.com/en-us/library/aa645738%28v=vs.71%29.aspx and Creating a COM Automation Server in C#

Community
  • 1
  • 1
Caltor
  • 2,538
  • 1
  • 27
  • 55