Windows DLL with C++ interface

Jan van der Vorst jvdvorst at iae.nl
Mon Feb 10 19:16:44 CET 2003


Dear all,

I just started experimenting with the C++ interface under Cygwin in
order to
eventually create an ODBC interface for Mozart (without using
OzTclODBC).
I quickly bumped into the following elementary problem: it seems I can't

access a windows DLL.
E.g. a function like the following 'hello' will print the warning in the

emulator-window but will not show a message box. Oz will just stop
responding.

Did I oversee something, or is it just impossible to do something like
this
in a DLL under windows?

best regards, Jan van der Vorst

#include <windows.h>
#include "mozart.h"


OZ_BI_define(BIhello,0,0)
{
        OZ_warning("Creating message box");
        MessageBox(NULL, "Hello World!", "Hello Jan!", MB_OK);
        return OZ_ENTAILED;
} OZ_BI_end


OZ_C_proc_interface oz_interface[] = {
  {"hello",0,0,BIhello},
  {0,0,0,0}
};

OZ_C_proc_interface *oz_init_module() {
  return oz_interface;
}
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs at mozart-oz.org.





More information about the mozart-users mailing list