Hi. I'm wonder if any one has any ideas why eax always return NULL
Heres some of the resource script
RANGE RGN DISCARDABLE "bg.rgn"
And heres some of the code related to it.
.data
RsrcName db 'RANGE',0
RsrcType db 'RGN',0
RsrcHand dd 0
RsrcSize dd 0
RsrcPoint dd 0
.code
;Find the resource handle
invoke FindResource, hWnd, addr RsrcName,addr RsrcType
mov RsrcHand, eax
;Load the resource data
invoke LoadResource,hWnd,eax
mov RsrcPoint, eax
;Get the total size of the resource
invoke SizeofResource,hWnd,RsrcHand
mov RsrcSize, eax
;Get a valid pointer to the data
invoke LockResource,RsrcPoint
mov RsrcPoint, eax
eax always returns NULL when findresource is called, but the rc seems to compile fine.
In case you haven't yet noticed this is all based Complex Dialog Shape in win32asm by TiTi.
Sorry, but this is typical isn't it, you spend ages fiddleing around with values, you eventually decid to post a question and then the first thing that occurs to you afterwards solves it.
In this case I shouldn't have been passing hWnd to the calls, rather hInst