Freigeben über


TreiberRegel erstellen (kmdf)

Die DriverCreate-Regel gibt an, dass ein Treiber, der kernel mode Driver Framework (KMDF) verwendet, die WdfDriverCreate-Methode aufrufen muss, um ein Frameworktreiberobjekt aus seiner DriverEntry-Routine zu erstellen.

Treibermodell: KMDF

So führen Sie einen Test durch

Beim Kompilieren:

Führen Sie Static Driver Verifier aus , und geben Sie die DriverCreate-Regel an .

Gehen Sie folgendermaßen vor, um Ihren Code zu analysieren:
  1. Bereiten Sie den Code vor (verwenden Sie Rollentypdeklarationen).
  2. Führen Sie Static Driver Verifier aus.
  3. Überprüfen und analysieren Sie die Ergebnisse.

Weitere Informationen finden Sie unter Verwenden der statischen Treiberüberprüfung, um Fehler in Treibern zu finden.

Gilt für:

WdfChildListAddOrUpdateChildDescriptionAsPresentWdfChildListBeginIterationWdfChildListBeginScanWdfChildListErstellenWdfChildListEndIterationWdfChildListEndScanWdfChildListGetDeviceWdfChildListRequestChildEjectWdfChildListRetrieveAddressDescriptionWdfChildListRetrieveNextDeviceWdfChildListRetrievePdoWdfChildListUpdateAllChildDescriptionsAsPresentWdfChildListUpdateChildDescriptionAsMissingWdfCmResourceListAppendDescriptorWdfCmResourceListGetDescriptorWdfCmResourceListGetDescriptorWdfCmResourceListInsertDescriptorWdfCmResourceListRemoveWdfCmResourceListRemoveByDescriptorWdfCollectionAddWdfCollectionCreateWdfCollectionGetCountWdfCollectionGetFirstItemWdfCollectionGetItemWdfCollectionGetLastItemWdfCollectionRemoveWdfCollectionRemoveItemWdfCommonBufferCreateWdfCommonBufferCreateWithConfigWdfCommonBufferGetAlignedLogicalAddressWdfCommonBufferGetAlignedVirtualAddressWdfCommonBufferGetAlignedVirtualAddress WdfCommonBufferGetLengthWdfControlDeviceInitAllocateWdfControlDeviceInitSetShutdownNotificationWdfControlFinishInitializingWdfDeviceAddDependentUsageDeviceDeviceObjectWdfDeviceAddQueryInterfaceWdfDeviceAddRemovalRelationsPhysicalDeviceWdfDeviceAllocAndQueryPropertyWdfDeviceAssignMofResourceNameWdfDeviceAssignS0IdleSettingsWdfDeviceAssignSxWakeSettingsWdfDeviceClearRemovalRelationsDevicesWdfDeviceConfigureRequestDispatchingWdfDeviceConfigureWdmIrpDispatchCallbackWdfDeviceCreateWdfDeviceCreateDeviceInterfaceWdfDeviceCreateSymbolicLinkWdfDeviceEnqueueRequestWdfDeviceGetAlignmentRequirementWdfDeviceGetCharacteristicsWdfDeviceGetDefaultQueueWdfDeviceGetDevicePnpStateWdfDeviceGetDevicePowerPolicyStateWdfDeviceGetDevicePowerStateWdfDeviceGetDeviceStateWdfDeviceGetDriverWdfDeviceGetFileObjectWdfDeviceGetIoTargetWdfDeviceGetSystemPowerAction WdfDeviceGetSystemPowerActionWdfDeviceGetviceIndicateWakeStatusWdfDeviceInitAssignNameWdfDeviceInitAssignSDDLStringWdfDeviceInitAssignWdmIrpPreprocessCallbackWdfDeviceInitFreeWdfDeviceInitRegisterPnpStateChangeCallbackWdfDeviceInitRegisterPowerPolicyStateChangeCallbackWdfDeviceInitRegisterPowerStateChangeCallbackWdfDeviceInitSetCharacteristicsWdfDeviceInitSetDeviceClassWdfDeviceInitSetDeviceTypeWdfDeviceInitSetExclusiveWdfDeviceInitSetFileObjectConfigWdfDeviceInitSetIoInCallerContextCallbackWdfDeviceInitSetIoTypeWdfDeviceInitSetPnpPowerEventCallbacksWdfDeviceInitSetPowerInrushWdfDeviceInitSetPowerNotPageableWdfDeviceInitSetPowerPageableWdfDeviceInitSetPowerPolicyEventCallbacksWdfDeviceInitSetPowerPolicyOwnershipWdfDeviceInitSetReleaseHardwareOrderOnFailureWdfDeviceInitSetRemoveLockOptionsWdfDeviceInitSetRequestAttributesWdfDeviceMiniportCreateWdfDeviceOpenRegistryKeyWdfDeviceQueryPropertyWdfDeviceRemoveDependentUsageDeviceObjectWdfDeviceRemoveRemovalRelationsPhysicalDeviceWdfDeviceResumeIdleWdfDeviceRetrieveDeviceInterfaceStringWdfDeviceRetrieveDeviceNameWdfDeviceSetAlignmentRequirementWdfDeviceSetBusInformationForChildrenWdfDeviceSetCharacteristicsWdfDeviceSetDeviceSetDeviceInterfaceStateWdfDeviceSetDeviceSetDeviceSetFailedWdfDeviceSetPnpCapabilitiesWdfDeviceSetPowerCapabilitiesWdfDeviceSetSpecialFileSupportWdfDeviceSetStaticStopRemoveWdfDeviceStopIdleWdfDeviceWdmAssignPowerFrameworkSettingsWdfDeviceWdmDispatchIrpWdfDeviceWdmDispatchIrpToIoQueueWdfDeviceWdmDispatchPreprocessedIrpWdfDeviceWdmGetAttachedDeviceWdfDeviceWdmGetDeviceObjectWdfDeviceWdmGetPhysicalDeviceWdfDmaEnablerConfigureSystemProfileWdfDmaEnablerCreateWdfDmaEnablerGetFragmentLengthWdfDmaEnablerGetMaximumLengthWdfDmaEnablerGetMaximumScatterGatherElementsWdfDmaEnablerSetMaximumScatterGatherElementsWdfDmaEnablerWdmGetDmaAdapterWdfDmaTransactionAllocateResourcesWdfDmaTransactionCancelWdfDmaTransactionCreateWdfDmaTransactionDmaCompletedWdfDmaTransactionDmaCompletedFinalWdfDmaTransactionDmaCompletedWithLengthWdfDmaTransactionExecuteWdfDmaTransactionFreeResourcesWdfDmaTransactionGetBytesTransferredWdfDmaTransactionGetCurrentDmaTransferLengthWdfDmaTransactionGetDeviceWdfDmaTransactionGetRequestWdfDmaTransactionGetTransferInfoWdfDmaTransactionInitializeWdfDmaTransactionInitializeUsingOffsetWdfDmaTransactionInitializeUsingRequestWdfDmaTransactionReleaseWdfDmaTransactionSetChannelConfigurationCallbackWdfDmaTransactionSetDeviceAddressOffsetWdfDmaTransactionSetImmediateExecutionWdfDmaTransactionSetMaximumLengthWdfDmaTransactionSetTransferCompleteCallbackWdfDmaTransactionStopSystemTransferWdfDmaTransactionWdmGetTransferContextWdfDpcCancelWdfDpcCreateWdfDpcEnqueueWdfDpcGetParentObjectWdfDpcWdmGetDpcWdfDriverCreateWdfDriverGetRegistryPathWdfDriverIsVersionAvailableWdfDriverMiniportUnloadWdfDriverOpenParametersRegistryKeyWdfDriverRegisterTraceInfoWdfDriverRetrieveVersionStringWdfDriverWdmGetDriverWdmGetDriverObjectWdfFdoAddStaticChildWdfFdoGetDefaultChildListWdfFdoInitAllocAndQueryPropertyWdfFdoInitOpenRegistryKeyWdfFdoInitQueryPropertyWdfFdoInitSetDefaultChildListConfigWdfFdoInitSetEventCallbacksWdfFdoInitSetFilterWdfFdoInitWdmGetPhysicalDeviceWdfFdoLockStaticChildListForIterationWdfFdoQueryForInterfaceWdfFdoRetrieveNextStaticChildWdfFdoUnlockStaticChildListFromIterationWdfFileObjectGetDeviceWdfFileObjectGetFileNameWdfFileObjectGetFlagsWdfFileObjectWdmGetFileObjectWdfGetTriageInfoWdfInterruptAcquireLockWdfInterruptCreateWdfInterruptDisableWdfInterruptEnableWdfInterruptGetDeviceWdfInterruptGetInfoWdfInterruptQueueDpcForIsrWdfInterruptQueueWorkItemForIsrWdfInterruptReleaseLockWdfInterruptReportActiveWdfInterruptReportInactiveWdfInterruptSetExtendedPolicyWdfInterruptSetPolicyWdfInterruptSynchronizeWdfInterruptTryToAcquireLockWdfInterruptWdmGetInterruptWdfIoQueueAssignForwardProgressPolicyWdfIoQueueCreateWdfIoQueueDrainWdfIoQueueDrainSynchronouslyWdfIoQueueFindRequestWdfIoQueueGetDeviceWdfIoQueueGetStateWdfIoQueuePurgeWdfIoQueuePurgeSynchronlyWdfIoQueueReadyNotifyWdfIoQueueRetrieveFoundRequestWdfIoQueueRetrieveNextRequestWdfIoQueueRetrieveRequestByFileObjectWdfIoQueueStartWdfIoQueueStopWdfIoQueueStopAndPurgeWdfIoQueueStopAndPurgeSynchronlyWdfIoQueueStopSynchronouslyWdfIoResourceListAppendDescriptorWdfIoResourceListCreateWdfIoResourceListGetCountWdfIoResourceListGetDescriptorWdfIoResourceListInsertDescriptorWdfIoResourceListRemoveWdfIoResourceListRemoveByDescriptorWdfIoResourceListUpdateDescriptorWdfIoResourceRequirementsListAppendIoResListWdfIoResourceRequirementsListGetCountWdfIoResourceRequirementsListGetIoResListWdfIoResourceRequirementsListdfIoResourceRequirerementsListRemoveWdfIoResourceRequirerementsListRemoveByIoResListWdfIoResourceRequirementsListSetInterfaceTypeWdfIoResourceRequirementsListSetSlotNumberWdfIoTargetAllocAndQueryTargetPropertyWdfIoTargetCloseWdfIoTargetCloseForQueryRemoveWdfIoTargetCreateWdfIoTargetFormatRequestForInternalIoctlWdfIoTargetFormatRequestForInternalIoctlOthersWdfIoTargetFormatRequestForIoctlWdfIoTargetFormatRequestForReadWdfIoTargetFormatRequestForWriteWdfIoTargetGetDeviceWdfIoTargetGetStateWdfIoTargetOpenWdfIoTargetPurgeWdfIoTargetQueryForInterfaceWdfIoTargetQueryTargetTargetPropertyWdfIoTargetSendInternalIoctlOthersSynchroneWdfIoTargetSendInternalIoctlSynchronouslyWdfIoTargetSendIoctlSynchronouslyWdfIoTargetSendReadSynchronouslyWdfIoTargetSendWriteSynchronouslyWdfIoTargetStartWdfIoTargetStopWdfIoTargetWdmGetTargetDeviceObjectWdfIoTargetWdmGetTargetFileHandleWdfIoTargetWdmGetTargetFileObjectWdfIoTargetWdmGetTargetPhysicalDeviceWdfLookasideListCreateWdfMemoryAssignBufferWdfMemoryCopyFromBufferWdfMemoryCopyToBufferWdfMemoryCreateWdfMemoryCreateFromLookasideWdfMemoryCreatePreallocatedWdfMemoryGetBufferWdfObjectAcquireLockWdfObjectAllocateContextWdfObjectContextGetObjectWdfObjectCreateWdfObjectDeleteWdfObjectDereferenceWdfObjectDereferenceActualWdfObjectGetTypedContextWorkerWdfObjectQueryWdfObjectReferenceWdfObjectReferenceActualWdfObjectReleaseLockWdfPdoAddEjectionRelationsPhysicalDeviceWdfPdoClearEjectionRelationsDevicesWdfPdoGetParentWdfPdoInitAddCompatibleIDWdfPdoInitAddDeviceTextWdfPdoInitAddHardwareIDWdfPdoInitItitAllocateWdfPdoInitAllowForwardingRequestToParentWdfPdoInitAssignContainerIDWdfPdoInitAssignDeviceIDWdfPdoInitAssignInstanceIDWdfPdoInitAssignRawDeviceWdfPdoInitSetDefaultLocaleWdfPdoInitSetEventCallbacksWdfPdoMarkMissingWdfPdoRemoveEjectionRelationsPhysicalDeviceWdfPdoRequestEjectWdfPdoRetrieveAddressDescriptionWdfPdoRetrieveIdentificationDescriptionWdfPdoUpdateAddressDescriptionWdfRegistryAssignMemoryWdfRegistryAssignMultiStringWdfRegistryAssignStringWdfRegistryAssignULongWdfRegistryAssignUnicodeStringWdfRegistryAssignValueWdfRegistryCloseWdfRegistryCreateKeyWdfRegistryOpenKeyWdfRegistryQueryMemoryWdfRegistryQueryMultiStringWdfRegistryQueryStringWdfRegistryQueryULongWdfRegistryQueryUnicodeStringWdfRegistryQueryValueWdfRegistryRemoveKeyWdfRegistryRemoveValueWdfRegistryWdmGetHandleWdfRequestAllocateTimerWdfRequestCancelSentRequestChangeTargetWdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoostWdfRequestCreateWdfRequestCreateFromIrpWdfRequestFormatRequestUsingCurrentTypeWdfRequestForwardToIoQueueWdfRequestForwardToParentDeviceIoQueueWdfRequestGetCompletionParamsWdfRequestGetFileObject WdfRequestGetInformationWdfRequestGetIoQueueWdfRequestGetParametersWdfRequestGetRequestGetRequestorModeWdfRequestGetStatusWdfRequestIsCanceledWdfRequestIsFrom32BitProcessWdfRequestIsReservedWdfRequestMarkCancelableWdfRequestMarkCancelableExWdfRequestProbeAndLockUserBufferForReadWdfRequestProbeAndLockUserBufferForWriteWdfRequestRequeueWdfRequestRetrieveInputBufferWdfRequestRetrieveInputMemoryWdfRequestRetrieveInputWdmMdlWdfRequestRetrieveOutputBufferWdfRequestRetrieveOutputMemoryWdfRequestRetrieveOutputWdmMdlWdfRequestRetrieveUnsafeUserInputBufferWdfRequestRetrieveUnsafeUserOutputBufferWdfRequestReuseWdfRequestSendWdfRequestSetCompletionRoutineWdfRequestSetInformationWdfRequestStopAcknowledgeWdfRequestUnmarkCancelableWdfRequestWdmFormatUsingStackLocationWdfRequestWdmGetIrpWdfSpinLockAcquireWdfSpinLockCreateWdfSpinLockReleaseWdfStringCreateWdfStringGetUnicodeStringWdfTimerCreateWdfTimerGetParentObjectWdfTimerStartWdfTimerStopWdfUsbInterfaceGetConfiguredPipeWdfUsbInterfaceGetConfiguredSettingIndexWdfUsbInterfaceGetDescriptorWdfUsbInterfaceGetEndpointInformationWdfUsbInterfaceGetInterfaceNumberWdfUsbInterfaceGetNumConfiguredPipesWdfUsbInterfaceGetNumEndpoints WdfUsbInterfaceGetNumEndpointsWdfUsbInterfacedfUsbInterfaceGetNumSettingsWdfUsbInterfaceSelectSettingWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceCreateWdfUsbTargetDeviceCreateIsochUrbWdfUsbTargetDeviceCreateUrbWdfUsbTargetDeviceCreateWithParametersWdfUsbTargetDeviceCyclePortSynchronouslyWdfUsbTargetDeviceFormatRequestForControlTransferWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceGetDescriptorWdfUsbTargetDeviceGetInterfaceWdfUsbTargetDeviceGetNumInterfacesWdfUsbTargetDeviceIsConnectedSynchronousWdfUsbTargetDeviceQueryStringWdfUsbTargetDeviceQueryUsbCapabilityWdfUsbTargetDeviceResetPortSynchronouslyWdfUsbTargetDeviceRetrieveConfigDescriptorWdfUsbTargetDeviceRetrieveCurrentFrameNumberWdfUsbTargetDeviceRetrieveInformationWdfUsbTargetDeviceSelectConfigWdfUsbTargetDeviceSendControlTransferSynchronlyWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceWdmGetConfigurationHandleWdfUsbTargetPipeAbortSynchronouslyWdfUsbTargetPipeConfigContinuousReaderWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForUrbWdfUsbTargetPipeFormatRequestForWriteWdfUsbTargetPipeGetInformationWdfUsbTargetPipeGetIoTargetWdfUsbTargetPipeGetTypeWdfUsUsbTargetPipeIsInEndpointWdfUsbTargetPipeIsOutEndpointWdfUsbTargetPipeReadSynchronouslyWdfUsbTargetPipeResetSynchronouslyWdfUsbTargetPipeSendUrbSynchronlyWdfUsbTargetPipeSetNoMaximumPacketSizeCheckWdfUsbTargetPipeWdmGetPipeHandleWdfUsbTargetPipeWriteSynchronouslyWdfVerifierDbgBreakPointWdfVerifierKeBugCheckWdfWaitLockAcquireWdfWaitLockCreateWdfWaitLockReleaseWdfWdmDeviceGetWdfDeviceHandleWdfWdmDriverGetWdfDriverHandleWdfWmiInstanceCreateWdfWmiInstanceDeregisterWdfWmiInstanceFireEventWdfWmiInstanceGetDeviceWdfWmiInstanceGetProviderWdfWmiInstanceRegisterWdfWmiProviderCreateWdfWmiProviderGetDeviceWdfWmiProviderGetTracingHandleWdfWmiProviderIsEnabledWdfWorkItemErqueueWdfWorkItemFlushWdfWorkItemFlush WdfWorkItemGetParentObject