comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Help calling a DLL from a DLM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Help calling a DLL from a DLM [message #39918] Fri, 25 June 2004 13:21 Go to next message
Marc R. Reinig is currently offline  Marc R. Reinig
Messages: 6
Registered: May 2004
Junior Member
I have created a DLM that works fine, but now I would like to be able to
call a function in the DLL of a capture card vendor from my DLM. How do
I get IDL to link my DLM with the vendors libs? This is in Windows.

Thanks in advance.

Marc Reinig
UCO/Lick
Laboratory for Adaptive Optics
Re: Help calling a DLL from a DLM [message #39962 is a reply to message #39918] Wed, 30 June 2004 07:05 Go to previous messageGo to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Haje Korth wrote:
> Marc,
> besides the interfacing, a dlm is nothing else but a regular dll. Therefore,
> you simply link against the third party .lib or .dll at compile time. How
> this is done is compiler specific and you should consult the manual. In
> Visual Studio you can add the library as an existing item, just as you
> include idl32.lib.
>
> Haje
>
>
>
> "Marc R. Reinig" <mreinig@ucolick.org> wrote in message
> news:40dc8a1d@darkstar...
>
>> I have created a DLM that works fine, but now I would like to be able to
>> call a function in the DLL of a capture card vendor from my DLM. How do
>> I get IDL to link my DLM with the vendors libs? This is in Windows.
>>

Hi,

This is the same problem that I am wrestling with. I can't seem to get
the linking to work (although the DLM wrapper around the DLL compiles).
In my case, the DLL is written in C++ - but it looks, to my
uneducated eye, like the variables in and out of the camera's API are
simple (i.e. not C++ objects). If the Mac OSX linker complains that
the the DLL is not a mach-o thingy... ala ...

\"ld: SpotCamCarbon.dll bad magic number(not a Mach-O file)\"

I suppose this tells me that I can't link to the DLL via my C DLM. Ah,
what to make of it all? Any ideas greatly appreciated.

Ben
Re: Help calling a DLL from a DLM [message #40002 is a reply to message #39918] Mon, 28 June 2004 08:02 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Marc,
besides the interfacing, a dlm is nothing else but a regular dll. Therefore,
you simply link against the third party .lib or .dll at compile time. How
this is done is compiler specific and you should consult the manual. In
Visual Studio you can add the library as an existing item, just as you
include idl32.lib.

Haje



"Marc R. Reinig" <mreinig@ucolick.org> wrote in message
news:40dc8a1d@darkstar...
> I have created a DLM that works fine, but now I would like to be able to
> call a function in the DLL of a capture card vendor from my DLM. How do
> I get IDL to link my DLM with the vendors libs? This is in Windows.
>
> Thanks in advance.
>
> Marc Reinig
> UCO/Lick
> Laboratory for Adaptive Optics
>
Re: Help calling a DLL from a DLM [message #40048 is a reply to message #39962] Thu, 01 July 2004 08:51 Go to previous message
Marc Reinig is currently offline  Marc Reinig
Messages: 30
Registered: June 2004
Member
My problem was that I was trying to figure out how to pass my linking
options to IDL. Instead I edited their batch file, Build_win.bat, and ran
that and all is well. I'm not sure how to do it in MAC but I assume there
is some equivalent.

I was porting code that was originally written in C++, I just removed all
the :: stuff, put all the declares at the beginning of each routine, used
malloc instead of new, etc, and used the basic routine names in the DLL I
was calling from the DLM and it worked fine.

Marc Reinig
UCO/Lick
Adaptive Optics Lab

> This is the same problem that I am wrestling with. I can't seem to get
> the linking to work (although the DLM wrapper around the DLL compiles).
> In my case, the DLL is written in C++ - but it looks, to my
> uneducated eye, like the variables in and out of the camera's API are
> simple (i.e. not C++ objects). If the Mac OSX linker complains that
> the the DLL is not a mach-o thingy... ala ...
>
> \"ld: SpotCamCarbon.dll bad magic number(not a Mach-O file)\"
>
> I suppose this tells me that I can't link to the DLL via my C DLM. Ah,
> what to make of it all? Any ideas greatly appreciated.


"Ben Tupper" <btupper@bigelow.org> wrote in message
news:2kfvh4F20ubhU1@uni-berlin.de...
> Haje Korth wrote:
>> Marc,
>> besides the interfacing, a dlm is nothing else but a regular dll.
Therefore,
>> you simply link against the third party .lib or .dll at compile time.
How
>> this is done is compiler specific and you should consult the manual. In
>> Visual Studio you can add the library as an existing item, just as you
>> include idl32.lib.


>> "Marc R. Reinig" <mreinig@ucolick.org> wrote in message
>> news:40dc8a1d@darkstar...
>>
>>> I have created a DLM that works fine, but now I would like to be able to
>>> call a function in the DLL of a capture card vendor from my DLM. How do
>>> I get IDL to link my DLM with the vendors libs? This is in Windows.
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: inverse function of binary.pro
Next Topic: Inverse transforming a product of FFTs

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:58:54 PDT 2025

Total time taken to generate the page: 0.00353 seconds