Compartilhar via


Regra driverCreate (kmdf)

A regra DriverCreate especifica que um driver que usa o KMDF (Kernel Mode Driver Framework) deve chamar o método WdfDriverCreate para criar um objeto de driver de estrutura de dentro de sua rotina DriverEntry .

Modelo de driver: KMDF

Como testar

Em tempo de compilação

Execute o Verificador de Driver Estático e especifique a regra DriverCreate .

Use as seguintes etapas para executar uma análise do código:
  1. Prepare seu código (use declarações de tipo de função).
  2. Execute o Verificador de Driver Estático.
  3. Exiba e analise os resultados.

Para obter mais informações, consulte Usando o Verificador de Driver Estático para localizar defeitos em drivers.

Aplica-se a

WdfChildListAddOrUpdateChildDescriptionAsPresentWdfChildListBeginIterationWdfChildListBeginScanWdfChildListCreateWdfChildListEndIterationWdfChildListEndScanWdfChildListGetDeviceWdfChildListRequestChildEjectWdfChildListRetrieveAddressDescriptionWdfChildListRetrieveNextDeviceWdfChildListRetrievePdoWdfChildListUpdateAllChildDescriptionsAsPresentWdfChildListUpdateChildDescriptionAsMissingWdfCmResourceListAppendDescriptorWdfCmResourceListGetCountWdfCmResourceListGetDescriptWdfCmResourceListInsertDescriptorWdfCmResourceListRemoveWdfCmResourceListRemoveByDescriptorWdfCollectionAddWdfCollectionCreateWdfCollectionGetCountWdfCollectionGetFirstItemWdfCollectionGetItemWdfCollectionGetLastItemWdfCollectionRemoveWdfCollectionRemoveItemWdfCommonBufferCreateWdfCommonBufferCreateWithConfigWdfCommonBufferGetAlignedLogicalAddressWdfCommonBufferGetAlignedVirtualAddressWdfCommonBufferGetLengthWdfControlDeviceInitAllocateWdfControlDeviceInitSetShutdownNotificationWdfControlFinishInitializingWdfDeviceAddDependentUsageDeviceObjectWdfDeviceAddQueryInterfaceWdfDeviceAddRemovalRelationsPhysicalDeviceWdfDeviceAllocAndQueryPropertyWdfDeviceAssignMofResourceNameWdfDeviceAssignS0IdleSettingsWdfDeviceAssignSxWakeSettingsWdfDeviceClearRemovalRelationsDevicesWdfDeviceConfigureRequestDispatchingWdfDeviceConfigureWdmIrpDispatchCallbackWdfDeviceCreateWdfDeviceCreateDeviceInterfaceWdfDeviceCreateSymbolicLinkWdfDevicEEnqueueRequestWdfDeviceGetAlignmentRequirementWdfDeviceGetCharacteristicsWdfDeviceGetDefaultQueueWdfDeviceGetDevicePnpStateWdfDeviceGetDevicePowerPolicyStateWdfDeviceGetDevicePowerStateWdfDeviceGetDeviceStateWdfDeviceGetDriverWdfDeviceGetFileObjectWdfDeviceGetIoTargetWdfDeviceGetSystemPowerActionWdfDeviceIndicateWakeStatusWdfDeviceInitAssignNameWdfDeviceInitAssignSDDLStringWdfDeviceInitAssignWdmIrpPreprocessCallbackWdfDeviceInitFreeWdfDeviceInitRegisterPnpStateChangeCallbackWdfDeviceInitRegisterPowerPolicyStateChangeCallbackWdfDeviceInitRegisterPowerStateChangeCallbackWdfDeviceInitSetCharacteristicsWdfDeviceInitSetDeviceClassWdfDeviceInitSetDeviceTypeWdfDeviceInitSetExclusiveWdfDeviceInitSetFileObjectConfigWdfDeviceInitSetIoInCallerContextCallbackWdfDeviceInitSetIoTypeWdfDeviceInitSetPnpPowerEventCallbacksWdfDeviceInitSetPowerInrushWdfDeviceInitSetPowerNotPageableWdfDeviceInitSetPowerPageableWdfDeviceInitSetPowerPolicyEventCallbacksWdfDeviceInitSetPowerPolicyOwnershipWdfDeviceInitSetReleaseHardwareOrderOnFailureWdfDeviceInitSetRemoveLockOptionsWdfDeviceInitSetRequestAttributesWdfDeviceMiniportCreateWdfDeviceOpenRegistryKeyWdfDeviceQueryPropertyWdfDeviceRemoveDependentUsageDeviceObjectWdfDeviceRemoveRemovalRelationsPhysicalDeviceWdfDeviceResumeIdleWdfDeviceRetrieveDeviceInterfaceStringWdfDeviceRetrieveDeviceNameWdfDeviceSetAlignmentRequirementWdfDeviceSetBusInformationForChildrenWdfDeviceSetCharacteristicsWdfDeviceSetDeviceInterfaceStateWdfDeviceSetDeviceStateWdfDeviceSetFailedWdfDeviceSetPnpCapabilitiesWdfDeviceSetPowerCapabilitiesWdfDeviceSetSpecialFileSupportWdfDeviceSetStaticStopRemoveWdfDeviceStopIdleWdfDeviceWdmAssignPowerFrameworkSettingsWdfDeviceWdmDispatchIrpWdfDeviceWdmDispatchIrpToIoQueueWdfDeviceWdmDispatchPreprocessedIrpWdfDeviceWdmGetAttachedDeviceWdfDeviceWdmGetDeviceObjectWdfDeviceWdmGetPhysicalDeviceWdfDmaEnablerConfigureSystemProfileWdfDmaEnablerCreateWdfDmaEnablerGetFragmentLengthWdfDmaEnablerGetMaximumLengthWdfDmaEnablerGetMaximumScatterGatherElementsWdfDmaEnablerSetMaximumScatterGatherElementsWdfDmaEnablerWdmGetDmaAdapterWdfDmaTransactionAllocateResourcesWdfDmaTransactionCancelWdfDmaTransactionCreateWdfDmaTransactionDmaCompletedWdfDmaTransactionDmaCompletedFinalWdfDmaTransactionDmaCompletedWithLengthWdfDmaTransactionExecuteWdfDmaTransactionFreeResourcesWdfDmaTransactionGetBytesTransferredWdfDmaTransactionGetCurrentDmaTransferLengthWdfDmaTransactionGetDeviceWdfDmaTransactionGetRequestWdfDmaTransactionGetTransferInfoWdfDmaTransactionInitializeWdfDmaTransactionInitializeUsingOffsetWdfDmaTransactionInitializeUsingRequestWdfDmaTransactionReleaseWdfDmaTransactionSetChannelConfigurationCallbackWdfDmaTransactionSetDeviceAddressOffsetWdfDmaTransactionSetImmediateExecutionWdfDmaTransactionSetMaximumLengthWdfDmaTransactionSetTransferCompleteCallbackWdfDmaTransactionStopSystemTransferWdfDmaTransactionWdmGetTransferContextWdfDpcCancelWdfDpcCreateWdfDpcEnqueueWdfDpcGetParentObjectWdfDpcWdmGetDpcWdfDriverCreateWdfDriverGetRegistryPathWdfDriverIsVersionAvailableWdfDriverMiniportUnloadWdfDriverOpenParametersRegistryKeyWdfDriverRegisterTraceInfoWdfDriverRetrieveVersionStringWdfDriverWdmGetDriverObjectWdfFdoAddStaticChildWdfFdoGetDefaultChildListWdfFdoInitAllocAndQueryPropertyWdfFdoInitOpenRegistryKeyWdfFdoInitQueryPropertyWdfFdoInitSetDefaultChildListConfigWdfFdoInitSetEventCallbacksWdfFdoInitSetFilterWdfFdoInitWdmGetPhysicalDeviceWdfFdoLockStaticChildListForIterationWdfFdoQueryForInterfaceWdfFdoRetrieveNextStaticChildWdfFdoUnlockStaticChildListFromIterationWdfFileObjectGetDeviceWdfFileObjectGetFileNameWdfFileObjectGetFlagsWdfFileObjectWdmGetFileObjectWdfGetTriageInfoWdfInterruptAcquireLockWdfInterruptCreateWdfInterruptDisableWdfInterruptEnableWdfInterruptGetDeviceWdfInterruptGetInfoWdfInterruptQueueDpcForIsrWdfInterruptQueueWorkItemForIsrWdfInterruptReleaseLockWdfInterruptReportActiveWdfInterruptReportInactiveWdfInterruptSetExtendedPolicyWdfInterruptSetPolicyWdfInterruptSynchronizeWdfInterruptTryToAcquireLockWdfInterruptWdmGetInterruptWdfIoQueueAssignForwardProgressPolicyWdfIoQueueCreateWdfIoQueueDrainWdfIoQueueDrainSynchronouslyWdfIoQueueFindRequestWdfIoQueueGetDeviceWdfIoQueueGetStateWdfIoQueuePurgeWdfIoQueuePurgeSynchronouslyWdfIoQueueReadyNotifyWdfIoQueueRetrieveFoundRequestWdfIoQueueRetrieveNextRequestWdfIoQueueRetrieveRequestByFileObjectWdfIoQueueStartWdfIoQueueStopWdfIoQueueStopAndPurgeWdfIoQueueStopAndPurgeSynchronouslyWdfIoQueueStopSynchronouslyWdfIoResourceListAppendDescriptorWdfIoResourceListCreateWdfIoResourceListGetCountWdfIoResourceListGetDescriptorWdfIoResourceListInsertDescriptorWdfIoResourceListRemoveWdfIoResourceListRemoveByDescriptorWdfIoResourceListUpdateDescriptorWdfIoResourceRequirementsListAppendIoResListWdfIoResourceRequirementsListGetCountWdfIoResourceRequirementsListGetIoResListWdfIoResourceRequirementsListInsertIoResListWdfIoResourceRequirementsListRemoveWdfIoResourceRequirementsListRemoveByIoResListWdfIoResourceRequirementsListSetInterfaceTypeWdfIoResourceRequirementsListSetSlotNumberWdfIoTargetAllocAndQueryTargetPropertyWdfIoTargetCloseWdfIoTargetCloseForQueryRemoveWdfIoTargetCreateWdfIoTargetFormatRequestForInternalIoctlWdfIoTargetFormatRequestForInternalIoctlOthersWdfIoTargetFormatRequestForIoctlWdfIoTargetFormatRequestForReadWdfIoTargetFormatRequestForWriteWdfIoTargetGetDeviceWdfIoTargetGetStateWdfIoTargetOpenWdfIoTargetPurgeWdfIoTargetQueryForInterfaceWdfIoTargetQueryTargetPropertyWdfIoTargetSendInternalIoctlOthersSynchronouslyWdfIoTargetSendInternalIoctlSynchronouslyWdfIoTargetSendIoctlSynchronouslyWdfIoTargetSendReadSynchronouslyWdfIoTargetSendWriteSynchronouslyWdfIoTargetStartWdfIoTargetStopWdfIoTargetWdmGetTargetDeviceObjectWdfIoTargetWdmGetTargetFileHandleWdfIoTargetWdmGetTargetFileObjectWdfIoTargetWdmGetTargetPhysIcalDeviceWdfLookasideListCreateWdfMemoryAssignBufferWdfMemoryCopyFromBufferWdfMemoryCopyToBufferWdfMemoryCreateWdfMemoryCreateFromLookasideWdfMemoryCreatePreallocatedWdfMemoryGetBufferWdfObjectAcquireLockWdfObjectAllocateContextWdfObjectContextGetObjectWdfObjectCreateWdfObjectDeleteWdfObjectDereferenceWdfObjectDereferenceActualWdfObjectGetTypedContextWorkerWdfObjectQueryWdfObjectReferenceWdfObjectReferenceActualWdfObjectReleaseLockWdfPdoAddEjectionRelationsPhysicalDeviceWdfPdoClearEjectionRelationsDevicesWdfPdoGetParentWdfPdoInitAddCompatibleIDWdfPdoInitAddDeviceTextWdfPdoInitAddHardwareIDWdfPdoInitAllocateWdfPdoInitAllowForwardingRequestToParentWdfPdoInitAssignContainerIDWdfPdoInitAssignDeviceIDWdfPdoInitAssignInstanceIDWdfPdoInitAssignRawDeviceWdfPdoInitSetDefaultLocaleWdfPdoInitSetEventCallbacksWdfPdoMarkMissingWdfPdoRemoveEjectionRelationsPhysicalDeviceWdfPdoRequestEjectWdfPdoRetrieveAddressDescriptionWdfPdoRetrieveIdentificationDescriptionWdfPdoUpdateAddressDescriptionWdfRegistryAssignMemoryWdfRegistryAssignMultiStringWdfRegistryAssignStringWdfRegistryAssignULongWdfRegistryAssignUnicodeStringWdfRegistryAssignValueWdfRegistryCloseWdfRegistryCreateKeyWdfRegistryOpenKeyWdfRegistryQueryMemoryWdfRegistryQueryMultiStringWdfRegistryQueryStringWdfRegistryQueryULongWdfRegistryQueryUnicodeStringWdfRegistryQueryValueWdfRegistryRemoveKeyWdfRegistryRemoveValueWdfRegistryWdmGetHandleWdfRequestAllocateTimerWdfRequestCancelSentRequestWdfRequestChangeTargetWdfRequestCompleteWdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoostWdfRequestCreateWdfRequestCreateFromIrpWdfRequestFormatRequestUsingCurrentTypeWdfRequestForwardToIoQueueWdfRequestForwardToParentDeviceIoQueueWdfRequestGetCompletionParamsWdfRequestGetFileObjectWdfRequestGetInformationWdfRequestGetIoQueueWdfRequestGetParametersWdfRequestGetRequestorModeWdfRequestGetStatusWdfRequestIsCanceledWdfRequestIsFrom32BitProcessWdfRequestIsReservedWdfRequestMarkCancelableWdfRequestMarkCancelableExWdfRequestProbeAndLockUserBufferForReadWdfRequestProbeAndLockUserBufferForWriteWdfRequestRequeueWdfRequestRetrieveInputBufferWdfRequestRetrieveInputMemoryWdfRequestRetrieveInputWdmMdlWdfRequestRetrieveOutputBufferWdfRequestRetrieveOutputMemoryWdfRequestRetrieveOutputWdmdlWdfRequestRetrieveUnsafeUserInputBufferWdfRequestRetrieveUnsafeUserOutputBufferWdfRequestReuseWdfRequestSendWdfRequestSetCompletionRoutineWdfRequestSetInformationWdfRequestStopAcknowledgeWdfRequestUnmarkCancelableWdfRequestWdmFormatUsingStackLocationWdfRequestWdmGetIrpWdfSpinLockAcquireWdfSpinLockCreateWdfSpinLockReleaseWdfStringCreateWdfStringGetUnicodeStringWdfTimerCreateWdfTimerGetParentObjectWdfTimerStartWdfTimerStopWdfUsbInterfaceGetConfiguredPipeWdfUsbInterfaceGetConfiguredSettingIndexWdfUsbInterfaceGetDescriptorWdfUsbInterfaceGetEndpointInformationWdfUsbInterfaceGetInterfaceNumberWdfUsbInterfaceGetNumConfiguredPipesWdfUsbInterfaceGetNumEndpointsWdfUsbInterfaceGetNumSettingsWdfUsbInterfaceSelectSettingWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceCreateWdfUsbTargetDeviceCreateIsochUrbWdfUsbTargetDeviceCreateUrbWdfUsbTargetDeviceCreateWithParametersWdfUsbTargetDeviceCyclePortSynchronouslyWdfUsbTargetDeviceFormatRequestForControlTransferWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceGetDeviceDescriptorWdfUsbTargetDeviceGetInterfaceWdfUsbTargetDeviceGetNumInterfacesWdfUsbTargetDeviceIsConnectedSynchronousWdfUsbTargetDeviceQueryStringWdfUsbTargetDeviceQueryUsbCapabilityWdfUsbTargetDeviceResetPortSynchronouslyWdfUsbTargetDeviceRetrieveConfigDescriptorWdfUsbTargetDeviceRetrieveCurrentFrameNumberWdfUsbTargetDeviceRetrieveInformationWdfUsbTargetDeviceSelectConfigWdfUsbTargetDeviceSendControlTransferSynchronouslyWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceWdmGetConfigurationHandleWdfUsbTargetPipeAbortSynchronouslyWdfUsbTargetPipeConfigContinuousReaderWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeFormatRequestForReadWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForUrbWdfUsbTargetPipeFormatRequestForWriteWdfUsbTargetPipeGetInformationWdfUsbTargetPipeGetIoTargetWdfUsbTargetPipeGetTypeWdfUsbTargetPipeIsInEndpointWdfUsbTargetPipeIsOutEndpointWdfUsbTargetPipeReadSynchronouslyWdfUsbTargetPipeResetSynchronouslyWdfUsbTargetPipeSendUrbSynchronouslyWdfUsbTargetPipeSetNoMaximumPacketSizeCheckWdfUsbTargetPipeWdmGetPipeHandleWdfUsbTargetPipeWriteSynchronouslyWdfVerifierDbgBreakPointWdfVerifierKeBugCheckWdfWaitLockAcquireWdfWaitLockCreateWdfWaitLockReleaseWdfWdmDeviceGetWdfDeviceHandleWdfWdmDriverGetWdfDriverHandleWdfWmiInstanceCreateWdfWmiInstanceDeregisterWdfWmiInstanceFireEventWdfWmiInstanceGetDeviceWdfWmiInstanceGetProviderWdfWmiInstanceRegisterWdfWmiProviderCreateWdfWmiProviderGetDeviceWdfWmiProviderGetTracingHandleWdfWmiProviderIsEnabledWdfWorkItemCreateWdfWorkItemEnqueueWdfWorkItemFlushWdfWorkItemGetParentObject