From: Leslie Newell on
It should work as long as the dlls use standard C or Pascal calls (and
of course you know the call type). If they are C++ then you have no
chance unless they were built with the same compiler (and often the same
version of the compiler). C++ ABIs vary between compilers and they are
not usually compatible.

Les

rozni yusof wrote:
> Err, all right, I've puzzled it out...
>
> Some DLL's don't cooperate with it though... and trying to convert a
> link library suitable for one compiler into one suitable for another
> is such a pain, and there's no guarantee it'll even work...


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "rozni yusof" on
'Tis a proprietary device driver for a Data Translation DAQ card...
that company only provides drivers for Microsoft Visual C++ (and
..NET), and I'm trying to access the functions in the DLL
(oldaapi32.dll) for use with MingW.... Comedi.org has some stuff for
Data Translation DAQs but alas, nothing for the 9800 series.

typedef ECODE (wxSTDCALL *DT_InitType)(PSTR, PHDEV);
DT_InitType DTolDaInitialize= (DT_InitType) dll.GetSymbol("olDaInitialize");
PSTR lpszName=""; LPHDEV lphDev=0;

ecode= DTolDaInitialize(lpszName, lphDev);

wxstr.Printf("%i", ecode);
wxLogMessage(wxstr);


I got it compiling....

When run, the errorcode ecode gets a "67"... which means:

"The requested driver cannot be opened. Verify that the board is still
in the system. Ensure that your driver has been properly installed and
that you have restarted your subsystem if requested by the driver or
the DT-Open Layers software before you tried to use it with
olDaInitialize. "

Ngggkhh.... I have never bothered with Visual C++ before, but looks
like I'll have to start...


On 12/11/06, Iulian-Nicu Serbanoiu <undergraver(a)gmail.com> wrote:
> Tell us what problems you have and I'm sure we can find a cross-platform
> solution just like the wx library did ;)
>
> Regards,
>
> Iulian
>
> PS: some code would be good
>
>
> On 12/11/06, rozni yusof <rozniy(a)gmail.com> wrote:
> > Err, all right, I've puzzled it out...
> >
> > Some DLL's don't cooperate with it though... and trying to convert a
> > link library suitable for one compiler into one suitable for another
> > is such a pain, and there's no guarantee it'll even work...
> >
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Michael Hieke on
Sorry for getting off-topic here...

rozni yusof wrote:

> 'Tis a proprietary device driver for a Data Translation DAQ card...
> that company only provides drivers for Microsoft Visual C++ (and
> .NET), and I'm trying to access the functions in the DLL

It is no problem to access the driver DLL from any language capable of
creating programs for MS Windows; we do it from Delphi, with a suitable
import unit created from the information in the header file.

> typedef ECODE (wxSTDCALL *DT_InitType)(PSTR, PHDEV);
> DT_InitType DTolDaInitialize= (DT_InitType)
> dll.GetSymbol("olDaInitialize");
> PSTR lpszName=""; LPHDEV lphDev=0;

This seems to be the problem, if the name is empty it can not find the
matching device. Try the device name that is listed in the Open Layers
control panel instead, it should work. Something like "DT303_1", or
"DT9800_1" in your case.

> I have never bothered with Visual C++ before, but looks like I'll
> have to start...

No need to, but have a look at their documentation and samples...

HTH

--
Michael Hieke


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "rozni yusof" on
You have worked with Data Translation devices too?

Err.. I thought the olDaInitialize function was supposed to tell you
the device name in the lpszName argument? So, you're actually supposed
to *provide* its name?

Now... let's see, where is the Open Layers Control Panel?

On 12/11/06, Michael Hieke <michael.hieke(a)elwi-elektronik.de> wrote:
> Sorry for getting off-topic here...
>
> rozni yusof wrote:
>
> > 'Tis a proprietary device driver for a Data Translation DAQ card...
> > that company only provides drivers for Microsoft Visual C++ (and
> > .NET), and I'm trying to access the functions in the DLL
>
> It is no problem to access the driver DLL from any language capable of
> creating programs for MS Windows; we do it from Delphi, with a suitable
> import unit created from the information in the header file.
>
> > typedef ECODE (wxSTDCALL *DT_InitType)(PSTR, PHDEV);
> > DT_InitType DTolDaInitialize= (DT_InitType)
> > dll.GetSymbol("olDaInitialize");
> > PSTR lpszName=""; LPHDEV lphDev=0;
>
> This seems to be the problem, if the name is empty it can not find the
> matching device. Try the device name that is listed in the Open Layers
> control panel instead, it should work. Something like "DT303_1", or
> "DT9800_1" in your case.
>
> > I have never bothered with Visual C++ before, but looks like I'll
> > have to start...
>
> No need to, but have a look at their documentation and samples...
>
> HTH
>
> --
> Michael Hieke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "rozni yusof" on
I looked in the Control Panel, and gave the name "DT9834(00)" to the
olDaInitialize.

LPHDEV lphDev=0;
ecode= DTolDaInitialize("DT9834(00)", lphDev);

It gave some memory problems when run... "Can't be written" or
something like that.

Am I on the right track?


On 12/11/06, Michael Hieke <michael.hieke(a)elwi-elektronik.de> wrote:
> Sorry for getting off-topic here...
>
> rozni yusof wrote:
>
> > 'Tis a proprietary device driver for a Data Translation DAQ card...
> > that company only provides drivers for Microsoft Visual C++ (and
> > .NET), and I'm trying to access the functions in the DLL
>
> It is no problem to access the driver DLL from any language capable of
> creating programs for MS Windows; we do it from Delphi, with a suitable
> import unit created from the information in the header file.
>
> > typedef ECODE (wxSTDCALL *DT_InitType)(PSTR, PHDEV);
> > DT_InitType DTolDaInitialize= (DT_InitType)
> > dll.GetSymbol("olDaInitialize");
> > PSTR lpszName=""; LPHDEV lphDev=0;
>
> This seems to be the problem, if the name is empty it can not find the
> matching device. Try the device name that is listed in the Open Layers
> control panel instead, it should work. Something like "DT303_1", or
> "DT9800_1" in your case.
>
> > I have never bothered with Visual C++ before, but looks like I'll
> > have to start...
>
> No need to, but have a look at their documentation and samples...
>
> HTH
>
> --
> Michael Hieke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org