This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Unidata Support wrote: > > >To: address@hidden > >From: address@hidden > >Subject: Calling NETCDF.DLL from Visual Basic under Windows95/98 > >Organization: UCAR/Unidata > >Keywords: 200009132145.e8DLjMb02768 > > You've done a great job in documenting the netcdf library. I've > downloaded and used the Matlab interface for Matlab 5. I've been using > it to read chromatography data files in AIA/ANDI format. > > Do you have any information on using the netcdf.dll with Visual Basic, > or more specifically with Visual Basic for Applications? I'd like to > be able to call the library functions in netcdf.dll from Visual Basic > for applications and return the data to Microsoft Excel or Word. > Although I've done some programming in Visual Basic I've never tried > calling routines from DLL files. Any examples would be much > appreciated. > > Thank you, > > Steven Greenhouse > Sr Research Chemist > Cytec Industries, Inc. > 1937 W. Main St > Stamford, CT 06902 > 203-321-2601 I dont know much of the specifics around what you want to do. I can tell you that from C code, to use a DLL library you have to link against netcdf.lib, which contains all the interface code to the DLL. I'm sure that BASIC must have some convention for providing interfaces to DLLs but I dont know what they are. Probably you should go to a MS BASIC maillist of Newsgroup to find out how this is done in general. Sorry I couldnt be more helpful. If you find out more information, I'd love to know so that I can pass it on to anyone else who asks.