• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: KextManager question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KextManager question


  • Subject: Re: KextManager question
  • From: John Welch <email@hidden>
  • Date: Tue, 16 Jun 2015 09:04:05 -0400
  • Thread-topic: KextManager question

I’ll give that a try. Before, to get a list of loaded kexts and information about them, I had to do a dance involving kextstat and kextfind, and it was really, really slow, and remarkably resistant to going faster. Being able to use kextmanager should make that go much faster, and let me remove two loops.

From: Shane Stanley <email@hidden>
Date: Monday, 15 June, 2015 at 23:44
To: John Welch <email@hidden>
Cc: ASObjC <email@hidden>
Subject: Re: KextManager question

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()


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

  • Follow-Ups:
    • Re: KextManager question
      • From: Shane Stanley <email@hidden>
References: 
 >KextManager question (From: John Welch <email@hidden>)
 >Re: KextManager question (From: Shane Stanley <email@hidden>)
 >Re: KextManager question (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: KextManager question
  • Next by Date: Re: KextManager question
  • Previous by thread: Re: KextManager question
  • Next by thread: Re: KextManager question
  • Index(es):
    • Date
    • Thread