📄 sdenum.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef _SDENUM_H_
#define _SDENUM_H_
#include "SDCardDDK.h"
#include <DefBus.h>
#define DEFAULT_SD_BUS_NAME _T("SDCARD")
struct SDCARD_DEVICE_CONTEXT;
class CSdDeviceFolder : public DeviceFolder {
public:
CSdDeviceFolder(LPCTSTR pszBusName, LPCTSTR pszTemplateRegPath,
SDCARD_DEVICE_CONTEXT *pDevice,
DWORD dwBusType, DWORD dwBusNumber, PCI_SLOT_NUMBER SlotNumber,
HANDLE hParent, DWORD dwInitReg);
virtual ~CSdDeviceFolder() {}
CEDEVICE_POWER_STATE GetPowerState();
BOOL SetPowerState(CEDEVICE_POWER_STATE cpsNew);
private:
SDCARD_DEVICE_CONTEXT *m_pDevice;
};
class CSdBusEnum : public DefaultBusDriver {
public:
CSdBusEnum(LPCTSTR pszActiveRegPath);
virtual ~CSdBusEnum();
virtual BOOL Init();
virtual DWORD GetBusNamePrefix(LPTSTR pszReturnBusName, DWORD cchReturnBusName);
virtual SD_API_STATUS ActivateChild(LPCTSTR pszChildDeviceKey, DWORD dwHCNumber,
DWORD dwSlotNumber, DWORD dwFunctionNumber, SDCARD_DEVICE_CONTEXT *pDevice,
CSdDeviceFolder **ppDeviceFolder);
virtual SD_API_STATUS DeactivateChild(CSdDeviceFolder *pDeviceFolder);
virtual BOOL IOControl(DWORD dwCode, PBYTE pBufIn, DWORD dwLenIn,
PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut);
virtual BOOL SetChildDevicePowerState(PCE_BUS_POWER_STATE pcbps);
virtual BOOL GetChildDevicePowerState(PCE_BUS_POWER_STATE pcbps);
BOOL SetBusName(LPCTSTR pszBusName);
private:
LPCTSTR GetBusName();
LPTSTR m_pszBusName;
};
#endif // _SDENUM_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -