I've got a very simple driver kit driver. It's almost boiler plate.
I'm getting a build failure when trying to use OSDynamicCast
, as per the below
kern_return_t IMPL(MyHIDDriver, NewUserClient) {
IOService* client;
auto ret = Create(this, "MyTest", &client);
*userClient = OSDynamicCast(IOUserClient, client);
return ret;
}
My use of OSDynamicCast is giving me the following issue.
Use of undeclared identifier 'gIOUserClientMetaClass'; did you mean 'gIOUserServerMetaClass'?
Before adding the NewUserClient
override, the driver was running fine (I've observed it in the IORegistry).
I'm not sure what I'm missing here in Xcode that would cause this issue. Samples I've referenced, such as this, do exactly what I'm doing with OSDynamicCast.