Hi guys,
I wrote BDA driver. Everything works just fine. But now I need to comunicate
with it from user-level. I think that KS custom method mechanism will be
suitable for my needs because I just need to transfer data buffer from my
user-side application to this BDA driver.
So I do following in the app:
{
IKsControl* pIKsControl;
hr = CoCreateInstance(
CLSID_Proxy,
NULL,
CLSCTX_SERVER,
__uuidof(pIKsControl),
(LPVOID*)&pIKsControl);
//
// here hr is S_OK and pIKsControl is not NULL
//
KSMETHOD ksMethod =
{
KSMETHODSETID_SetGuid,
KSMETHOD_ITEM_Id,
KSMETHOD_TYPE_SEND
};
ULONG BytesReturned = 0;
hr = pIKsControl->KsMethod(
&ksMethod,
sizeof(ksMethod),
buffer, //buffer pointer
buffer_length, //buffer size
&BytesReturned);
//
// here hr is E_HANDLE; so some handle that is not valid
//
}
Of course, I implemented MethodSet in KSAUTOMATION_TABLE in the BDA
driver.
Please help to understand me where is the problem.
With best regards
---
Bye,
Sasha Bublyk