C # netcdf file 64-bit read

Source: Internet
Author: User
[NetCDF (Network Common Data Form) is a commonly used weather file compression format, online open libraries can be read, write, and other operations, its file resolution of the site is NetCDF class library download, support C++,fortran,java and other languages, using C # Development, need DllImport way call C + + class library development, development version is divided into 32-bit version and 64-bit version, at the time of reference, the function of 32-bit and 64-bit import is different, need to differentiate.
This is the 64-bit notation, the longer size is indicated by a long way
[DllImport ("Netcdf.dll", CallingConvention = callingconvention.cdecl)]
public static extern int Nc_open (string path, int mode, long bsize, out int NCIDP);

            这是32位的写法  [DllImport("netcdf.dll", CallingConvention = CallingConvention.Cdecl)]    public static extern int nc_open(string path, int mode, int bsize, out int ncidp);刚开发的时候,用64位的dll,按照32位的写法,数据一直不能出来,最后,联合调试netcdf的源码才发现此问题,最后能顺利读出来文件。

C # netcdf file 64-bit read

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.