Jump to content
Software FX Community

I have problems in License and Distribution.


User (Legacy)

Recommended Posts

I'm using Chart Fx client server 5.1

in Visual C++ 6.0

I use dll, and load chart dynamicaly

in my StdAfx.cpp file

#import "sfxbar.dll" no_namespace implementation_only

#import "Cfx4032.dll" no_namespace implementation_only

I want to run my program on computers where Chart Fx is not installled.

So I register dlls like this

regsvr32.exe Cfx4032.dll

regsvr32.exe SfxBar.dll

and use Licence string as in the aticle Q1381002.

IClassFactory2 *pFactory2;

LPUNKNOWN pUnk;

// CoInitialize(NULL);

HRESULT hr;

char s[] = "__________My Licence String ___________________";

hr =

CoGetClassObject(__uuidof(ChartFX),CLSCTX_INPROC_SERVER,NULL,IID_IClassFacto

ry2,(LPVOID FAR *) &pFactory2);

if (SUCCEEDED(hr)) {

hr = pFactory2->CreateInstanceLic(NULL,NULL,IID_IUnknown,

(unsigned short *)s, (LPVOID FAR *) &pUnk);

if (SUCCEEDED(hr)) { <============= not true!

m_pChartFX = pUnk; <=== so not run

pUnk->Release();

}

pFactory2->Release();

}

m_pChartFX.CreateInstance(__uuidof(ChartFX));

if (m_pChartFX!= NULL) {

m_pChartFX->CreateWnd((long)hwndParent, nID, x, y, cx, cy,

dwStyle );

m_hwndChartFX = (HWND) m_pChartFX->hWnd;

}

chart is created in my computer. but not in other computer.

Please Help me.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...