I’m creating a callback with ExCreateCallback from the DriverEntry. The function succeeds and creates a callback for which ExRegisterCallback also succeeds, but the callback is an unnamed object, is not present in \Callback directory and subsequent open with ExCreateCallback(…,…,FALSE,…) with a same name returns STATUS_OBJECT_NAME_NOT_FOUND
Using approximatelly this code:
#define wszCallbackName L"\Callback\MyCallbackName"
{
UNICODE_STRING CallbackName;
OBJECT_ATTRIBUTES ObjAttr;
RtlInitUnicodeString(&CallbackName,wszCallbackName);
InitializeObjectAttributes(&ObjAttr,&CallbackName,OBJ_CASE_INSENSITIVE,NULL,NULL);
Status=ExCreateCallback(&CallbackObj,&ObjAttr,TRUE,TRUE);
}
How should then a named callback be created?