home *** CD-ROM | disk | FTP | other *** search
/ Computerworld 1996 March / Computerworld_1996-03_cd.bin / idg_cd3 / aplikace / cad / wplot211 / wplotcmd.h < prev    next >
Text File  |  1995-09-15  |  2KB  |  32 lines

  1. // WPLOTCMD.H - C Header file for DLL used to send commands & data to WPlot.
  2. // Hooks to these functions will be linked to the users program if the
  3. // import library file WPLOTCMD.LIB is specified in the project file or
  4. // if the following code is included in the program's DEF file:
  5. // IMPORTS  WPLOTCMD.StartWPlot
  6. //          WPLOTCMD.WPlotcmd
  7.  
  8. int FAR PASCAL _export StartWPlot( int id, char far *path );
  9. // Starts WPlot with parameter "#n" where n is a specified buffer id (1 to 4).
  10. // The id allows up to 4 different instances of WPlot to be controlled.
  11. // The path to WPlot is specified by the second parameter (may be NULL).
  12. // If the path specifies a directory then it must be followed by a "\".
  13. // Returns 0 if successfull, else one of the following error codes:
  14. // 1: Out of memory, 2: Invalid id, 3: File not found, 4: Path not found
  15. // 5 or greater: unspecified error.
  16.  
  17. int FAR PASCAL _export WPlotcmd( int id, char far *pcmd, int nocheck );
  18. // Puts command pointed to by pcmd into internal buffer associated with id if
  19. // the buffer is empty.  Returns 0 if successfull; returns 1 if the buffer is
  20. // not empty, i.e. the buffer has not yet been read by WPlot.  The test for
  21. // an empty buffer is disabled if nocheck is nonzero.  WPlotcmd can be called
  22. // with pcmd = NULL (and nocheck = 0) to just check that the buffer is empty.
  23. // NOTE:  The WPlotcmd function calls PeekMessage to make sure WPlot had a
  24. // chance to read the previous command.
  25.  
  26. void FAR PASCAL _export getcmd( int id, char far *pcmd, int maxc );
  27. // Copies command from internal buffer associated with id to pcmd;
  28. // a maximum of maxc characters will be copied (including null char).
  29. // Just the null character is copied if the buffer is empty.  This is the
  30. // function that WPlot uses to read a command; it is not needed by the user.
  31.  
  32.