Prev Previous Post   Next Post Next
Old 20th August 2010, 22:09   #1
gringoloco023
Member
 
Join Date: Nov 2009
Posts: 52
ITypeLib->GetLibAttr & TLIBATTR structure

In addition to yesterdays tread about 'Playing with COM', I am hoping to get some help.

I'm trying to get the TLIBATTR structure by loading a dll. I'm able to get the GUID but non of the other members.
There must be something wrong with the way I allocate the TLIBATTR structure ?

PHP Code:
!define COM_CallMethod "!insertmacro _COM_CallMethod "
!macro _COM_CallMethod _vto _ParamsDecl _IFacePtr _Params
    System
::Call `${_IFacePtr}->${_vto}${_ParamsDecl} ${_Params}`
!
macroend

!define ITypeLib->GetLibAttr "${COM_CallMethod}7 (i)i. "
!define ITypeLib->ReleaseTLibAttr "${COM_CallMethod}12 ()i. "

Section
    StrCpy 
$0 msxml.dll
    System
::Call Oleaut32::LoadTypeLib(wr0,*i.r1)

    
System::call *(g,i,i,i,i,i)i.R0 ;  TLIBATTR  structure
    
${ITypeLib->GetLibAttr} $(R0)

    
System::Call *$R0(g.R1,i.R2,i.R3,i.R4,i.R5,i.R6)
    ${
ITypeLib->ReleaseTLibAttr} $()
    
System::free $R0

    DetailPrint 
'TLIBATTR structure'
    
DetailPrint GUID=$R1
    DetailPrint CLID
=$R2
    DetailPrint SYSKIND
=$R3
    DetailPrint MajorVerNum
=$R4
    DetailPrint MinorVerNum
=$R5
    DetailPrint LibFlags
=$R6
SectionEnd 
Or use the attached file for a complete test script.
Attached Files
File Type: nsi GetTLIBATTRstructure.nsi (1.8 KB, 173 views)
gringoloco023 is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump