Yes, it is possible. As a matter of fact, the kernel API, or KPI, is mostly written in C++. The Kernel Extension Programming Guide and I/O Kit Fundamentals should get you started.
OSX Create C++ Kernel Extension
-
03-10-2022 - |
Domanda
I am trying to create a kext to be run on OS X 10.9. Currently, when I create the new project (in Xcode, I am given a c template with some methods I can override (cckext_start()
and cckext_stop()
). This is all fine and well but I would prefer to create my extension using c++.
Is this:
- Possible?
- Bad practice?
If so, how can I do it?
Soluzione
Altri suggerimenti
OSX is designed for Kext's to be developed with C++, making it easy and quick to inherit from base classes for your own use, such as IOService, IOAudioDevice, IOBlockStorageDevice etc.
If you're new to kext programming, I highly recommend investing in the book OS X and iOS Kernel Programming, as the majority of it is dedicated to driver and Kext development, with good example code.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow