type TMyFunction = function(H: THandle;lpText: PWideChar;lpCaption: PWideChar;uType: Cardinal): Integer; if jj<>nil then TMyFunction(jj)(0,'123','12',MB_OK);不过我试过了,根本没有加载进user32,所以不会出来
可以出来的,因为是区分大小写的 MessageBoxW 就可以了,你试试看了
type TMyFunction = function(H: THandle;lpText: PWideChar;lpCaption: PWideChar;uType: Cardinal): Integer;procedure TForm1.Button1Click(Sender: TObject); var jj: FarProc; begin jj := GetProcAddress(getmodulehandle('user32'),'MessageBoxW'); if jj<>nil then TMyFunction(jj)(0,'123','12',MB_OK); end;
TMyFunction = function(H: THandle;lpText: PWideChar;lpCaption: PWideChar;uType: Cardinal): Integer;
if jj<>nil then
TMyFunction(jj)(0,'123','12',MB_OK);不过我试过了,根本没有加载进user32,所以不会出来
MessageBoxW
就可以了,你试试看了
TMyFunction = function(H: THandle;lpText: PWideChar;lpCaption: PWideChar;uType: Cardinal): Integer;procedure TForm1.Button1Click(Sender: TObject);
var
jj: FarProc;
begin
jj := GetProcAddress(getmodulehandle('user32'),'MessageBoxW');
if jj<>nil then
TMyFunction(jj)(0,'123','12',MB_OK);
end;
老兄,你一定是位高人,以后多多向你学习才是!