home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!gatech!rpi!raffuj
- From: raffuj@aix.rpi.edu (Jose A. Raffucci)
- Subject: Help w/Device.h and ThinkC
- Message-ID: <3j2xqqh@rpi.edu>
- Nntp-Posting-Host: aix.rpi.edu
- Organization: Rensselaer Polytechnic Institute, Troy, NY
- Date: Thu, 30 Jul 1992 19:33:49 GMT
- Lines: 39
-
- I'm having quite a bit of trouble with a bit of code just like
- this in an application I'm writing. All I want to do right now is get
- the driver opened and closed correctly. When I try to compile this (using
- ThinkC 5), it tells me that OpenDriver and CloseDriver aren't defined.
-
- The only thing I can think of is that I'm not passing it the stuff, although
- I've checked it. I don't have the User's guide, since it got stolen, so I
- can't check it out there. If anyone out there knows what I'm forgetting to
- do, or what stupid thing I've done wrong, I'd appreciate it if you could
- drop me some email...
-
-
- #include <stdio.h>
- #include <Devices.h>
-
- main()
- {
- OSErr err;
- short RefNum;
-
- err = OpenDriver("\p.RasterOps24STVPIP1.3d1", &RefNum);
- if (err != 0)
- printf("Error Detected\n");
- else
- printf("No Error\n");
-
- err = CloseDriver(RefNum);
-
- }
-
- thanx,
-
- -hOz
-
- --
-
- // The Amigoids from hell, raffuj@rpi.edu
- \X/ Renssepolyinstatechnitute
- - What do you mean it's only 3 1/2 inches long????!! -*
-