Ignore:
Timestamp:
02/06/03 20:11:46 (19 years ago)
Author:
Nicholas Riley
Message:

ICeCoffEE 1.3.1d1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/APEMain.m

    r74 r88  
    1818#import "ICeCoffEE.h"
    1919#import "ICeCoffEETextEdit.h"
     20#import "CPS.h"
    2021
    2122//¥¥¥ Our settings
     
    7778    {
    7879        ICapeprintf("ICeCoffEE APE: not loading as this application is excluded.\n");
     80        return;
     81    }
     82
     83    CPSProcessSerNum psn;
     84    OSStatus err = CPSGetCurrentProcess(&psn);
     85    if (err != noErr) {
     86        apeprintf("ICeCoffEE APE: Can't get process serial number for current process (error %ld); not loading in this application\n", err);
     87        return;
     88    }
     89   
     90    CPSProcessInfoRec info;
     91    err = CPSGetProcessInfo(&psn, &info, NULL, 0, NULL, NULL, 0);
     92    if (err != noErr) {
     93        apeprintf("ICeCoffEE APE: Can't get process information (error %ld); not loading in this application\n", err);
     94        return;
     95    }
     96    ICapeprintf("ICeCoffEE APE: got process attributes = 0x%lx\n", info.Attributes);
     97    if (info.Attributes & (kCPSBGOnlyAttr | kCPSUIElementAttr | kCPSFullScreenAttr)) {
     98        ICapeprintf("ICeCoffEE APE: not loading as this application is background-only\n");
    7999        return;
    80100    }
Note: See TracChangeset for help on using the changeset viewer.