Dialogs in EVC++ dll not visible ....

A

Augusto

My problem is that when I add a resource like a dialog in EVC++ 3.0 and I
try to start
the dialog from the CF C# the dialog does not start.


the EVC++ dll code is a test function that computes a product and start the
dialog.
The function is computed correctly, but the form is not shown on the PDA


extern "C" _declspec(dllexport) int WINAPI MyFunc(int n1, int n2)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

CDialog DLG;
DLG. DoModal();

return(n1 * n2);


}


the C# code is the following

private void button1_Click(object sender, System.EventArgs e)

{

int result;

result = MyFunc(3,7);

MessageBox.Show(result.ToString());

}



What's wrong woth my code? The DLL is a regular MFC DLL.

Ciao Augusto.
 
P

Paul G. Tobey [eMVP]

I suppose that it's theoretically possible that that could work, but it's
not worth the trouble. Recode the form that you want in managed code and
call it from your main program. Don't try to call into a DLL, especially
one based on MFC, and get it to display a dialog.

Paul T.
 
A

Augusto

Ok, the problem is that I'm trying to wrap an ACTIVEX control.

The ActiveX control in question is the pocket CORTONA Control (VRML).

I think that a wrapper into a DLL is the only viable solution to run VRML
into
the compact frame work.


Otherwise, do you know a method to start two application concurrently on the
PPC
and let them exchange datas?

The final goal is to develop a location aware mobile application.

The VRML control displays a 3dWorld guided with GPS data.
The application is actually functioning on EVC++, but our project, for some
reason, needs to port the application on C# and use the EVC++ VRML control.
 
P

Paul G. Tobey [eMVP]

This is a situation tailor-made for CFCOM from Odyssey Software.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Pass C# string to eVC DLL 3
eVC++ 4.0 Dll In VB.net 2003 1
eVC .dll in vb.net on PocketPC 2003 2
eVC++ DLL help 9
Unmanaged DLL 3
again a "can't find PInvoke DLL" problem 13
Painting in a DLL 2
Help for Marshalling 13

Top