SSDL for user mode communicating with kernel

33 Views Asked by At

I am working on a Windows driver, and I needed to use IOCTL to communicate between a user mode program and my driver, but I am not exactly sure which SSDL code I should use. Right now, I have the following...

    PWDFDEVICE_INIT pInit = NULL;

    pInit = WdfControlDeviceInitAllocate(Driver, &SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R);

    if (pInit == NULL) {
        status = STATUS_INSUFFICIENT_RESOURCES;
        goto Error;
    }

    WdfDeviceInitSetExclusive(pInit, TRUE);

I set WdfDeviceInitSetExclusive exclusive boolean to TRUE because I only want one instance of my user mode program to be able to communicate to this queue. However, my main question pertains to which SSDL I should use for a read only and write only ICOTL communication between user mode and my kernel driver. Based on the description inside of wdmsec.h it seems that SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_R might be the best choice for read while SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_R_RES_R is best for write since there does not seem to be a write specific SSDL.

0

There are 0 best solutions below