- [Main Page](index.md)
- [Classes](annotated.md)
- [Files](files.md)
- [Directories](dirs.md)
- [Related Pages](pages.md)
- [File List](files.md)
- [File Members](globals.md)
k_status.h¶
Go to the documentation of this file.
00001 /*
00002 * k_status.h
00003 *
00004 * (c) 1992-96 Sassafras Software Inc.
00005 */
00006
00007 #define scDetachable 0x00000001 /* key can be reclaimed by KeyServer without affecting program */
00008 #define scHaveKey 0x00000080 /* key is valid and held by client */
00009
00010 #define keyOldClientErr 9507 /* the client software is too old to get a key for this program */
00011 #define keyNotKeyedErr 9520 /* returned by KeyStatus if the indicated program is not keyed */
00012 #define keyNoClientErr -1 /* KeyAccess not installed or not running (generated by glue) */
00013
00014 int pascal KeyStatus (long keyRef, long FAR *flags, long FAR *foreTime);
00015 int pascal KeyIntfS4200 (void);
00016
00017 /*
00018 int pascal KeyStatus (long keyRef, long FAR *flags, long FAR *foreTime);
00019
00020 DESCRIPTION
00021
00022 This function checks the status of any keyed program, or
00023 indicates that the calling program is not keyed.
00024
00025 PARAMETERS
00026
00027 keyRef [in] reference for the keyed program,
00028 or zero for current program.
00029 flags [out] service class. See above bits
00030 for details (scDetachable, etc.)
00031 foreTime [out] number of seconds that the keyed
00032 program has been in foreground.
00033
00034 USAGE
00035
00036 long flags;
00037 long foreTime;
00038
00039 err = KeyStatus(0, &flags, &foreTime);
00040
00041 Call KeyStatus to check whether a program is keyed, and if so,
00042 what the status of the key is. If the program is not keyed,
00043 KeyStatus returns keyNotKeyedErr, keyOldClientErr, keyNoClientErr,
00044 or some other negative error code. On noErr, the status of the
00045 key is returned in flags, and the time that the program has
00046 spent running in the foreground is returned in foreTime.
00047
00048 The status flags can be used to determine whether the key for a
00049 keyed program has been invalidated, and what type of services
00050 are activated for the keyed program. The most interesting flags
00051 are the scDetachable and scHaveKey flags, which reflect the
00052 validity of the key. If scHaveKey is clear, then the keyed
00053 program is no longer running with KeyServerÍs permission. This
00054 normally means that the user has been asked to quit from the
00055 keyed program because of a network failure, because the key
00056 timed out, or because the KeyServer administrator reclaimed the
00057 key. However, if the KeyServer administrator has made the key
00058 detachable, the user should still be allowed to run the keyed
00059 program. This option is usually set for programs that are site
00060 licensed, or have an infinite number of keys available.
00061
00062 In order to use this routine, you will need to link k_status.lib
00063 with your other object code. To guarantee you are using the
00064 proper version of this object code file, use the KeyIntfS4200()
00065 routine.
00066
00067
00068 int pascal KeyIntfS4200 (void);
00069
00070 DESCRIPTION
00071
00072 This function provides a means of version control for the
00073 k_status.lib object library.
00074
00075 USAGE
00076
00077 err = KeyIntfS4200();
00078
00079 To make sure that the interface file you use matches the object
00080 file, include one call, anywhere in your code, to the KeyIntfS3100
00081 routine. If the object library does not support the proper version
00082 of the KeyStatus routine, you will get a link-time error, telling
00083 you that KeyIntfS3100 is not defined. In this case, you should
00084 locate the proper version of k_status.lib, and include it in your
00085 link process.
00086
00087 When you build your program for the final release, you can remove
00088 the call to KeyIntfS3100. There is very little overhead to leaving
00089 it in the final code, but sometimes every byte counts. The only
00090 real error conditions stemming from this function will happen at
00091 program link time.
00092
00093 */
00094
This A:M SDK v12.0 documentation is maintained by Hash Inc. Please address any comments concerning this documentation to AMReports. If you have any information, knowledge, or documentation to share with the A:M developer community, please post them on the Hash SDK forum.
Generated on Thu Oct 27 11:46:44 2005 with doxygen 1.4.5 written by Dimitri van Heesch, © 1997-2001