File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -2843,8 +2843,33 @@ PNP_UnregisterDeviceClassAssociation(
28432843 LPWSTR pszInterfaceDevice ,
28442844 DWORD ulFlags )
28452845{
2846- UNIMPLEMENTED ;
2847- return CR_CALL_NOT_IMPLEMENTED ;
2846+ PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA PlugPlayData ;
2847+ NTSTATUS Status ;
2848+ CONFIGRET ret = CR_SUCCESS ;
2849+
2850+ UNREFERENCED_PARAMETER (hBinding );
2851+
2852+ DPRINT1 ("PNP_UnregisterDeviceClassAssociation(%p %S 0x%08lx)\n" ,
2853+ hBinding , pszInterfaceDevice , ulFlags );
2854+
2855+ if (pszInterfaceDevice == NULL )
2856+ return CR_INVALID_POINTER ;
2857+
2858+ if (ulFlags != 0 )
2859+ return CR_INVALID_FLAG ;
2860+
2861+ ZeroMemory (& PlugPlayData , sizeof (PlugPlayData ));
2862+ PlugPlayData .Register = FALSE;
2863+ PlugPlayData .SymbolicLinkName = pszInterfaceDevice ;
2864+ PlugPlayData .SymbolicLinkNameLength = wcslen (pszInterfaceDevice ) + 1 ;
2865+
2866+ Status = NtPlugPlayControl (PlugPlayControlDeviceClassAssociation ,
2867+ & PlugPlayData ,
2868+ sizeof (PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA ));
2869+ if (!NT_SUCCESS (Status ))
2870+ ret = NtStatusToCrError (Status );
2871+
2872+ return ret ;
28482873}
28492874
28502875
You can’t perform that action at this time.
0 commit comments