flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to acces to the Ole properties |
Author |
|
kidscracker 30 Oct 2004, 23:01
i'm looking for some information about how to create and acces to OLE OBJECTS and browse webpages in my application thx
|
|||
30 Oct 2004, 23:01 |
|
comrade 30 Oct 2004, 23:46
It would be very hard with assembly.
I attach an example in pure C (no C++) and MASM.
|
|||||||||||||||||||||
30 Oct 2004, 23:46 |
|
comrade 02 Nov 2004, 18:26
those aren't my examples
|
|||
02 Nov 2004, 18:26 |
|
kidscracker 02 Nov 2004, 22:21
Well Anyway, you gave those examples, so i thank U,
|
|||
02 Nov 2004, 22:21 |
|
vbVeryBeginner 19 Dec 2004, 04:19
hi, i try to convert the browser MASM code into FASM version
i don't know which part i might get wrong, coz i couldn't find it upon execution, it coz stack fault but the application is able to display the requested webpage normally. Code: BROWSER caused a stack fault in module SHLWAPI.DLL at 0137:70bd3381. Registers: EAX=00534750 CS=0137 EIP=70bd3381 EFLGS=00010246 EBX=00000000 SS=013f ESP=00531ee0 EBP=00532310 ECX=00532108 DS=013f ESI=70e91308 FS=3a87 EDX=d205228c ES=013f EDI=00000104 GS=0000 Bytes at CS:EIP: 57 56 53 8d 8d d0 fb ff ff ff 75 0c e8 68 e9 ff Stack dump: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Code: format PE GUI 4.0 include '%fasminc%\win32a.inc' entry start IDD_DIALOG1 equ 101 IDC_WBR1 equ 1001 WBM_NAVIGATE equ WM_USER+100 section '.data' data readable writeable wndClsName db 'WB_DEMO',0 wndTitle db 'The Hello Program',0 wndCls WNDCLASSEX wndMsg MSG wbDllName db 'wbdll.dll',0 url1 db 'H:\sulaiman_v2\fasm\tut_24.html',0 rect RECT section '.sdata' readable shareable writeable insH dd ? cmdLine dd ? wbDllH dd ? wndH dd ? section '.code' code readable executable start: invoke GetModuleHandle,NULL mov [insH],eax invoke InitCommonControls invoke LoadLibrary,wbDllName mov [wbDllH],eax invoke GetCommandLine mov [cmdLine],eax mov [wndCls.cbSize],sizeof.WNDCLASSEX mov [wndCls.style],CS_HREDRAW + CS_VREDRAW mov [wndCls.lpfnWndProc],proc_window mov [wndCls.cbClsExtra],NULL mov [wndCls.cbWndExtra],DLGWINDOWEXTRA push [insH] pop [wndCls.hInstance] mov [wndCls.hbrBackground],COLOR_BTNFACE + 1 mov [wndCls.lpszMenuName],NULL mov [wndCls.lpszClassName],wndClsName invoke LoadIcon,NULL,IDI_APPLICATION mov [wndCls.hIcon],eax mov [wndCls.hIconSm],eax invoke LoadCursor,NULL,IDC_ARROW mov [wndCls.hCursor],eax invoke RegisterClassEx,wndCls invoke CreateDialogParam,[insH],IDD_DIALOG1,NULL,proc_window,NULL invoke ShowWindow,[wndH],SW_SHOWNORMAL invoke UpdateWindow,[wndH] window_message_loop_start: invoke GetMessage,wndMsg,NULL,0,0 or eax,eax je window_message_loop_end invoke TranslateMessage,wndMsg invoke DispatchMessage,wndMsg jmp window_message_loop_start window_message_loop_end: invoke FreeLibrary,[wbDllH] invoke ExitProcess,0 proc proc_window,hWnd,uMsg,wParam,lParam push ebx esi edi cmp [uMsg],WM_INITDIALOG je .wmINITDIALOG cmp [uMsg],WM_SIZE je .wmSIZE cmp [uMsg],WM_DESTROY je .wmDESTROY cmp [uMsg],WM_CLOSE je .wmCLOSE .wmDEFAULT: invoke DefWindowProc,[hWnd],[uMsg],[wParam],[lParam] jmp .wmBYE .wmINITDIALOG: mov eax,[hWnd] mov [wndH],eax invoke SendDlgItemMessage,[hWnd],IDC_WBR1,WBM_NAVIGATE,0,url1 jmp .wmBYE .wmSIZE: invoke GetClientRect,[hWnd],rect add [rect.top],30 sub [rect.bottom],30 invoke GetDlgItem,[hWnd],IDC_WBR1 mov edx,[rect.bottom] shr edx,1 invoke MoveWindow,eax,[rect.left],[rect.top],[rect.right],edx,TRUE jmp .wmBYE .wmCLOSE: invoke DestroyWindow,[hWnd] jmp .wmBYE .wmDESTROY: invoke PostQuitMessage,NULL jmp .wmBYE .wmBYE: pop edi esi ebx return endp section '.idata' import data readable library kernel32,'KERNEL32.DLL',\ user32, 'USER32.DLL',\ comctl32,'COMCTL32.DLL' include '%fasminc%\apia\Kernel32.inc' include '%fasminc%\apia\User32.inc' include '%fasminc%\apia\Comctl32.inc' section '.rsrc' resource from "browser.res" |
|||
19 Dec 2004, 04:19 |
|
vbVeryBeginner 19 Dec 2004, 04:21
files
|
|||||||||||
19 Dec 2004, 04:21 |
|
vid 19 Dec 2004, 12:17
Code: proc proc_window,hWnd,uMsg,wParam,lParam push ebx esi edi shouldn't there be some "enter" macro? |
|||
19 Dec 2004, 12:17 |
|
vbVeryBeginner 19 Dec 2004, 12:54
Code: WndProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM LOCAL rect:RECT i thought it is the same as below in my code Code:
section '.data' data readable writeable
rect RECT
by the way, i tried ur suggestion but the result still the same Code: proc proc_window,hWnd,uMsg,wParam,lParam rect RECT enter ... .wmSIZE: lea eax,[rect] invoke GetClientRect,[hWnd],eax add [rect.top],30 sub [rect.bottom],30 invoke GetDlgItem,[hWnd],IDC_WBR1 mov edx,[rect.bottom] shr edx,1 invoke MoveWindow,eax,[rect.left],[rect.top],[rect.right],edx,TRUE jmp .wmBYE |
|||
19 Dec 2004, 12:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.