SCSI Information DLL | CodeGuru

SCSI Information DLL

Purpose SCSI Info DLL helps to identify SCSI parmeters of local SCSI drives by their drive letters and determine drive letter by SCSI parameters on Windows NT machines. Usage SCSIInfo.DLL exports following functions: BOOL ScanDrives(void)     – scans local drives and stores internally their SCSI parameters     return: ERROR_SUCCESS if succeeded, OS error code if failed […]

Written By
CodeGuru Staff
CodeGuru Staff
Aug 26, 2000
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Purpose

SCSI Info DLL helps to identify SCSI parmeters of local
SCSI drives by their drive letters and determine drive letter by SCSI parameters
on Windows NT machines.

Usage

SCSIInfo.DLL exports following functions:

  • BOOL ScanDrives(void)    
    – scans local drives and stores internally their SCSI parameters
  •     return: ERROR_SUCCESS if
    succeeded, OS error code if failed
        remarks: this function has to be called before any
    other request can be issued. in case of changes in SCSI configuration call 
        this
    function again to refresh internal information

  • int GetDriveInfo(char cDriveLetter,int* pPortNumber,int*
    pPathId,int* pTargetId,int* pLun)

    – returns SCSI parameters for specified drive letter:
    • cDriveLetter – drive letter
    • pPortNumber – pointer to variable receiving
      port number or NULL
    • pPathId– pointer to variable receiving port
      id or NULL
    • pTargetId – pointer to variable receiving
      target id or NULL
    • pLun – pointer to variable receiving LUN or
      NULL
  •     return: ERROR_SUCCESS if
    succeeded, ERROR_FILE_NOT_FOUND if no information found
        remarks: before first call of this function the
    function ScanDrives() should be called at least once. if one or more pointers to 
        receiving  variables are NULL,  the variable value assumed as not
    required and will not be filled (e.g. if only PortNumber is 
        required, set pPortNumber to address of receiving  variable and let
    other parameters to be NULL)

  • int GetDriveLetter(char* pcDriveLetter,int PortNumber,int PathId,int TargetId,int
    Lun)

    – returns drive letter for specified SCSI parameters:
    • pcDriveLetter – pointer to variable receiving drive
      letter, cannot be NULL
    • PortNumber – port number
    • PathId – path id
    • TargetId – target id
    • Lun – LUN
  •     return: ERROR_SUCCESS if succeeded,
    ERROR_FILE_NOT_FOUND if no information found
        remarks: before first call of this function the function

    ScanDrives()
    should be called at least once.

  • int GetDriveNumber(int PortNumber,int PathId,int TargetId,int
    Lun)

    – returns drive number (0 – A, 1 – B, 3 – C etc.)  for specified SCSI parameters:
    • PortNumber – port number
    • PathId – path id
    • TargetId – target id
    • Lun – LUN

        return: zero based drive number,
    -1 no information found
        remarks: before first call of this function the function

    ScanDrives()
    should be called at least once.

     

Support

For bugfixes and future releases mailto:m.becker@ais-gmbh.de

Advertisement

Copyright Information

Copyright A.I.S. GmbH (C) 2000

Version Information

date user version comment
22.08.2000 m.becker@ais-gmbh.de 1.0.0.3 Added GetDriveNumber function
10.08.2000 m.becker@ais-gmbh.de 1.0.0.1 updated function prototypes
10.08.2000 m.becker@ais-gmbh.de 1.0.0.0 created

Downloads

Download source code and demo project (including release build of demo app) – 142 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.