mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:49:20 +02:00
Forgot to add the Win32 resources implementation
git-svn-id: trunk@1014 -
This commit is contained in:
parent
7184d30fc1
commit
7f6f283011
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4179,6 +4179,7 @@ rtl/win32/varutils.pp svneol=native#text/plain
|
|||||||
rtl/win32/video.pp svneol=native#text/plain
|
rtl/win32/video.pp svneol=native#text/plain
|
||||||
rtl/win32/wcygprt0.as -text
|
rtl/win32/wcygprt0.as -text
|
||||||
rtl/win32/wdllprt0.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/wincrt.pp svneol=native#text/plain
|
||||||
rtl/win32/windows.pp svneol=native#text/plain
|
rtl/win32/windows.pp svneol=native#text/plain
|
||||||
rtl/win32/winevent.pp svneol=native#text/plain
|
rtl/win32/winevent.pp svneol=native#text/plain
|
||||||
|
48
rtl/win32/win32res.inc
Normal file
48
rtl/win32/win32res.inc
Normal 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;
|
Loading…
Reference in New Issue
Block a user