no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:dosqcurdir [2018/08/28 08:56] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This call returns the full path name of the current directory for the requesting process for the specified drive. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ; | ||
+ | Value | ||
+ | | ||
+ | | ||
+ | A 2 | ||
+ | B ... | ||
+ | ;DirPath (PBYTE) - output : Address of the fully qualified path name of current directory. | ||
+ | ;DirPathLen (PUSHORT) - input/ | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | * 0 | ||
+ | * 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 system returns the length of the returned DirPath string in DirPathLen, which does not include the terminating null byte. In the case where the DirPath buffer is of insufficient length to hold the current directory path string, the system returns the required length (in bytes) for DirPath in DirPathLen. | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ==Bindings== | ||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | #define INCL_DOSFILEMGR | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | PBYTE | ||
+ | PUSHORT DirPathLen; | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | EXTRN DosQCurDir: | ||
+ | INCL_DOSFILEMGR | ||
+ | |||
+ | PUSH | ||
+ | PUSH@ OTHER | ||
+ | PUSH@ WORD DirPathLen | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | Text based on http:// | ||
+ | |||
+ | {{page> | ||
+ | |||