* Forgot to add winres.inc in previous commit.

git-svn-id: trunk@1211 -
This commit is contained in:
yury 2005-09-27 18:23:23 +00:00
parent 3b95cb7259
commit 2228532373
2 changed files with 46 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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
View 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;