Re: Problems_with_netcdf_and_VBasic?

Just some suggestions. Have you tried using the ordinals of the netcdf functions? If you run the Dependency Walker that comes with VS6 you can see each of the netcdf functions and their ordinal values. I have used those ordinal values in the past with more success though I can't really tell you why that would be. It shouldn't matter and it made little sense to me but it was helpful none the less. Before that we had a little app that wrapped all the netcdf functions so they would act more normally for us as well. Now we use an OpenDAP NetCDF dll that was modified to work with VB6. It is pretty nice for all that Internet data out there. Oh yeah, if you are interested and don't mind going a step backwards I can send you a recompiled NetCDF dll for version 3.5 that works perfectly with VB6 and up plus a module for all the declare statements and support functions.
Let me know!  :-)_

Good Luck!
Matthew Hanna

--- Ursprüngliche Nachricht ---
Von: Pedro Montero Vilar <pmontero@xxxxxxxxxxxx>
An: netcdfgroup@xxxxxxxxxxxxxxxx
Betreff: Problems with netcdf and VBasic
Datum: Thu, 25 Aug 2005 15:21:22 +0200

Dear all,

I wanted to use netcdf.dll in a visual basic program. I have followed
the instructions of a mail in this list titled Netcdf and Visual Basic 6
and I have built a test program:


   Public Declare Function nc_create Lib
"c:\windows\system32\netcdf.dll" (ByRef path As String, ByVal mode As
Long, ByVal ncidp As Long) As Long
   Public Const NC_NOCLOBBER As Long = 4

   Sub test()
        Dim status As Long
        Dim nci As Long
        Dim file As String
        file = "d:\fozj.nc"
        status = nc_create(file, NC_NOCLOBBER, nci)

   End Sub

Unfortunely, when I have executed this code, VB give me an error:  Bad
DLL Calling Convention, so I think the argumets are wrong. Could anybody
help me? Are there anybody who use VB6 and netcdf?

My netcdf version is 3.6.1 and I have donwload a precompiled dll, called
netcdf.dll

Thank you in advance,
Pedro Montero

--
Pedro Montero
_______________________


Pedro Montero Vilar
E-mail: pmontero@xxxxxxxxxxxx

Instituto Tecnolóxico para o Control do Medio Mariño (INTECMAR)
R/Peirao de Vilaxoán, S/N
CP: 36611, Vilagarcía de Arousa (Pontevedra)
Tfno.: +34 986512320/22
Fax:   +34 986512300

_________________________



  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: