Hi,
i have written a programm in VC++ 6.0, in this i use a dll, which is created with VB 6.0. on my pc it runs well, but on other computers the class in the vb-dll isnt called. i have already installed the VB 6.0 Runtime Files on the test pc, but it didnt helped.
for testing i put in my VB-dll all out, only a simple messagebox, it doesnt appears so the error should be somewhere in VC++
i put some code where the dll-class is called, i hope some of you experts see something!
//=============================================================
RechnungPOPDlg.cpp:
//=============================================================
#include "xlsconvert.h"
void CRechnungPOPDlg::OnOK()
{
CString speicherPOP, DateiOut2;
_Class1 xlsVB;
xlsVB.CreateDispatch( _T("XLSConvert.Class1") ); //Class1 is defined in VB- XLSConvert.dll
...
xlsVB.CreateXLS( DateiOut2, speicherPOP );
}
//=============================================================
xlsconvert.cpp:
//=============================================================
#include "xlsconvert.h"
void _Class1::CreateXLS(LPCTSTR datei, LPCTSTR daten)
{
static BYTE parms[] =
VTS_BSTR VTS_BSTR;
InvokeHelper(0x60030000, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
datei, daten);
}
//=============================================================
xlsconvert.h:
//=============================================================
// Von Klassen-Assistent automatisch erstellte IDispatch-Kapselungsklasse(n).
/////////////////////////////////////////////////////////////////////////////
// Wrapper-Klasse _Class1
class _Class1 : public COleDispatchDriver
{
public:
_Class1() {} // Ruft den Standardkonstruktor für COleDispatchDriver auf
_Class1(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
_Class1(const _Class1& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
// Attribute
public:
// Operationen
public:
void CreateXLS(LPCTSTR datei, LPCTSTR daten);
};