Did anyone try to load a dialog box resource from a program instance into memory? If so, can help me?
Dr.Golova
May 2nd, 2001, 07:30
Hi, this code ripped from PE Encrypter - it use DialogBox loaded directly from memory.
lea ecx,[ebp+DlgTemplate]
lea edx,[ebp+DlgProc]
push ebp
call [ebp+_CreateDialogIndirectParamA],eax,ecx,0,edx,WM_USER
[skip]
DlgTemplate dd WS_SYSMENU or WS_CAPTION or WS_VISIBLE or DS_3DLOOK or DS_MODALFRAME or WS_POPUP or DS_CENTER
dw 0,0,1 ; num of items
dw 100,100,100,20 ; x,y,dx,dy
dw 0,0 ; menu & class
db 'E',0,'n',0,'t',0,'e',0,'r',0,' ',0,'P',0,'a',0,'s',0,'s',0,'w',0,'o',0,'r',0,'d',0,0,0 ; the title of the dialog
@wordalign Addon,0
dd ES_PASSWORD or ES_LEFT or WS_VISIBLE or WS_CHILD or WS_BORDER or ES_AUTOHSCROLL
dd 0 ; ext. style
dw 5,5,90,8 ; x,y,dx,dy
dw 1 ; control id
dw 0ffffh, 81h ; class id = "edit"
db 0,0 ; edit text
Thanks a lot,
But my assembly language knowledge is not so good: don't you know where I can find the same example but written in C language?
I'm more expert in writing program usin' the C and the API.
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.