我写下主要代码;delphi dll代码:
type 
   Tstudent =record
    name : pchar;
    age : integer;
end;function to_student(ctemp : pchar) : Tstudent;stdcall;
var student : Tstudent;
begin
  if ctemp='aa' then
     begin
        student.name:=pchar('aa');
        student.age=20;
        result:=student;     
     end;
end;
exports to_student;vb调用代码:
private type Tstudent
   name as string
   age as integer
end typeprivate declare function lib "aa.dll" (byval ctemp as string) as Tstudent
但就是返回不了结构结数据。大家出出注意吧。