Prev Previous Post   Next Post Next
Old 19th August 2010, 19:12   #1
Zinthose
Senior Member
 
Join Date: May 2009
Posts: 152
Playing with COM

I'm attempting to recreate the example posted at: http://en.wikipedia.org/wiki/OLE_Automation#Examples

My code is choking at GetIDsOfNames... Can anyone add some insight?

PHP Code:
    /*
    !define IID_StdOle      '{00020430-0000-0000-C000-000000000046}'
    !define IID_IDispatch   '{00020400-0000-0000-C000-000000000046}'
    !define IID_IUnknown    '{00000000-0000-0000-C000-000000000046}'
    !define IID_NULL        '{00000000-0000-0000-0000-000000000000}'

    !define CLSCTX_SERVER           0x015
    !define LOCALE_SYSTEM_DEFAULT   0x800
    */

    
DetailPrint CLSIDFromProgID
    System
::Call `Ole32::CLSIDFromProgID(w,&g16)i ("Excel.Application",.r0).r2`
    
DetailPrint "ERR=$2"
    
DetailPrint "CLSID=$0"
    
    
    
DetailPrint CoCreateInstance
    System
::Call `Ole32::CoCreateInstance(g r0,i 0,i ${CLSCTX_SERVER},g '${IID_IDispatch}',*i .r1) i .r2`
    
DetailPrint "ERR=$2"
    
    
DetailPrint GetIDsOfNames
    System
::Call `$1->GetIDsOfNames(g ${IID_NULL},w "Visible",i 1,i ${LOCALE_SYSTEM_DEFAULT},*i .r3)i .r2` ;<-- Errors here... :'(
    DetailPrint "ERR=$2" ; <-- I'
m getting error 0x80004002 (AKA  E_NOINTERFACE)
    
DetailPrint $$3=$
Zinthose is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
system::call ole32 com

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