IOUserClientMethodArguments structure* always null

I'm trying to communicate application <-> driverkit driver.

In IOUserClient ExternalMethod method, IOUserClientMethodArguments->structureOutput and IOUserClientMethodArguments->structureOutputDescriptor always null.

below is my code
  • - IOUserClient --

Code Block language
About IOUserClientMethodDispatch
Methods[1].function = myClient::myFunction;
Methods[1].checkScalarInputCount = 10;
Methods[1].checkStructureInputSize = kIOUserClientVariableStructureSize;
Methods[1].checkScalarOutputCount = 10;
Methods[1].checkStructureOutputSize = kIOUserClientVariableStructureSize;

  • - MyApplication --

Code Block language
uint64_t ScalarIn[10];
uint64_t ScalarOut[10];
uint16_t SturctureOut = 0;
size_t StructureOutSize = sizeof(uint16_t);
kern_return_t kRet = IOConnectCallMethod(Device, 1, ScalarIn, 10, NULL, 0, ScalarOut, 10, &StructureOut, (size_t*)&StructureOutSize);


IOConnectCallMethod return Success.
But In Client ExternalMethod, structureOutput and structureOutputDescriptor always null. structureOutputMaximumSize is correct.

Does anyone can help, how can i pass structure param correctly?
Hi,
I'm also facing same issue. For me also structureOutput value as 0 receiving in UserClient.

One more issue I'm facing is that even structure Input data is not matching what sent by application.
IOUserClientMethodArguments structure* always null
 
 
Q