Jump to content
Software FX Community

Re: Annotation object


User (Legacy)
 Share

Recommended Posts

Hi Juan, 

I have performed the following test:

bstr_t bstrExtensionName = _T("AnnotationX.AnnList");

HRESULT hr;

IAnnListPtr pAnnotationList;

hr = m_pChartFX->raw_GetExtension(bstrExtensionName,

(IUnknown**)&pAnnotationList);

CLSID clsID;

hr = CLSIDFromProgID(bstrExtensionName, &clsID);

raw_GetExtension() returns an error, CO_E_CLASSSTRING, but CLSIDFromProgID()

returns S_OK !!! (and clsID is set to

{EF600D71-358F-11D1-8FD4-00AA00BD091C} )

That is, the success of CLSIDFromProgID identifies that the registry

settings are ok. I have also checked that using regedit.

I tried raw_GetExtension("AnnotationX.AnnList"),

raw_GetExtension("AnnotationX.AnnList.1") with no luck, still

CO_E_CLASSSTRING error.

I am using ChartFX DLL.

The full sequence of actions is:

- create chartfx control (CreateInstanceLic)

- load it from the file using Import method (this may load an already saved

extension)

- call GetExtension to determine if I have to make AddExtension

- create chart window (CreateWnd)

Annotation extension works fine (after AddExtension) but GetExtension always

returns an error. As a result 2 extension are added and 2 extension toolbars

appear.

This happens on all PCs I have tested.

Please help!

Serge

"Juan Cegarra" <JuanC@softwarefx.com> wrote in message

news:DE0379D14694D211B4CE00609770710D05CD36@sftfx-221.wamnet.net...

> Our code will first invoke the CLSIDFromProgID COM API that translates a

> ProgID (such as "AnnotationX.AnnList") into a CLASSID.

>

> If this code fails we will return its return value. According to the

> Windows API

> CO_E_CLASSSTRING: The registered CLSID for the ProgID is invalid.

>

> You may also want to try "AnnotationX.AnnList.1" and check your registry

> to see if this PROGID is in the HKEY_CLASSES_ROOT hive.

>

> Please note that if you are using the ChartFX ActiveX control the

> parameter should be a BSTR, if you are using the ChartFX DLL it should

> be an LPSTR.

>

> Regards,

>

> Juan Cegarra

> Software FX, Inc.

> http://support.softwarefx.com

>

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.

Guest
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.

 Share

×
×
  • Create New...