News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

A new colib needing to be improve

Started by ToutEnMasm, July 17, 2009, 02:22:36 PM

Previous topic - Next topic

ToutEnMasm

I try to simplify and update the colib.
I use list of CLSID (terminate by zero) + list of interface IID to do that
This need to modify the  DllGetClassObject and IClassFactory to do that
Lance is the one who register and load the dll.

Major modifies has been made
     ******* list of clsid and IID as in previous post (easy to do)
     ******* Use regedit files to create the CLSIDS , you have just to create them with regedit and export the keys ( if further clsid , just copy them to one file)
Registering of interfaces is done by register of the typelib (only CLSID need that)
     ******* use the headers of the sdk translate

Begin by rebuild the library,then the  mycom2 and last lance (the executable).No need of register,this is done by the exe

Corrections has been made in the new zip



[attachment deleted by admin]

ToutEnMasm

#1

This has been modified in the upper zip
*** I have forgotten to put a data section in the lance.asm
***in queryinterface of the common .asm
Quote
   invoke IsEqualGUID,pIID,edi     
   .if eax == 0      ;not egal
      add edi,sizeof GUID           ;esi need to be replace by edi
**** The Iunknown interface must be rewrite only for the common.asm file and Mycom2
         just add a "a"  to the interface functions and modify the implementation of them ...

With this modifies , you can have a "bonjour" from the server
I will post the modifies code later




baltoro

FABULOUS! I'd never even heard of Ernest Murphy and colib. Thanks.
Baltoro

ToutEnMasm


Major modifies has been made
     ******* list of clsid and IID as in previous post (easy to do)
     ******* Use regedit files to create the CLSIDS , you have just to create them with regedit and export the keys ( if further clsid , just copy them to one file)
Registering of interfaces is done by register of the typelib (only CLSID need that)
     ******* use the headers of the sdk translate

There is enough here to made a fully fonctionnal server

Not all of the sources codes have been rewrite,This will be done soon


ToutEnMasm


I have searched a long time something enough simpler and shorter to explain how to use existing com interface and how to create a simple one.
I found only many and many text and html pages.
this download ,i hope,will correct this.


[attachment deleted by admin]

BasilYercin

hi i wrote this small sample
that uses sIID_IAccessible                  TEXTEQU <{618736e0H, 03c3dH, 011cfH, {081H, 00cH, 000H, 0aaH, 000H, 038H, 09BH, 071H}}>

i can't find yet another sample i wrote on witch i had to transform coinvoke in order to pass :REAL8 as an argument

[attachment deleted by admin]

ToutEnMasm


To have translated the entire SDK interfaces , I can say you that it is not the single one who need that.
The prototypes defined by masm32 use only DWORD (a qword = 2 dword)
The "ready to use sdk" use prototypes with the same size as in the sdk.
The IAccessible interface is just one sample that need prototypes with other things than only dword



Quote
IAccessible_get_accChild TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accChild TYPEDEF PTR  IAccessible_get_accChild

IAccessible_get_accName TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accName TYPEDEF PTR  IAccessible_get_accName

IAccessible_get_accValue TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accValue TYPEDEF PTR  IAccessible_get_accValue

IAccessible_get_accDescription TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accDescription TYPEDEF PTR  IAccessible_get_accDescription

IAccessible_get_accRole TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accRole TYPEDEF PTR  IAccessible_get_accRole

IAccessible_get_accState TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accState TYPEDEF PTR  IAccessible_get_accState

IAccessible_get_accHelp TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accHelp TYPEDEF PTR  IAccessible_get_accHelp

IAccessible_get_accHelpTopic TYPEDEF  PROTO :DWORD ,:DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accHelpTopic TYPEDEF PTR  IAccessible_get_accHelpTopic

IAccessible_get_accKeyboardShortcut TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accKeyboardShortcut TYPEDEF PTR  IAccessible_get_accKeyboardShortcut

IAccessible_get_accDefaultAction TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_get_accDefaultAction TYPEDEF PTR  IAccessible_get_accDefaultAction

IAccessible_accSelect TYPEDEF  PROTO :DWORD ,:DWORD ,:VARIANT
FIAccessible_accSelect TYPEDEF PTR  IAccessible_accSelect

IAccessible_accLocation TYPEDEF  PROTO :DWORD ,:DWORD ,:DWORD ,:DWORD ,:DWORD ,:VARIANT
FIAccessible_accLocation TYPEDEF PTR  IAccessible_accLocation

IAccessible_accNavigate TYPEDEF  PROTO :DWORD ,:DWORD ,:VARIANT ,:DWORD
FIAccessible_accNavigate TYPEDEF PTR  IAccessible_accNavigate

IAccessible_accDoDefaultAction TYPEDEF  PROTO :DWORD ,:VARIANT
FIAccessible_accDoDefaultAction TYPEDEF PTR  IAccessible_accDoDefaultAction

IAccessible_put_accName TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_put_accName TYPEDEF PTR  IAccessible_put_accName

IAccessible_put_accValue TYPEDEF  PROTO :DWORD ,:VARIANT ,:DWORD
FIAccessible_put_accValue TYPEDEF PTR  IAccessible_put_accValue

   STIAccessible   STRUCT
      QueryInterface                  comethod3 ?
      AddRef                          comethod1 ?
      Release                         comethod1 ?
      GetTypeInfoCount                comethod2 ?
      GetTypeInfo                     comethod4 ?
      GetIDsOfNames                   comethod6 ?
      invoke1                         comethod9 ?
      get_accParent                   comethod2 ?
      get_accChildCount               comethod2 ?
      get_accChild      FIAccessible_get_accChild  ?
      get_accName      FIAccessible_get_accName  ?
      get_accValue      FIAccessible_get_accValue  ?
      get_accDescription      FIAccessible_get_accDescription  ?
      get_accRole      FIAccessible_get_accRole  ?
      get_accState      FIAccessible_get_accState  ?
      get_accHelp      FIAccessible_get_accHelp  ?
      get_accHelpTopic      FIAccessible_get_accHelpTopic  ?
      get_accKeyboardShortcut      FIAccessible_get_accKeyboardShortcut  ?
      get_accFocus                    comethod2 ?
      get_accSelection                comethod2 ?
      get_accDefaultAction      FIAccessible_get_accDefaultAction  ?
      accSelect      FIAccessible_accSelect  ?
      accLocation      FIAccessible_accLocation  ?
      accNavigate      FIAccessible_accNavigate  ?
      accHitTest                      comethod4 ?
      accDoDefaultAction      FIAccessible_accDoDefaultAction  ?
      put_accName      FIAccessible_put_accName  ?
      put_accValue      FIAccessible_put_accValue  ?
   STIAccessible   ENDS

IAccessible MACRO  Function:REQ, args:VARARG
   ; definition de la macro locale InvokeInterface
    LOCAL InvokeInterface, arg
    FOR arg, <args>     ;verifier que edx n'est pas dans la liste d'arguments args
        IFIDNI <&arg>, <edx>   ;
            .ERR <edx is not allowed as a coinvoke parameter>
        ENDIF
    ENDM
    IFIDNI <&pInterface>, <edx>
        .ERR <edx is not allowed as a coinvoke parameter>
    ENDIF
   ;InvokeInterface = concatene ...CATSTR(concatene) MACRO instruction MASM32   
   ;---------- on doit mettre ppv en premier argument -----------------------------------
    InvokeInterface CATSTR <invoke (STIAccessible PTR[edx]).>,<&Function,ppvIAccessible>
    IFNB <args>     ; add the list of parameter arguments if any
        InvokeInterface CATSTR InvokeInterface, <, >, <&args>
    ENDIF
   ;   forme les lignes de codes
    mov edx, ppvIAccessible
    mov edx, [edx]
    InvokeInterface
ENDM