HANDLE USER_API dc_init_name (short port,
Int baud,
Const char * name
)
DLL development documents described above, I how should be stated in Delphi, beginners, I stated below, always unsuccessful
The function dc_init_name (Port: Shortint; Baud: integer; Icdevname: Pointer) : integer; Stdcall;//initialize serial port
Procedure TForm1. Button2Click (Sender: TObject);
Var
Icdev: integer;
Const
Testname: array [0.. 64] of char='abcd';
The begin
Icdev:=dc_init_name (100, 0, @ testname);
Showmessage (inttostr (icdev));
end;
CodePudding user response:
The function dc_init_name (port: SmallInt, Baud: integer; Name: PAnsiChar) : THandle; Stdcall; External 'XXX. DLL';How to define whether stdcall depends on USER_API
CodePudding user response:
Const char * name is don't know how to define the parameters, and don't know how toCodePudding user response:
The function dc_init_name (port: SmallInt, Baud: integer; Const name: PAnsiChar) : THandle; Stdcall; External 'XXX. DLL';CodePudding user response:
Thank the great god upstairs, do you have done IC development?