如何動態的從dll中存取avi ( 积分: 20 )

  • 主题发起人 主题发起人 beyzhzj
  • 开始时间 开始时间
B

beyzhzj

Unregistered / Unconfirmed
GUEST, unregistred user!
我把res文件做在dll中,如何動態的從dll中存取avi?
var
dllHandle,resHandle,TmpHandle:THandle;
HRes: THandle;
Resource:PChar;
begin
dllHandle := LoadLibrary(PChar('Resource.dll'));//Resource.dll已經存在
resHandle:=FindResourceHInstance(dllHandle);
if resHandle> 0 then
begin
try
HRes:=FindResource(resHandle,PChar('waitavi'),'AVI');
if HRes>0 then
TmpHandle:= LoadResource(resHandle, HRes);
if TmpHandle>32 then
Resource:= LockResource(TmpHandle);
animate1.Resname:=Resource; //這一步有錯,但我不知道為甚麼?
except
showmessage('Error');
exit;
end;
end;
if Animate1.Active=False then
Animate1.Active:=True;
 
我把res文件做在dll中,如何動態的從dll中存取avi?
var
dllHandle,resHandle,TmpHandle:THandle;
HRes: THandle;
Resource:PChar;
begin
dllHandle := LoadLibrary(PChar('Resource.dll'));//Resource.dll已經存在
resHandle:=FindResourceHInstance(dllHandle);
if resHandle> 0 then
begin
try
HRes:=FindResource(resHandle,PChar('waitavi'),'AVI');
if HRes>0 then
TmpHandle:= LoadResource(resHandle, HRes);
if TmpHandle>32 then
Resource:= LockResource(TmpHandle);
animate1.Resname:=Resource; //這一步有錯,但我不知道為甚麼?
except
showmessage('Error');
exit;
end;
end;
if Animate1.Active=False then
Animate1.Active:=True;
 
DLL.gif
 
甚麼意思?能否說得清楚一些?
 
等了這麼久,真的沒人會嗎?
 
后退
顶部