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_NEUTRAL,reslock,hsize
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/index.php?topic=2417&highlight=how+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...
Hope, somebody can help me....
greetings elcudzias
Posted on 2003-02-12 11:56:59 by elcudzias
I forget one question :)

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

greetings elcudzias
Posted on 2003-02-12 12:03:39 by elcudzias