Genesis API Initialization

My GTSession::Initialize function is failing every time I call it. Does anyone know why this would be?

I've been told by the Genesis agent I've been in contact with that the version number argument shouldn't make much of a difference, and the Instance is being left at NULL and the flag is left at 0.

Just to fill out the argument, I have the version number as 1.1.10.0 for the C++ version, since it is the only version which seems to only have 3 numbers.

Thanks to anyone who can help.
 
BOOL CTestAPIApp::InitInstance()
{
AfxEnableControlContainer();

if(GTSession::Initialize(GTAPI_VERSION) != 0)
return FALSE;

// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
// Enable3dControls(); // Call this when using MFC in a shared DLL
#else
// Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CTestAPIDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
 
Yep I had that problem .... I have some vague memories from years ago that it had to do with threading model. Initialize failed under MTA and worked under STA (or was it vice-versa lol) :D
 
Back
Top