I post this question some days ago, but nobody helped me, so I try it once again: :confused:

Maybe it?s a beginner question, but it doesn`t really reference to Iczelion's tutorials, so that I post my question here...
I want to write a small programm which changes the icongroup of an *.exe (win32). So I tried this:

.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib

fn db 'target.EXE',0
oname db 'thisprogram.EXE',0

datf WIN32_FIND_DATA <>
fileh db ?
resh db ?
resload db ?
reslock db ?
upres db ?
hsize db ?

invoke LoadLibrary,offset oname
mov dword ptr ,eax
invoke FindResource,fileh,'*',RT_GROUP_ICON
mov dword ptr ,eax
invoke LoadResource,fileh,resh
mov dword ptr ,eax
invoke LockResource,resh
mov dword ptr ,eax
invoke BeginUpdateResource,offset datf.cFileName,0
mov dword ptr ,eax
invoke SizeofResource,fileh,resh
mov dword ptr ,eax
invoke UpdateResource,upres,RT_GROUP_ICON,'*',LANG_NEUTRA
invoke EndUpdateResource,upres,0
invoke ExitProcess,0
end Start

And to make it short: it doesn?t work, the icongroup of the target.exe isn?t changed. Is it a programming or thinking mistake?
I would be also happy, if somebody can send me an appropriate tutor or sample....
I find an interesting topic in this forum (http://www.asmcommunity.net/board/...+to+change+icon) but as a consequence of a virus alert the main parts seem to be deleted. So I wasn?t able to find the described sample of max, for example...

By the way: The updateresource apis are limited to NT, so what can I do in win95?? are there some equal procedures?

Hope, somebody can help me....
greetings elcudzias
Posted on 2003-02-15 03:33:22 by elcudzias