谁有能用的vc和delphi的程序 发给我一份好吗?谢谢
上面的静态调用,我是知道的
procedure msg( str:pchar); stdcall; external 'dll.dll' name msg ;
但是我这样了
不行 cdecl我也试了 不是调用惯例的问题
另外,动态也不好用
type
pro=procedure(msg:PChar);stdcall;
var
int:integer;
say:pro;
begin
int := 0;
int := LoadLibrary('dll.dll');
// if Assigned(GetProcAddress(int, 'msg')) then ShowMessage('成功');
if int <> 0 then
begin
@say := GetProcAddress(int, 'msg');
say();
FreeLibrary(int);
end
end.