Could anybody help me with code for manipulating resource files? I need to extract files/icons (which I added into my resource file) when my program is executed.

Thanks
Posted on 2003-07-14 08:35:32 by triforce
LoadResource
Posted on 2003-07-14 08:53:39 by roticv
Sorry I dont think my explanation was good enough :-/ I have added an exe into my resource file, and I need to extract it and then write it to a file.
Posted on 2003-07-14 09:21:54 by triforce
What type of resource you mean?
Posted on 2003-07-14 10:55:12 by roticv
invoke CreateFile,addr fileName,GENERIC_READ OR GENERIC_WRITE,FILE_SHARE_READ OR FILE_SHARE_WRITE,0,CREATE_NEW,FILE_ATTRIBUTE_NORMAL,0
.if eax!=INVALID_HANDLE_VALUE
mov hFile,eax
invoke FindResource,0,2000,RT_RCDATA
mov ebx,eax
invoke LoadResource,0,eax
mov hLib,eax
invoke SizeofResource,0,ebx
invoke WriteFile,hFile,hLib,eax,addr BytesWritten,0
invoke CloseHandle,hFile
.endif
Posted on 2003-07-14 11:59:56 by x-dream