我用下面的方法可以动态返回ReadInt的值了,但不能将值写到WriteArray并得到返回值,请问我应该如何写程序,我C++是这样写的:#include "stdafx.h"class ArrayUnit
{
public :
ArrayUnit()
{
a = 0;
memset (b,0,20);
c =9;
};
int a;
char b[20];
long c;
};bool WriteArray(char * arraytest,long arraytestLen);
int ReadInt();我试写如下:
Type
   Tperson=record
      a:integer;
      b:array[1..20]of string;
      c:integer;
    end;
    TOpenConnection = Function(dwPort: Tperson;xx:integer): Tperson; stdcall;
   //不知这里的dwPort: Tperson是否设置正确
var
    DLLInstance:THandle;
    PFunc: TFarProc;
    test: Tperson;
    xx:integer;
begin
    DLLInstance := LoadLibrary('DllArrayTest.dll');
    PFunc := GetProcAddress(DLLInstance,'WriteArray');
    test.a := 1;
    test.b[1] := '1321';
    test.c := 4;
    if @PFunc <> Nil then
    begin
//       pFunc(test,100);//请问这里怎么调用
    end;
end;请问如果不这样写应该怎么写