home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13222 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.3 KB  |  50 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!gatech!rpi!raffuj
  3. From: raffuj@aix.rpi.edu (Jose A. Raffucci)
  4. Subject: Help w/Device.h and ThinkC
  5. Message-ID: <3j2xqqh@rpi.edu>
  6. Nntp-Posting-Host: aix.rpi.edu
  7. Organization: Rensselaer Polytechnic Institute, Troy, NY
  8. Date: Thu, 30 Jul 1992 19:33:49 GMT
  9. Lines: 39
  10.  
  11.     I'm having quite a bit of trouble with a bit of code just like
  12. this in an application I'm writing.  All I want to do right now is get
  13. the driver opened and closed correctly.  When I try to compile this (using
  14. ThinkC 5), it tells me that OpenDriver and CloseDriver aren't defined.
  15.  
  16. The only thing I can think of is that I'm not passing it the stuff, although
  17. I've checked it.  I don't have the User's guide, since it got stolen, so I 
  18. can't check it out there.  If anyone out there knows what I'm forgetting to 
  19. do, or what stupid thing I've done wrong, I'd appreciate it if you could
  20. drop me some email...
  21.  
  22.  
  23. #include <stdio.h>
  24. #include <Devices.h>
  25.  
  26. main()
  27. {
  28.     OSErr    err;
  29.     short    RefNum;
  30.  
  31.     err = OpenDriver("\p.RasterOps24STVPIP1.3d1", &RefNum);
  32.     if (err != 0)
  33.         printf("Error Detected\n");
  34.     else 
  35.         printf("No Error\n");
  36.  
  37.     err = CloseDriver(RefNum);
  38.  
  39. }
  40.  
  41. thanx, 
  42.  
  43. -hOz
  44.  
  45. -- 
  46.  
  47.   //  The Amigoids from hell,     raffuj@rpi.edu              
  48. \X/   Renssepolyinstatechnitute                            
  49.      - What do you mean it's only 3 1/2 inches long????!! -*   
  50.