Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:docs:fapi:doschdir [2018/09/02 03:51] – prokushev | en:docs:fapi:doschdir [2020/12/07 01:51] – prokushev | ||
---|---|---|---|
Line 10: | Line 10: | ||
==Parameters== | ==Parameters== | ||
- | *DirName (PSZ) - input : Address of the ASCIIZ directory path name. | + | *DirName ([[PSZ]]) - input : Address of the ASCIIZ directory path name. |
- | *Reserved (ULONG) - input : Reserved and must be set to zero. | + | *Reserved ([[ULONG]]) - input : Reserved and must be set to zero. |
==Return Code== | ==Return Code== | ||
- | | + | rc ([[USHORT]]) - return |
Return code descriptions are: | Return code descriptions are: | ||
Line 40: | Line 40: | ||
==Example Code== | ==Example Code== | ||
===C Binding=== | ===C Binding=== | ||
+ | <code c> | ||
+ | #define INCL_DOSFILEMGR | ||
- | #define INCL_DOSFILEMGR | + | USHORT |
- | + | ||
- | | + | |
- | + | ||
- | PSZ DirName; | + | |
- | ULONG 0; /* Reserved (must be zero) */ | + | |
- | + | ||
- | USHORT | + | |
+ | PSZ DirName; | ||
+ | ULONG 0; /* Reserved (must be zero) */ | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
This example changes directories to \os2\system. | This example changes directories to \os2\system. | ||
+ | <code c> | ||
+ | #define INCL_DOSFILEMGR | ||
- | #define INCL_DOSFILEMGR | + | #define PATH " |
- | + | #define RESERVED 0L | |
- | | + | |
- | #define RESERVED 0L | + | |
- | + | ||
- | USHORT rc; | + | |
- | + | ||
- | rc = DosChDir(PATH, | + | |
+ | USHORT rc; | ||
+ | |||
+ | rc = DosChDir(PATH, | ||
+ | |||
+ | </ | ||
===MASM Binding=== | ===MASM Binding=== | ||
- | + | <code asm> | |
- | EXTRN DosChDir: | + | EXTRN DosChDir: |
- | INCL_DOSFILEMGR | + | INCL_DOSFILEMGR |
| | ||
- | | + | PUSH@ ASCIIZ |
- | PUSH | + | PUSH |
- | CALL | + | CALL |
+ | </ | ||
Returns WORD | Returns WORD |