procedure TForm1.Button1Click(Sender: TObject);
var
Linstance:Hmodule;
begin
Linstance:=LoadLibrary('c:/windows/system/cards.dll');
Image1.Picture.Bitmap.LoadFromResourceID(Linstance,2);
end;
我这么作为什么不行?一单击button就出现错误!
procedure TForm1.Button1Click(Sender: TObject);
var
Linstance:Hmodule;
begin
Linstance:=LoadLibrary('C:/WINNT/system32/cards.dll');
Image1.Picture.Bitmap.LoadFromResourceID(Linstance,2);
end;
奇怪的是LoadLibrary总是返回0?
procedure TForm1.Button1Click(Sender: TObject);
var
h:hwnd;
begin
h:=LoadLibrary('cards.dll');
// showerrormessage;
if h<>0 then
begin
image1.Picture.Bitmap.LoadFromResourceID(h,1);
FreeLibrary(h);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
h:hwnd;
begin
h:=LoadLibrary('C:/Windows/System/Cards.dll');
// showerrormessage;
if h<>0 then
begin
image1.Picture.Bitmap.LoadFromResourceID(h,1);
FreeLibrary(h);
end;
end;