So as the title says...
is there any linker directive to do so?
because sometimes I feel lazy to update resources through the source code...
especially, if I just want a quick dirty hack for resource layout inside my assembled program... :P
Hi Dubby,
Not sure if it helps but, you can try Yaroslav's resource linker :
http://c--sphinx.narod.ru/indexe.htm
Here is a quick example :
#include "Dlgbox.inc"
.data
DlgName db "MyDialog",0
hInstance dd ?
CommandLine dd ?
hCursor dd ?
.code
start:
invoke GetModuleHandle,0
mov [hInstance],eax
invoke DialogBoxParam,[hInstance],ADDR DlgName,0,ADDR DlgProc,0
invoke ExitProcess,eax
DlgProc FRAME hWnd,uMsg,wParam,lParam
cmp d[uMsg],WM_CLOSE
jne >initdlg
invoke EndDialog,[hWnd],0
jmp >true
initdlg:
cmp d[uMsg],WM_INITDIALOG
jne >setcursor
invoke LoadCursor,0,IDC_CROSS
mov [hCursor],eax
jmp >true
setcursor:
cmp d[uMsg],WM_SETCURSOR
jne >false
invoke SetCursor,[hCursor]
jmp >true
false:
xor eax,eax
ret
true:
mov eax,1
ret
ENDF
\goasm\gorc /r rsrc.rc
\goasm\goasm Dlgbox.asm
\goasm\golink Dlgbox.obj kernel32.dll user32.dll
rl.com Dlgbox.exe rsrc.res /a
Thanks alot Vortex...
but looks like it's only work on x86 platform only....
but anyway thanks for the link.... :biggrin:
Not sure but it would be interesting to try a tool like Resource Hacker to accomplish the task.