![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: Wizard- How do I prototype a function in C which wishes to take a descriptor as an argument? i.e., What is the "type" of a descriptor as far as C is concerned. I'm attempting to build a C interface to a $SMG routine and wish to make the interface as transparent as possible so that I can pass arguments to my C function just like I was calling the actual FORTRAN routine: C function: $DESCRIPTOR(descrip1, "Descriptor"); unsigned long keyid; AddKeyDef(&keyid, &descrip1, .....) So, what would the prototype of AddKeyDef look like? Thank you Patrick Franz The Answer is : One potential declaration: AddKeyDef(unsigned long *, struct dsc$descriptor_s *, ...); Alternatively (for those disincluded to use the argument verification mechanisms), use (void *). Please look at how the $DESCRIPTOR macro is defined in descrip.h, as well as various searches of existing examples in sys$examples: and various other related "examples" directories that might be available to you. Also see the discussion of string descriptors in the OpenVMS Frequently Asked Questions (FAQ), in "PROG13. What is a descriptor?".
|