User (Legacy) Posted October 15, 1999 Report Share Posted October 15, 1999 Good afternoon, Frank I added the article's code to my app, and it didnt work. Looking at the code: static CLSID const clsid = { 0xFFF90AC1, 0x4659, 0x11d1, { 0x8f, 0xd4, 0x0, 0xaa, 0x0, 0xbd, 0x9, 0x1c } }; _bstr_t license = "<<my string>>"; IClassFactory2 *pFactory2; LPUNKNOWN pUnk; HRESULT hr; IChartFXPtr pChartFX; if (SUCCEEDED(hr = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER, NULL, IID_IClassFactory2, (LPVOID FAR *) &pFactory2))) hr = pFactory2->CreateInstanceLic(NULL, NULL, IID_IUnknown, license, (LPVOID FAR *) &pUnk); if (SUCCEEDED(hr)) pChartFX = pUnk; pUnk->Release(); } pFactory2->Release(); } long l = GetWindowLong(m_hWnd, GWL_WNDPROC); m_pChartFX.CreateInstance(__uuidof(ChartFX)); m_pChartFX->CreateWnd((long)this->m_hWnd, IDC_CHART1, rc.left, rc.top - 5, (rc.right- rc.left), (rc.bottom - rc.top), WS_CHILD | WS_VISIBLE); m_hwndChartFX = (HWND)m_pChartFX->hWnd; ShowWindow(SW_SHOW); UpdateWindow(); The code is throwing an abnormal program termination on the actual CreateWnd call. CreateInstance comes back fine. Any other suggestions? Also I wanted to ask how long is the license string? I did not have a license string printed on my license card and when I run About Chart FX 98, it seems the license string may be cut off at the end. My license string I get is 52 characters long. Thanks for the help! -- Josh Eanes Francisco Padron <frankp@softwarefx.com> wrote in message news:DE0379D14694D211B4CE00609770710D036D21@sftfx-221.wamnet.net... > I think that what's failing is the creation of the chart object not the > CreateWnd method. > > This looks like a licensing problem. Check out article Q1381008 in our KB > for information about how to provide Chart FX with its license information > when creating the objects dynamically. > > Frank > SFX > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.