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

Home » Public Forums » archive » Re: how to call dll
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
Re: how to call dll [message #44751] Fri, 15 July 2005 05:19 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
You can't use these dlls from visual basic directly. all variable
definitions internally are tightly coupled to the idl api and won't run
standalone. This assessment is based on my own dlms and please correct me if
I am wrong. Can't you compile you own netcdf dll? This is open source,
right?

Haje


"rzsh5" <hui.shenhui@gmail.com> wrote in message
news:1121411020.324356.206110@z14g2000cwz.googlegroups.com.. .
> Thank you, Mark Hadfield. Actually, I have wrote a IDL program and
> merged this IDL program into visual basic. But when I did this, an
> error occurs, that is: synatx error about NCDF_OPEN. which shows the
> program can't load ncdf_open function. And when I remove the
> idl_netcdf.dll from bin\bin.x86, same errors occur in IDL. So, I want
> to try whether I can use these functions from idl_netcdf.dll directly.
> Thank you.
>
Re: how to call dll [message #44752 is a reply to message #44751] Fri, 15 July 2005 00:03 Go to previous messageGo to next message
rzsh5 is currently offline  rzsh5
Messages: 4
Registered: July 2005
Junior Member
Thank you, Mark Hadfield. Actually, I have wrote a IDL program and
merged this IDL program into visual basic. But when I did this, an
error occurs, that is: synatx error about NCDF_OPEN. which shows the
program can't load ncdf_open function. And when I remove the
idl_netcdf.dll from bin\bin.x86, same errors occur in IDL. So, I want
to try whether I can use these functions from idl_netcdf.dll directly.
Thank you.
Re: how to call dll [message #44753 is a reply to message #44752] Fri, 15 July 2005 00:02 Go to previous messageGo to next message
rzsh5 is currently offline  rzsh5
Messages: 4
Registered: July 2005
Junior Member
Thank you, Mark Hadfield. Actually, I have wrote a IDL program and
merged this IDL program into visual basic. But when I did this, an
error occurs, that is: synatx error about NCDF_OPEN. which shows the
program can't load ncdf_open function. And when I remove the
idl_netcdf.dll from bin\bin.x86, same errors occur in IDL. So, I want
to try whether I can use these functions from idl_netcdf.dll directly.
Thank you.
Re: how to call dll [message #44756 is a reply to message #44753] Thu, 14 July 2005 22:28 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
rzsh5 wrote:
> I want to know if I have a dll file in a certain folder, how can I call
> it in IDL. I have tried DLM_LOAD to load idl_netcdf.dll but too many
> errors occured. someone said I can use call_external to load dll. Can
> anybody give me some suggestions and examples about how to call dll in
> IDL.

It depends on the DLL.

On my system, idl_netcdf.dll is in

D:\Program Files\RSI\IDL61\bin\bin.x86\

Also in this directory is idl_netcdf.dlm. The latter is a *text* file
which contains stuff like

MODULE NCDF
DESCRIPTION IDL NetCDF support
VERSION 3.5.0
SOURCE Research Systems, Inc.
BUILD_DATE JUL 14 2004
CHECKSUM xxxxx
FUNCTION NCDF_ATTCOPY 3 5 KEYWORDS
FUNCTION NCDF_ATTINQ 2 3 KEYWORDS
...

The directory in question is on the list of directories (by default
there's only one) in the system variable !DLM_PATH.

There's a section in the IDL External Development Guide that describes
how DLMS work (I'm reading it now--it's quite interesting). But if your
installation hasn't been tampered with and you haven't changed !DLM_PATH
you shouldn't have to worry about it. IDL reads idl_netcdf.dlm to find
out what routines are available in idl_netcdf.dll and then all those
routines work like magic.

RE DLM_LOAD, the documentation says:

Normally, IDL system routines that reside in dynamically loadable
modules (DLMs) are automatically loaded on demand when a routine
from a DLM is called. The DLM_LOAD procedure can be used to
explicitly cause a DLM to be loaded.

Interesting, but I've never had to worry about this before, so why
should you?

RE the suggestion that you should use CALL_EXTERNAL to load the DLL: no,
not in this case, as idl_netcdf.dll is meant to be used through the DLM
interface.

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: how to call dll [message #44845 is a reply to message #44752] Sun, 17 July 2005 15:20 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
rzsh5 wrote:
> Actually, I have wrote a IDL program and
> merged this IDL program into visual basic. But when I did this, an
> error occurs, that is: synatx error about NCDF_OPEN. which shows the
> program can't load ncdf_open function. And when I remove the
> idl_netcdf.dll from bin\bin.x86, same errors occur in IDL. So, I want
> to try whether I can use these functions from idl_netcdf.dll directly.

What do you mean by "wrote an IDL program and merged this IDL program
into Visual Basic"?


--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to define a struct header of fixed length in IDL
Next Topic: programming course

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

Current Time: Sat Oct 11 05:39:33 PDT 2025

Total time taken to generate the page: 1.08202 seconds