Règle PdoInitFreeDeviceCallback (kmdf)
La règle PdoInitFreeDeviceCallback spécifie que le pilote doit appeler WdfDeviceInitFree si une erreur se produit lorsque le pilote appelle une fonction d’initialisation d’objet de périphérique framework.
Si votre pilote rencontre une erreur lors de l’initialisation d’un nouvel objet de périphérique d’infrastructure, et si le pilote a reçu la structure WDFDEVICE_INIT d’un appel à WdfPdoInitAllocate, le pilote doit appeler WdfDeviceInitFree.
Modèle de pilote : KMDF
Comment tester
Au moment de la compilation |
---|
Exécutez Static Driver Verifier et spécifiez la règle PdoInitFreeDeviceCallback . Utilisez les étapes suivantes pour exécuter l’analyse de votre code :
Pour plus d’informations, consultez Utilisation du vérificateur de pilote statique pour rechercher des défauts dans les pilotes. |
S’applique à
WdfDeviceInitAssignNameWdfDeviceInitAssignSDLStringWdfDeviceInitAssignWdmIrpPreprocessCallbackWdfDeviceInitFreeWdfDeviceInitRegisterPnpStateChangeCallbackWdfDeviceInitFree WdfDeviceInRegitRegisterPowerPolicyStateChangeCallbackWdfDeviceInitRegisterPowerStateChangeCallbackWdfPdoInitAddCompatibleIDWdfPdoInitAddDeviceTextWdfPdoInitAddHardwareIDWdfPdoInitAllocateWdfPdoInitAssignDeviceIDWdfPdoInitAssignInstanceIDWdfPdoInitAssignRawDevice
Voir aussi
InitFreeDeviceCallbackinitFreeDeviceCreateinitFreeDeviceCreateType2PdoInitFreeDeviceCreateType2initFreeDeviceCreateType4PdoInitFreeDeviceCreatePdoInitFreeDeviceCreateType4initFreeNull
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour