en:docs:fapi:dosqcurdir

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosqcurdir [2018/08/28 08:56] – created prokusheven:docs:fapi:dosqcurdir [2021/12/05 10:59] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== DosQCurDir ======
 +
 This call returns the full path name of the current directory for the requesting process for the specified drive. This call returns the full path name of the current directory for the requesting process for the specified drive.
  
-==Syntax== +===== Syntax =====
- DosQCurDir (DriveNumber, DirPath, DirPathLen)+
  
-==Parameters== +<code c> 
-;DriveNumber (USHORT) - input : Drive number, for example: +DosQCurDir (DriveNumber, DirPath, DirPathLen) 
- Value +</code> 
-     Definition 0 + 
-     default 1 +===== Parameters ===== 
-     2 + 
-     B ... +  DriveNumber ([[USHORT]]) - input : Drive number, for example: 
-;DirPath (PBYTE) - output : Address of the fully qualified path name of current directory. + 
-;DirPathLen (PUSHORT) - input/output : Address of the length of the DirPath buffer. On input, this field contains the length of the directory path buffer in bytes. On output, if an error is returned because the buffer is too small, this field contains the required length.+  Value Definition 
 +  0     default 
 +      A  
 +      B 
 +  ... 
 + 
 +  * DirPath ([[PBYTE]]) - output : Address of the fully qualified path name of current directory. 
 +  DirPathLen ([[PUSHORT]]) - input/output : Address of the length of the DirPath buffer. On input, this field contains the length of the directory path buffer in bytes. On output, if an error is returned because the buffer is too small, this field contains the required length. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0   NO_ERROR 
-* 15  ERROR_INVALID_DRIVE 
-* 26  ERROR_NOT_DOS_DISK 
-* 108 ERROR_DRIVE_LOCKED 
-* 111 ERROR_BUFFER_OVERFLOW 
  
-==Remarks==+  * 0   NO_ERROR 
 +  * 15  ERROR_INVALID_DRIVE 
 +  * 26  ERROR_NOT_DOS_DISK 
 +  * 108 ERROR_DRIVE_LOCKED 
 +  * 111 ERROR_BUFFER_OVERFLOW 
 + 
 +===== Remarks ===== 
 The drive letter is not part of the returned string. The string does not begin with a backslash and is terminated by a byte containing 00H. The drive letter is not part of the returned string. The string does not begin with a backslash and is terminated by a byte containing 00H.
  
Line 30: Line 44:
 For FSDs, the case of the current directory is set according to the DirName passed in, not according to the case of the directories on disk. For example, if the directory "c:\bin" is created and [[DosChDir]] is called with DirName "c:\bin", the current directory returned by DosQCurDir will be "c:\bin". For FSDs, the case of the current directory is set according to the DirName passed in, not according to the case of the directories on disk. For example, if the directory "c:\bin" is created and [[DosChDir]] is called with DirName "c:\bin", the current directory returned by DosQCurDir will be "c:\bin".
  
-Programs running without the NEWFILES bit set are allowed to DosChDir to a non-8.3 filename format directory.+Programs running without the NEWFILES bit set are allowed to [[DosChDir]] to a non-8.3 filename format directory.
  
 [[DosQSysInfo]] must be used by an application to determine the maximum path length supported by OS/2. The returned value should be used to dynamically allocate buffers that are to be used to store paths.  [[DosQSysInfo]] must be used by an application to determine the maximum path length supported by OS/2. The returned value should be used to dynamically allocate buffers that are to be used to store paths. 
  
-==Bindings== +===== Bindings ===== 
-===C Binding=== + 
-<PRE>+==== C Binding ===
 + 
 +<code c>
 #define INCL_DOSFILEMGR #define INCL_DOSFILEMGR
  
Line 46: Line 62:
  
 USHORT  rc;            /* return code */ USHORT  rc;            /* return code */
-</PRE>+</code> 
 + 
 +==== MASM Binding ====
  
-===MASM Binding=== +<code asm>
-<PRE>+
 EXTRN  DosQCurDir:FAR EXTRN  DosQCurDir:FAR
 INCL_DOSFILEMGR     EQU 1 INCL_DOSFILEMGR     EQU 1
Line 58: Line 75:
 CALL   DosQCurDir CALL   DosQCurDir
  
 +</code>
 Returns WORD Returns WORD
  
-=== Note ===+===== Note =====
  
 Text based on http://www.edm2.com/index.php/DosQCurDir Text based on http://www.edm2.com/index.php/DosQCurDir