mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 16:28:24 +02:00
* Forgot to add winres.inc in previous commit.
git-svn-id: trunk@1211 -
This commit is contained in:
parent
3b95cb7259
commit
2228532373
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4317,6 +4317,7 @@ rtl/wince/wininc/messages.inc -text
|
||||
rtl/wince/wininc/redef.inc -text
|
||||
rtl/wince/wininc/struct.inc -text
|
||||
rtl/wince/wininc/unidef.inc -text
|
||||
rtl/wince/winres.inc -text
|
||||
rtl/x86_64/int64p.inc svneol=native#text/plain
|
||||
rtl/x86_64/makefile.cpu -text
|
||||
rtl/x86_64/math.inc svneol=native#text/plain
|
||||
|
45
rtl/wince/winres.inc
Normal file
45
rtl/wince/winres.inc
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
function SysFindResource(hModule:HMODULE; lpName: PWideChar; lpType: PWideChar):TResourceHandle; external 'coredll' name 'FindResourceW';
|
||||
function SysLoadResource(hModule:HMODULE; hResInfo: TResourceHandle):HGLOBAL; external 'coredll' name 'LoadResource';
|
||||
function SysSizeofResource(hModule:HMODULE; hResInfo:TResourceHandle):DWORD; external 'coredll' name 'SizeofResource';
|
||||
|
||||
Function HINSTANCE: HMODULE;
|
||||
begin
|
||||
Result:=sysinstance;
|
||||
end;
|
||||
|
||||
Function FindResource(ModuleHandle: HMODULE; ResourceName, ResourceType: PChar): TResourceHandle;
|
||||
var
|
||||
ws1, ws2: PWideChar;
|
||||
begin
|
||||
ws1:=PCharToPWideChar(ResourceName);
|
||||
ws2:=PCharToPWideChar(ResourceType);
|
||||
Result:=SysFindResource(ModuleHandle, ws1, ws2);
|
||||
FreeMem(ws2);
|
||||
FreeMem(ws1);
|
||||
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:=pointer(ResData);
|
||||
end;
|
||||
|
||||
Function UnlockResource(ResData: HGLOBAL): LongBool;
|
||||
begin
|
||||
UnlockResource := True;
|
||||
end;
|
||||
|
||||
Function FreeResource(ResData: HGLOBAL): LongBool;
|
||||
begin
|
||||
FreeResource := True;
|
||||
end;
|
Loading…
Reference in New Issue
Block a user