Re: KextManager question
Re: KextManager question
- Subject: Re: KextManager question
- From: Shane Stanley <email@hidden>
- Date: Tue, 16 Jun 2015 13:44:37 +1000
On 16 Jun 2015, at 1:23 pm, John C. Welch <email@hidden> wrote:
I am really sick of the kextstat loop dance.
I'm not sure what the problem there is, but this is a good case for using a Cocoa superclass. I cover in my book how to make a basic Cocoa class and make your AS class a subclass of it (chapter 16). You could just copy ClassWithExtras.h and ClassWithExtras.m to your project as is, and change the AS class's parent property.
Then in the .m file after the existing #import line, add:
#import <IOKit/kext/KextManager.h>
If you're running an older version of the OS, you need to add IOKit.framework to the project as well.
Then somewhere after the @implementation line, add:
- (NSDictionary *)loadedKextInfo { NSDictionary *dict = CFBridgingRelease(KextManagerCopyLoadedKextInfo(NULL, NULL)); return dict; }
Call it in your AS like this:
set theRecord to loadedKextInfo()
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden