Wiki Home

DLLMethod Parameter In Dot NET

Namespace: WIN_COM_API

06/01/2006 - Steven Blake When writing procedures/methods in VFP code for Automation and COM Servers for the first time, my .NET code could not "see" the parameters in methods. The object worked fine in VFP and Intellisense even prompted for the arguments. Here is my original VFP code:
      LPARAMETERS cSourcePath AS String, cTargetPath AS String

I rechecked that my methods and memvars were strong typed and then reviewed the help files. While I found no explicit instruction about placement, all the parameter examples where placed in parentheses on the PROCEDURE/FUNCTION declaration line, not on a separate command line. Apparently the compiler does not handle the command line alternative well because the following code allowed C# to "see" the missing parameters.
   PROCEDURE Import (cSourcePath AS String, cTargetPath AS String) AS VOID

Category C _ O _ M Category DotNet
( Topic last updated: 2006.06.01 11:28:13 AM )