我被赋予了在Visual Studio 2010 C#中使用pfxlibn.dll的任务,我从中可以看出它是一个Powerflex库.http://pfxcorp.com/clib-fns.htm
我尝试了一些导入PclGetField函数的变体,例如:
[DllImport("pfxlibn.dll", SetLastError = true)]
public static extern void PclGetField(
Int32 iHandle,
Int32 iFieldNum,
[MarshalAs(UnmanagedType.LPStr)] string Date
);
[DllImport("pfxlibn.dll",
CallingConvention = CallingConvention.StdCall,
CharSet = CharSet.Ansi,
EntryPoint = "PclGetField")]
public static extern int PclGetField(Int32 iHandle, Int32 iFieldNum, string Data)
[DllImport("pfxlibn.dll", EntryPoint = "PclGetField",
ExactSpelling = true,
CharSet = CharSet.Ansi,
CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 PclGetField(Int32 iHandle, Int32 iFieldNum,[MarshalAs(UnmanagedType.VBByRefStr)] ref string input);
Run Code Online (Sandbox Code Playgroud)
到目前为止,上述都没有奏效.或以上的变化.
在Delphi中,代码看起来像
pTmpBuf : PChar;
iLastErr := PclGetField(fHandle,iField,pTmpBuf);
Run Code Online (Sandbox Code Playgroud)