First post, by red-ray
- Rank
- Oldbie
I noticed some of my Windows 9x systems had a lot of 👻 Devices and AFAIK the way you are meant to delete them is to boot into Save mode and use the device manager in the system properties panel which is tedious. I wondered if the SIV Menu->System->👻 Devices panel would work on W98SE, so I built a SIV32L with it enabled and it did, but when I selected a device and pressed [Exorcise] it claimed to have deleted it, but didn't.
The root cause of the issue is with CM_Uninstall_DevNode() which works on W2K and later, claims to work on W98SE, but doesn't, is there a way to make it work?
My plan B was to do RegDeleteKey( HKEY_LOCAL_MACHINE, ... ) on W9x so I changed the code and that worked at the first time of asking, I don't like doing it this way, is there any other way?
GetWindowText( ihl, tnb, numbof( tnb ) ); // get the PnP IDif( CR_SUCCESS != ( sts = CM_Locate_DevNode( // Unable to Locate the Device Node ?addrof( dvi ), //tnb, //CM_LOCATE_DEVNODE_PHANTOM ) ) ) //{ //stprintf( twb, TEXT( "Status %d, " ) // yes, set to whingeTEXT( "Failed to Locate the %s DevNode" ), //sts, //tnb ); //break;} //if( MODE_W2K & mode ) // Windows 2K and later ?{ //if( CR_SUCCESS != ( sts = pCM_Uninstall_DevNode( dvi, 0 ) ) ) // yes, Unable to Uninstall the DevNode ?{ //stprintf( twb, TEXT( "Status %d, " ) // yes, set to whingeTEXT( "Failed to Uninstall the %s DevNode" ), //sts, //tnb ); //break; //} //} //else //if( MODE_W98 & mode ) // Windows 98 and later ?{ //if( ERROR_SUCCESS != ( sts = RegDeleteKey( HKEY_LOCAL_MACHINE, // yes, RegDeleteKey failed ?( stprintf( tkb, TEXT( "Enum\\%s" ), //tnb ), tkb ) ) ) ) //{ //stprintf( twb, TEXT( "Status %d, " ) // yes, set to whingeTEXT( "RegDeleteKey( HKLM\\%s ) Failed" ), //sts, //tkb ); //break; //} //} //else //{ //stprintf( twb, TEXT( "Not Supported on %s, " ) // else whinge, not supportedTEXT( "Failed to Uninstall the %s DevNode" ), //sgb->win_osn, //tnb ); //break; //} //
Below you can see the exorcised ghost's PCI ID no longer has any children.