Hello. I've noticed that when i use BeginUpdateResource\LoadIconGroupResource\EndUpdateResource, i was able to use it with an application built with the Borland Delphi stuff, it was without an icon (at least it seemed so - console application), but when i use it with a program that i made with assembly (MASM32), it doesn't work, BeginUpdateResource returns 0 and other functions don't work of course. It works if i add an icon to the original file and compile it, but it only works for example if i add 16x16 icons then i can only use loadicongroupresource with a 16x16 icon, not 32x32.. i was able to do that with the Delphi application i did yet the application didn't have any icon before i used the APIs.. Btw i am aware that these function only work under Windows NT family.
Can anyone tell me what should i do to make it work without the ASM exe having to have any icon resources?
Posted on 2003-08-30 20:18:24 by mrbrdo
I'm not sure about the answer to your problem but just as a pointer those functions can be used in Win9x if you load MSLU (Microsoft Layer for Unicode) I am working on an install manager that uses UpdateResource and it works perfectly in 98SE if you load MSLU. Just include
includelib unicows.lib -> must be the first includelib

includelib kernel32.lib
includelib user32.lib
includelib shell32.lib
includelib advapi32.lib
.
.
.

.data
szUniLib BYTE "unicows.dll",0
szNoLib BYTE "This application uses Unicode functions",13,10, \
"that require Microsoft Layer for Unicode",0

.code
LoadMSLU proc
LOCAL osvi :OSVERSIONINFO

mov osvi.dwOSVersionInfoSize,SIZEOF OSVERSIONINFO
invoke GetVersionEx,ADDR osvi
.IF osvi.dwPlatformId != VER_PLATFORM_WIN32_NT
invoke LoadLibrary,OFFSET szUniLib
.IF eax == NULL
invoke MsgBox,NULL,OFFSET szNoLib,NULL,MB_OK,1
invoke ExitProcess,0
.ENDIF
.ENDIF
ret
LoadMSLU endp
Posted on 2003-08-31 03:03:49 by donkey
donkey: Thanks! Actually i already use madRes (a unit for Delphi that enables the use of that functions under win9x), but i will still save this code, i might need it.
Anyway, if anyone knows about changing the icon of any size, post here.

MrBrdo
Posted on 2003-08-31 10:05:23 by mrbrdo