unit
acWorkRes;
interface
uses
Windows;
function
BeginUpdateResourceW (fileName :
PWideChar
;
delExistingRes : bool ) : dword; stdcall;
function
EndUpdateResourceW (update : dword;
discard : bool ) : bool; stdcall;
function
UpdateResourceW (update : dword;
type_ :
PWideChar
;
name :
PWideChar
;
language :
word
;
data :
pointer
;
size : dword ) : bool; stdcall;
function
BeginUpdateResourceS(
const
Filename:
String
;
const
delExistingRes:
Boolean
): DWORD; stdcall;
function
ReplaceIconGroupResourceS(
const
hUpdate: DWORD;
const
Name:
PChar
;
const
Language:
Word
;
const
IconFile:
String
):
Boolean
; stdcall;
function
EndUpdateResource(
const
hUpdate: DWORD;
const
Discard:
Boolean
):
Boolean
; stdcall;
function
GetResourceW (update : dword;
type_ :
PWideChar
;
name :
PWideChar
;
language :
word
;
var
data :
pointer
;
var
size : dword ) : bool; stdcall;
type
TPIconGroup = ^TIconGroup;
TIconGroup =
packed
record
reserved :
word
;
type_ :
word
;
itemCount :
word
;
items :
array
[
0..
maxInt
shr
4
-
1
]
of
packed
record
width :
byte
;
height :
byte
;
colors :
byte
;
reserved :
byte
;
planes :
word
;
bitCount :
word
;
imageSize : dword;
id :
word
;
end
;
end
;
TPIcoHeader = ^TIcoHeader;
TIcoHeader =
packed
record
reserved :
word
;
type_ :
word
;
itemCount :
word
;
items :
array
[
0..
maxInt
shr
4
-
1
]
of
packed
record
width :
byte
;
height :
byte
;
colors :
byte
;
reserved :
byte
;
planes :
word
;
bitCount :
word
;
imageSize : dword;
offset : dword;
end
;
end
;
function
GetIconGroupResourceW (update : dword;
name :
PWideChar
;
language :
word
;
var
iconGroup : TPIconGroup) : bool; stdcall;
function
SaveIconGroupResourceW (update : dword;
name :
PWideChar
;
language :
word
;
icoFile :
PWideChar
) : bool; stdcall;
function
LoadIconGroupResourceW (update : dword;
name :
PWideChar
;
language :
word
;
icoFile :
PWideChar
) : bool; stdcall;
function
DeleteIconGroupResourceW (update : dword;
name :
PWideChar
;
language :
word
) : bool; stdcall;
function
SaveBitmapResourceW (update : dword;
name :
PWideChar
;
language :
word
;
bmpFile :
PWideChar
) : bool; stdcall;
function
LoadBitmapResourceW (update : dword;
name :
PWideChar
;
language :
word
;
bmpFile :
PWideChar
) : bool; stdcall;
var
notLang:
Boolean
=
False
;
function
GetImageNtHeaders(module: dword) : PImageNtHeaders;
function
IntToHexEx(value :
integer
;
minLen :
integer
=
1
;
fillChar :
char
=
'0'
) :
string
; overload;
function
SaveIconGroupResource(update: dword;
name:
PWideChar
;
icoFile:
PWideChar
) : bool; stdcall;
function
GetNameIcon(update: dword; ind:
Integer
) :
WideString
; stdcall;
implementation
<опущено
30
Кб>
end
.