Jump to content
Software FX Community

I have problems in License and Distribution.


User (Legacy)
 Share

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

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