打印IRP_MJ_PNP所有子功能设备

4 0 2021-06-30 本文地址:http://www.usbzh.com/fun/detail-36.html

PCHAR
PnPMinorFunctionString(
    UCHAR MinorFunction
)
{
    static char str[256];
    switch (MinorFunction)
    {
    case IRP_MN_START_DEVICE:
        return "IRP_MN_START_DEVICE\n";

    case IRP_MN_QUERY_REMOVE_DEVICE:
        return "IRP_MN_QUERY_REMOVE_DEVICE\n";

    case IRP_MN_REMOVE_DEVICE:
        return "IRP_MN_REMOVE_DEVICE\n";

    case IRP_MN_CANCEL_REMOVE_DEVICE:
        return "IRP_MN_CANCEL_REMOVE_DEVICE\n";

    case IRP_MN_STOP_DEVICE:
        return "IRP_MN_STOP_DEVICE\n";

    case IRP_MN_QUERY_STOP_DEVICE:
        return "IRP_MN_QUERY_STOP_DEVICE\n";

    case IRP_MN_CANCEL_STOP_DEVICE:
        return "IRP_MN_CANCEL_STOP_DEVICE\n";

    case IRP_MN_QUERY_DEVICE_RELATIONS:
        return "IRP_MN_QUERY_DEVICE_RELATIONS\n";

    case IRP_MN_QUERY_INTERFACE:
        return "IRP_MN_QUERY_INTERFACE\n";

    case IRP_MN_QUERY_CAPABILITIES:
        return "IRP_MN_QUERY_CAPABILITIES\n";

    case IRP_MN_QUERY_RESOURCES:
        return "IRP_MN_QUERY_RESOURCES\n";

    case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
        return "IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n";

    case IRP_MN_QUERY_DEVICE_TEXT:
        return "IRP_MN_QUERY_DEVICE_TEXT\n";

    case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
        return "IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n";

    case IRP_MN_READ_CONFIG:
        return "IRP_MN_READ_CONFIG\n";

    case IRP_MN_WRITE_CONFIG:
        return "IRP_MN_WRITE_CONFIG\n";

    case IRP_MN_EJECT:
        return "IRP_MN_EJECT\n";

    case IRP_MN_SET_LOCK:
        return "IRP_MN_SET_LOCK\n";

    case IRP_MN_QUERY_ID:
        return "IRP_MN_QUERY_ID\n";

    case IRP_MN_QUERY_PNP_DEVICE_STATE:
        return "IRP_MN_QUERY_PNP_DEVICE_STATE\n";

    case IRP_MN_QUERY_BUS_INFORMATION:
        return "IRP_MN_QUERY_BUS_INFORMATION\n";

    case IRP_MN_DEVICE_USAGE_NOTIFICATION:
        return "IRP_MN_DEVICE_USAGE_NOTIFICATION\n";

    case IRP_MN_SURPRISE_REMOVAL:
        return "IRP_MN_SURPRISE_REMOVAL\n";


    default:
        sprintf(str, "IRP_MN_%02x\n", MinorFunction);
        return str;
    }
}
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

您的支持,是我们前进的动力!