Jump to content
Sign in to follow this  
Oldschool

Creating a COM object

Recommended Posts

Oldschool

Alright, so I have an application PPL.exe with the following API

struct PPLAdviceInfo
{
    /**
     *  Gets  advice.
     * \return - advice.
     */
    virtual PPL_Advice GetAdvice() const = 0;
}

I'm trying

$oPPL = ObjCreate("PPL.Application")
if not IsObj($oPPL) then
    Msgbox(0,"Error","$oPPL is not an Object.")
else
    Msgbox(0,"Error","Successfully created Object $oPPL.")
endif

which spits back:

$oPPL is not an Object

I use oleview.exe, and I don't see the app in the list, but I don't see TextCaptureX in the list either...

But when I do:

$oTCX = ObjCreate("TCaptureX.TextCaptureX")
if not IsObj($oTCX) then
    Msgbox(0,"Error","$ $oTCX is not an Object.")
else
    Msgbox(0,"Error","Successfully created Object  $oTCX.")
endif

I get :

Successfully created Object $oTCX

So clearly I'm not declaring the first one right...Or what else could be wrong, and how do I find out the correct syntax for within the ObjCreate brakets???

Run>regserv32 C:\Program Files\Deskperience\Text Capture\TCapture.dll does not work for example.

How do I register the app properly??

Edited by Oldschool

Share this post


Link to post
Share on other sites
weaponx

Its regsvr32, not regserv32 and if you are using a path with spaces in it you need to encapsulate the entire string in quotes.

Share this post


Link to post
Share on other sites
Oldschool

Can someone give some more examples of successfully creating COM objects, and how to properly determine the within the () declaration.

Edited by Oldschool

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×