I notice that the include file supplied with mcad 2000 professional does not contain any references for creating user defined dll's which perform file i/o. Where can I obtain the updated include file which contains the file i/o definitions.
The trick with file I/O as far as I have found, is passing the filename to the function. To do this, you have to add the following definitions to your MCADINCL.H file:
// your function will be passed a const char * pointer #define INFILE 13 // an OUTFILE is like an INFILE except it allows you // to put your function on the left side of a := like // the WRITEPRN() builtin #define OUTFILE 14
These are new "type indexes" which you can put into your FUNCTIONINFO structure. Both INFILE and OUTFILE pass the filename as a char* and prepend the path to the beginning of the filename if necessary. OUTFILE allows you to use the function on the LHS of an equation like WRITEPRN.