SdBusOpenInterface function (ntddsd.h)
The SdBusOpenInterface routine obtains an interface from the Secure Digital (SD) bus driver.
Syntax
NTSTATUS SdBusOpenInterface(
[in] PDEVICE_OBJECT Pdo,
[out] PSDBUS_INTERFACE_STANDARD InterfaceStandard,
[in] USHORT Size,
[in] USHORT Version
);
Parameters
[in] Pdo
Pointer to the physical device object that the SD bus driver created for the SD device that the device driver manages. The system passes this pointer to the device driver when it calls the driver's AddDevice routine.
[out] InterfaceStandard
Contains, on input, a pointer to a structure of type SDBUS_INTERFACE_STANDARD supplied by the caller. On output, this structure holds pointers to the SD bus interface routines. This structure also contains some context information in its Context member that the caller should pass in every time it calls an interface routine.
[in] Size
Contains the size, in bytes, of the structure pointed to by InterfaceStandard.
[in] Version
Must be set to SDBUS_INTERFACE_VERSION.
Return value
Returns STATUS_SUCCESS if the operation succeeds, or the appropriate error code if the operation fails.
Remarks
An SD card driver should call this routine from its AddDevice routine.
SD card drivers must call this routine to establish communication with the bus driver. On successful completion of this call, the Context member of the structure pointed to by InterfaceStandard will contain a handle that the driver must pass in when calling methods that belong to the retrieved interface.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | ntddsd.h (include Ntddsd.h) |
IRQL | < DISPATCH_LEVEL |