Calling C api's for a hdf lib
"Gerhardus Geldenhuis" <[email protected]>
| Newsgroups | gmane.comp.lang.delphi.jedi |
|---|---|
| Message-ID | <[email protected]> |
Hi I am trying to call a function in c library. Here is its basic info Name: H5Fcreate Signature: hid_t H5Fcreate(const char *name, unsigned flags, hid_t create_id, hid_t access_id ) I want to give values to the flags parameter but am not sure what I should put in there. Here is an extract out of the .h file and following that my interpretation of the api. /* * These are the bits that can be passed to the `flags' argument of * H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine * them as needed. As a side effect, they call H5check_version() to make sure * that the application is compiled with a version of the hdf5 header files * which are compatible with the library to which the application is linked. * We're assuming that these constants are used rather early in the hdf5 * session. */ #define H5F_ACC_RDONLY (H5check(),0x0000u) /*absence of rdwr => rd-only */ #define H5F_ACC_RDWR (H5check(),0x0001u) /*open for read and write */ #define H5F_ACC_TRUNC (H5check(),0x0002u) /*overwrite existing files */ #define H5F_ACC_EXCL (H5check(),0x0004u) /*fail if file already exists*/ #define H5F_ACC_DEBUG (H5check(),0x0008u) /*print debug info */ #define H5F_ACC_CREAT (H5check(),0x0010u) /*create non-existing files */ function D_H5FCreate(name:pchar;flags:integer;createid,accessid:integer):integer; cdec l;external 'hdf5dll.dll' name 'H5Fcreate'; I can call the function and it works well but I have no idea what the flags value should be. Must I in some way use this constants defined in the .h file or can I just use my own. I would presume using the predefined constancts would be best as that automatically calls the H5check function. Groete Gerhardus Geldenhuis Chief Technical Assistant Reactor Theory(NECSA) [email protected] Mobile +27 83 784 7664 Office +27 12 305 5600 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/i7folB/TM ---------------------------------------------------------------------~-> Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/Delphi-JEDI/ To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/