Forgot to add the Win32 resources implementation

git-svn-id: trunk@1014 -
This commit is contained in:
michael 2005-09-02 06:57:03 +00:00
parent 7184d30fc1
commit 7f6f283011
2 changed files with 49 additions and 0 deletions

1
.gitattributes vendored
View File

@ -4179,6 +4179,7 @@ rtl/win32/varutils.pp svneol=native#text/plain
rtl/win32/video.pp svneol=native#text/plain
rtl/win32/wcygprt0.as -text
rtl/win32/wdllprt0.as -text
rtl/win32/win32res.inc svneol=native#text/plain
rtl/win32/wincrt.pp svneol=native#text/plain
rtl/win32/windows.pp svneol=native#text/plain
rtl/win32/winevent.pp svneol=native#text/plain

48
rtl/win32/win32res.inc Normal file
View File

@ -0,0 +1,48 @@
function SysFindResource(hModule:HMODULE; lpName:Pchar; lpType:Pchar):TResourceHandle; external 'kernel32' name 'FindResourceA';
function SysLoadResource(hModule:HMODULE; hResInfo:TResourceHandle):HGLOBAL; external 'kernel32' name 'LoadResource';
function SysSizeofResource(hModule:HMODULE; hResInfo:TResourceHandle):DWORD; external 'kernel32' name 'SizeofResource';
function SysLockResource(hResData:HGLOBAL):Pointer; external 'kernel32' name 'LockResource';
function SysFreeResource(hResData:HGLOBAL):Longbool; external 'kernel32' name 'FreeResource';
Function HINSTANCE : HMODULE;
begin
Result:=sysinstance;
end;
Function FindResource(ModuleHandle: HMODULE; ResourceName, ResourceType: PChar): TResourceHandle;
begin
Result:=SysFindResource(ModuleHandle,ResourceName,ResourceType);
end;
Function LoadResource(ModuleHandle: HMODULE; ResHandle: TResourceHandle): HGLOBAL;
begin
Result:=SysLoadresource(ModuleHandle,Reshandle);
end;
Function SizeofResource(ModuleHandle: HMODULE; ResHandle: TResourceHandle): Integer;
begin
Result:=SysSizeofResource(ModuleHandle,Reshandle);
end;
Function LockResource(ResData: HGLOBAL): Pointer;
begin
Result:=SysLockResource(ResData);
end;
Function UnlockResource(ResData: HGLOBAL): LongBool;
begin
Result:=FreeResource(ResData);
end;
Function FreeResource(ResData: HGLOBAL): LongBool;
begin
Result:=SysFreeResource(ResData);
end;