NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi, I´ve got some problems using the netcdf.dll (prebuilt dll from the netcdf-3.5.1 download) with Visual Basic 6. In a new module I wrote the declaration: Declare Function nc_open Lib "netcdf.dll" (ByVal path As String, ByVal cmode As Long, ByRef ncidp As Long) As Long Then I used it in a procedure: Sub main Dim path As String, ncidp As Long, res As Long path = "c:\test.cdf" res = nc_open(path, 0, ncidp) End Sub Running the program, I get the error message "Bad dll calling convention" If the error is suppressed (with "OnError Resume Next") then I can read some simple data from the *.cdf file. But if string variables or array variables are involved, the program fails or even crashes. I´ve got the impression from other netcdfgroup members that it is possible to use the netcdf.dll in the way outlined above. Does anybody know what I am doing wrong? What calling convention does the netcdf.dll uses? With best regards H.J. Rieger -- GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail +++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++
netcdfgroup
archives: