Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.0 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: aspi32.h
  4. //
  5. // Microsoft Digital Rights Management
  6. // Copyright (C) Microsoft Corporation, 1998 - 1999, All Rights Reserved
  7. //
  8. // Description: interface for the Aspi32Util class
  9. //
  10. //-----------------------------------------------------------------------------
  11. // #include "stdafx.h"
  12. #include "windows.h"
  13. #include "scsidefs.h"
  14. #include "wnaspi32.h"
  15. #include "ntddscsi.h"
  16. #include "serialid.h"
  17. #if !defined(AFX_ASPI32UTIL_H__AEAF6F94_44A2_11D3_BE1D_00C04F79EC6B__INCLUDED_)
  18. #define AFX_ASPI32UTIL_H__AEAF6F94_44A2_11D3_BE1D_00C04F79EC6B__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. typedef DWORD (__cdecl *P_SAC)(LPSRB);
  23. typedef DWORD (__cdecl *P_GASI)(VOID);
  24. class Aspi32Util
  25. {
  26. public:
  27. Aspi32Util();
  28. virtual ~Aspi32Util();
  29. BOOL ASPI32_GetScsiDiskForParallelReader(char *szDL, SCSI_ADDRESS *pScsiAddr);
  30. BOOL ASPI32_GetDeviceDesc(int nHaId, int tid, int LUN, LPBYTE pBuf);
  31. BOOL GetDeviceManufacturer(LPSTR szDriveLetter, LPSTR pBuf);
  32. BOOL GetScsiAddress(LPSTR szDL, int nMaxHA);
  33. BOOL ASPI32_GetHostAdapter(int nHaId, LPSTR szIdentifier);
  34. BOOL ASPI32_GetDevType(int nHaId, int tid, int *pnDevType);
  35. BOOL ASPI32_GetDiskInfo(int nHaId, int tid, int *pnInt13Unit);
  36. BOOL DoSCSIPassThrough(LPSTR szDriveLetter, PWMDMID pSN, BOOL bMedia );
  37. BOOL GetDeviceSerialNumber(int nHaId, int tid, PWMDMID pSN );
  38. BOOL GetMediaSerialNumber(int nHaId, int tid, PWMDMID pSN );
  39. // Attributes
  40. DWORD m_dwASPIStatus;
  41. DWORD m_dwASPIEventStatus;
  42. HANDLE m_hASPICompletionEvent;
  43. unsigned char m_pInquiryBuffer[256];
  44. BYTE m_NumAdapters;
  45. SCSI_ADDRESS m_scsiAddress;
  46. P_SAC m_funSendASPI32Command;
  47. P_GASI m_funGetASPI32SupportInfo;
  48. HINSTANCE m_hd;
  49. };
  50. #endif // !defined(AFX_ASPI32UTIL_H__AEAF6F94_44A2_11D3_BE1D_00C04F79EC6B__INCLUDED_)