OI 2.6 with MFC in a none MFC project

OI 2.6 with MFC in a none MFC project

Post by Erik Klaa » Sat, 14 Oct 2000 04:00:00



Hello,

I want to integrate OI with MFC into our none MFC measurement program. So I
decided to create a new project with the wizard that contains a simple
dialogbox and I made a separate dll from this. This works fine until I call
the following sequence that was generated automatically:

BOOL COiTestDlg::OnInitDialog()
{
 CDialog::OnInitDialog();

// BEGIN_IVWGEN
 static int cArgs[]= {
  TRUE,
  FALSE,
  TRUE,
  FALSE,
 };

 CIvfApp::IvfInitSoWin( this );

 CWnd *pWnd = GetDlgItem(IDC_VIEWER) ;
 IvfCreateComponent(pWnd,(void *)cArgs);
// END_IVWGEN

when it reaches IvfCreateComponent(pWnd,(void *)cArgs); I get a
 0xC0000005: Access Violation. and I cant debug into it.
It seems to come from the call to CObject::IsKindOf .

There is no problem when I compile and start a *.exe program from the same
source.

What is the problem? Do you have an example-source for making a dll and
calling Inventor functions in it?
Please help, its very urgent for me.

Thanks in advance

______________________________________________
Erik Klaas
Breuckmann GmbH
Torenstra?e 14
88709 Meersburg
Telefon ++49 (0)7532 4346 21
FAX     ++49 (0)7532 4346 50

WWW     http://www.breuckmann.com

"For every problem, there exists a simple and elegant
solution which is absolutely wrong." -- J. Wagoner

 
 
 

OI 2.6 with MFC in a none MFC project

Post by Mike Hec » Wed, 18 Oct 2000 04:00:00



Quote:> I want to integrate OI with MFC into our none MFC measurement program. So
I
> decided to create a new project with the wizard that contains a simple
> dialogbox and I made a separate dll from this. This works fine until I
call
> the following sequence that was generated automatically:

> BOOL COiTestDlg::OnInitDialog()
> {
>  CDialog::OnInitDialog();

> // BEGIN_IVWGEN
>  static int cArgs[]= {
>   TRUE,
>   FALSE,
>   TRUE,
>   FALSE,
>  };

>  CIvfApp::IvfInitSoWin( this );

>  CWnd *pWnd = GetDlgItem(IDC_VIEWER) ;
>  IvfCreateComponent(pWnd,(void *)cArgs);
> // END_IVWGEN

> when it reaches IvfCreateComponent(pWnd,(void *)cArgs); I get a
>  0xC0000005: Access Violation. and I cant debug into it.
> It seems to come from the call to CObject::IsKindOf .

> There is no problem when I compile and start a *.exe program from the same
> source.

> What is the problem? Do you have an example-source for making a dll and
> calling Inventor functions in it?

Do you have a test case you can send us to debug?  If not, how
exactly did you create this DLL?  The standard IVF AppWizard
can build a dialog-based app, but not a DLL.  This should be
possible, but there may some issues with using an MFC based
DLL in a non-MFC program (just from MFC).

Finally, sorry to ask the obvious, but have you checked that pWnd
is non-NULL and contains a valid HWND ?

-Mike
 TGS Inc, http://www.tgs.com

 
 
 

1. OI on MFC, broken measurements

Hi all,

I'm using OI with MFC. In my app i'm also using BLS library from
HAMAMATSU.
I've a small problem, in my app measurements(line between two
landmarks) is not displayed as smooth, it appears as broken(dashed).

How should i rectify this???

Tx in adv
Deepesh

Sent via Deja.com http://www.deja.com/
Before you buy.

2. ALIEN SKIN !!!!!!!!!!!!!!!!!!!!!!!!!!!

3. OI without MFC

4. ** NEW Art Gallery **

5. MFC button control in MFC vissual C++

6. Do you know about sphere algorithms?

7. stereo & fireGl 4 OI 2.6

8. terminal EEPIC question

9. can GLUT be used in a MFC project?

10. Initilizing Direct3d in a MFC project

11. converting Xwindow(s) to Visual C++ MFC

12. How can I write AVI files by MFC?

13. BMRT & MFC