Jump to content
Software FX Community

Re: GetExtension not working

User (Legacy)

Recommended Posts

Actually, it looks like raw_GetExtension receieves a char pointer (LPSTR), 

not a BSTR.

I tried just about everything: CString, BSTR, character array, etc. and I

always got the same error code. I copied in the code Josh posted verbatim

and I still got the same thing. I created a small sample app and tried

everything but with no difference in results (the code I used is at the end

of this e-mail.)

I'm stumped. I've got all the latest versions of the DLL's registered.

(I'm acutally trying to use GetExtension as a workaround for another problem

I'm having. I'll post that problem in a new thread...)




// Create the chart

IChartFX* _pChartFX;

IClassFactory2* piLicense = NULL;

BSTR bstrLicense =

:SysAllocString( OLESTR("DontBeCopyingMyLicenseString!") );

// Create the a chart with the license key.

HRESULT hr = ::CoGetClassObject( __uuidof( ChartFX ),




reinterpret_cast<void**>(&piLicense) );

hr = piLicense->CreateInstanceLic( NULL,


__uuidof( IChartFX ),


reinterpret_cast<void**>(&_pChartFX) );


::SysFreeString( bstrLicense );

IAnnListPtr pAnnList;

_bstr_t annotation = "AnnotationX.AnnList";

// creation


hr = _pChartFX->AddExtension((IUnknown *)pAnnList);

// retrieval

hr = _pChartFX->raw_GetExtension(annotation, (IUnknown **) &pAnnList);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...