hi
as I can merge a selected icon into my resource with this algo
.386
.model flat,stdcall
option casemap:none
include windows.inc
include kernel32.inc
includelib kernel32.lib
.data
szTargetExe db 'test.exe',0
szTargetFile db 'main.ico',0
hMod dd 0
hFile dd 0
dwSize dd 0
.code
start:
invoke CreateFile, ADDR szTargetFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0
test eax,eax
js _exit
mov hFile,eax
invoke GetFileSize, eax, 0
mov dwSize,eax
invoke CloseHandle, hFile
invoke BeginUpdateResource, ADDR szTargetExe, 0
or eax,eax
jz _exit
mov hMod,eax
invoke UpdateResource, eax, RT_GROUP_ICON, 100, 0, addr szTargetFile, dwSize
invoke EndUpdateResource, hMod, 0
_exit:
invoke ExitProcess, 0
end start
ragdog
can none help me with this problem?
:'(
before ask the question, you have better to search the forum.
if everyone asks the same question, what's happen will be ? the information will be exploded.
http://www.masm32.com/board/index.php?topic=6168.msg46063#msg46063
thanks
I would like not from a selected exe file! I want from a separate icon file *.ico
Hope this helps, MichaelW's drive activity utility, it deals with switching between icons while a program is running.
http://www.masm32.com/board/index.php?topic=4163.msg31130#msg31130
It switches between icons to display disk activity, runs in the system tray.
i have a small source found in c++ can your help to translate in masm?
thanks in forward
ragdog
[attachment deleted by admin]
ragdog,
Here is a quick demo uptading the icon of an executable :
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\macros\macros.asm
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
.data
include rsrc.inc
.data?
hUpdateRes dd ?
.code
start:
fn BeginUpdateResource,"Msgbox.exe",FALSE
mov hUpdateRes,eax
fn UpdateResource,eax,RT_ICON,1,1033,ADDR res_icon,02E8h
fn UpdateResource,hUpdateRes,RT_GROUP_ICON,100,1033,ADDR res_group_icon,014h
fn EndUpdateResource,hUpdateRes,FALSE
fn ExitProcess,NULL
END start
[attachment deleted by admin]
thanks to all
this example have I already!
I would like c++ the example in masm32
if their there further could help me
ragdog
RagDog,
Actually, the example posted by Vortex does exactlyy what you requested. All you need to do is convert the .ico file to a data dump. I will, however take a peek at your C++ example.
Paul