Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Problems with netcdf and VBasic

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

_________________________






 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690