Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Registry key REGISTRAR

Started by TouEnMasm, November 12, 2012, 06:35:03 PM

Previous topic - Next topic


This ATL feature need only a couple of IID and some defines to work.
Here is what you need to use it.
see msdn REGISTRAR for more information
   sCLSID_Registrar TEXTEQU <{44EC053AH,400Fh,11D0h,{9Dh,0CDh,00h,0A0h,0C9h,03h,91h,0D3h}}>
      sIID_IRegistrar TEXTEQU   <{044EC053Bh,0400Fh,011D0h,{09Dh,0CDh,000h,0A0h,0C9h,003h,091h,0D3h}}>
   CLSID_Registrar GUID sCLSID_Registrar
   IID_IRegistrar GUID sIID_IRegistrar   
   wregistry dw "R","E","G","I","S","T","R","Y",0
   wmodulefilename dw MAX_PATH dup(0)
ppvIRegistrar dd 0
   invoke CoCreateInstance,addr CLSID_Registrar,NULL,CLSCTX_ALL,\
            addr IID_IRegistrar,addr ppvIRegistrar
   .if ppvIRegistrar != 0
      invoke GetModuleFileNameW,hInstance,addr wmodulefilename,2*MAX_PATH
      IRegistrar ResourceRegister,addr wmodulefilename,300,addr wregistry
      IRegistrar ResourceUnregister,addr wmodulefilename,300,addr wregistry
      ;addreplacement to change a named module %MODULE%
      IRegistrar Release
300          REGISTRY MOVEABLE PURE  "essai.rgs"
  ForceRemove 'ToutEnmasm_registry' = s 'HowGoesIt?'

Fa is a musical note to play with CL