none
CM_Register_Notification returning error code - CR_INVALID_LOAD_TYPE RRS feed

  • Question

  • Below is my code snippet to register the device interface arrival.

    DEFINE_GUID (MY_INTERFACE_GUID,
    0x82a112d9, 0x1f75, 0x4388, 0x81, 0xe3, 0xb6, 0x4a, 0xaf, 0x17, 0x24, 0x58);

    // initialize CM filter
    memset(&CMfilter, 0x0, sizeof(CMfilter));
    CMfilter.cbSize = sizeof(CMfilter);
    CMfilter.FilterType = CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE;
    CMfilter.u.DeviceInterface.ClassGuid = MY_INTERFACE_GUID;

    ret = CM_Register_Notification(&CMfilter, NULL, CMNotifyCb, pHCMNotify);
    if (CR_SUCCESS != ret)
    {
    }

    But for CM_Register_Notification() I am always getting an error code return value as  ---

    #define CR_INVALID_LOAD_TYPE        (0x00000019)

    What is the exact meaning of this error type?

    I have used any defined GUID which assume should not be a problem, as we can register interface notification for any unknown GUID as well.





    pankaj

    Wednesday, February 11, 2015 2:07 AM

All replies

  • Please ensure you are posting to the correct forum in the future.  I am moving this to the driver forum as I think it goes there.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, February 11, 2015 4:08 PM