迟
迟雨
Unregistered / Unconfirmed
GUEST, unregistred user!
C编写的DLL 中的函数定义extern "C" long __declspec(dllexport) Encode(PCHAR pSourceData,ULONG sourceLen , PCHAR pTagData, PULONG tagLen );在delphi中这么定义 function Encode(pSourceData
Char;sourceLen:LongWord;pTagData
Char;tagLen
LongWord):Integer;cdecl; external 'Encode.DLL' ;在delphi中使用procedure TForm1.Button2Click(Sender: TObject);var encode : array [0..127] of Char; pencode : PChar; i : LongWord;begin pencode := PChar(@encode) ; i := 128; Encode(PChar('aaa'),3,pencode,@i); Edit2.Text := encode;end;运行的时候报内存错误
![Stick Out Tongue :P :P](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f61b.png)
![Stick Out Tongue :P :P](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f61b.png)
![Stick Out Tongue :P :P](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f61b.png)