Difference between revisions of "DosQSysInfo"

From EDM2
Jump to: navigation, search
(Created page with "==Description== This call returns values of static system variables. ==Syntax== <PRE> DosQSysInfo (Index, DataBuf, DataBufLen) </PRE> ==Parameters== ; Index (USHORT) -...")
 
m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
 
 
This call returns values of static system variables.
 
This call returns values of static system variables.
  
 
==Syntax==
 
==Syntax==
<PRE>
+
  DosQSysInfo (Index, DataBuf, DataBufLen)
  DosQSysInfo
+
  
    (Index, DataBuf, DataBufLen)
 
</PRE>
 
 
==Parameters==
 
==Parameters==
; Index (USHORT) - input : Ordinal of the system variable to return.
+
;Index (USHORT) - input : Ordinal of the system variable to return.
 
+
:Index = 0 indicates maximum path length. The maximum path length is returned in the first word of the DataBuf.
Index = 0 indicates maximum path length. The maximum path length is returned in the first word of the DataBuf.  
+
;DataBuf (PBYTE) - output : Address where the system returns the variable value.
 
+
;DataBufLen (USHORT) - input : Length of the data buffer.
; DataBuf (PBYTE) - output : Address where the system returns the variable value.  
+
 
+
; DataBufLen (USHORT) - input : Length of the data buffer.
+
  
 
==Return Code==
 
==Return Code==
rc (USHORT) - return
+
;rc (USHORT) - return:Return code descriptions include:
 
+
* 0 NO_ERROR
Return code descriptions include:
+
* 87 ERROR_INVALID_PARAMETER
 
+
*111 ERROR_BUFFER_OVERFLOW
* 0         NO_ERROR
+
* 87         ERROR_INVALID_PARAMETER  
+
* 111       ERROR_BUFFER_OVERFLOW
+
  
 
==Remarks==
 
==Remarks==
Line 31: Line 21:
 
DosQSysInfo returns the maximum path length supported by the file system currently installed. The path length includes the drive specifier (d:), the leading "\" and the trailing null character.
 
DosQSysInfo returns the maximum path length supported by the file system currently installed. The path length includes the drive specifier (d:), the leading "\" and the trailing null character.
  
The value returned by DosQSysInfo can be used to allocate buffers for storing path names returned by requests, for example, to DosFindFirst and DosFindNext.  
+
The value returned by DosQSysInfo can be used to allocate buffers for storing path names returned by requests, for example, to [[DosFindFirst (FAPI)|DosFindFirst]] and [[DosFindNext (FAPI)|DosFindNext]].
  
==Example Code==
+
==Bindings==
===C Binding===
+
===C===
 
<PRE>
 
<PRE>
 
#define INCL_DOSFILEMGR
 
#define INCL_DOSFILEMGR
Line 40: Line 30:
 
USHORT  rc = DosQSysInfo(Index, DataBuf, DataBufLen);
 
USHORT  rc = DosQSysInfo(Index, DataBuf, DataBufLen);
  
USHORT           Index;         /* Which variable */
+
USHORT   Index;       /* Which variable */
PBYTE           DataBuf;       /* System information (returned) */
+
PBYTE   DataBuf;     /* System information (returned) */
USHORT           DataBufLen;   /* Data buffer size */
+
USHORT   DataBufLen;   /* Data buffer size */
  
USHORT           rc;           /* return code */
+
USHORT   rc;           /* return code */
 
</PRE>
 
</PRE>
  
===MASM Binding===
+
===MASM===
 
<PRE>
 
<PRE>
 
EXTRN DosQSysInfo:FAR
 
EXTRN DosQSysInfo:FAR
Line 59: Line 49:
 
Returns WORD
 
Returns WORD
 
</PRE>
 
</PRE>
==Related Functions==
 
*
 
 
  
[[Category:The OS/2 API Project]]
+
[[Category:Dos16]]

Latest revision as of 23:36, 25 January 2020

This call returns values of static system variables.

Syntax

DosQSysInfo (Index, DataBuf, DataBufLen)

Parameters

Index (USHORT) - input 
Ordinal of the system variable to return.
Index = 0 indicates maximum path length. The maximum path length is returned in the first word of the DataBuf.
DataBuf (PBYTE) - output 
Address where the system returns the variable value.
DataBufLen (USHORT) - input 
Length of the data buffer.

Return Code

rc (USHORT) - return
Return code descriptions include:
  • 0 NO_ERROR
  • 87 ERROR_INVALID_PARAMETER
  • 111 ERROR_BUFFER_OVERFLOW

Remarks

An OS/2 application may want to reference file objects managed by an installable file system that supports long file names. Because some installable file systems may support longer names than others, an application should issue DosQSysInfo upon initialization.

DosQSysInfo returns the maximum path length supported by the file system currently installed. The path length includes the drive specifier (d:), the leading "\" and the trailing null character.

The value returned by DosQSysInfo can be used to allocate buffers for storing path names returned by requests, for example, to DosFindFirst and DosFindNext.

Bindings

C

#define INCL_DOSFILEMGR

USHORT  rc = DosQSysInfo(Index, DataBuf, DataBufLen);

USHORT   Index;        /* Which variable */
PBYTE    DataBuf;      /* System information (returned) */
USHORT   DataBufLen;   /* Data buffer size */

USHORT   rc;           /* return code */

MASM

EXTRN DosQSysInfo:FAR
INCL_DOSFILEMGR     EQU 1

PUSH   WORD  Index           ;Which variable
PUSH@  OTHER DataBuf         ;System information (returned)
PUSH   WORD  DataBufLen      ;Data buffer size
CALL   DosQSysInfo

Returns WORD