disknum (ULONG) - input

      The drive number.

      The value 0 means the current drive, 1 means drive A, 2 means drive B, 3 means drive C, and so on. The maximum possible value is 26, which corresponds to drive Z.

    pBuf (PBYTE) - output

      Address of the full path of the current directory.

    pcbBuf (PULONG) - in/out

      Address of the length, in bytes, of the pBuf buffer.

      Input

        This field contains the length, in bytes, of the directory path buffer.
      Output
        If an error is returned because the buffer is too small, this field contains the required length, in bytes, of the buffer.

      ulrc (APIRET) - returns

        Return Code.

        DosQueryCurrentDir returns one of the following values:

      • NO_ERROR 15
          ERROR_INVALID_DRIVE
        26
          ERROR_NOT_DOS_DISK
        108
          ERROR_DRIVE_LOCKED
        111
          ERROR_BUFFER_OVERFLOW
        For a full list of error codes, see Errors.


      [Back] [Next]