Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:fapi:dosgetversion [2018/09/01 16:41] – prokushev | en:docs:fapi:dosgetversion [2021/10/17 06:28] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{logos:os2.gif? | + | {{page>en:templates:fapiint}} |
====== DosGetVersion ====== | ====== DosGetVersion ====== | ||
Line 5: | Line 5: | ||
This call returns the OS version number. | This call returns the OS version number. | ||
- | ==Syntax== | + | ===== Syntax |
- | | + | <code c> |
+ | DosGetVersion (VersionWord) | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters |
- | * VersionWord (PUSHORT) - output: | + | * VersionWord ([[PUSHORT]]) - output: |
- | ==Return Code== | + | ===== Return Code ===== |
- | * rc (USHORT) - return | + | * rc ([[USHORT]]) - return |
| | ||
Return code description is: | Return code description is: | ||
Line 21: | Line 23: | ||
* 0 NO_ERROR | * 0 NO_ERROR | ||
- | ==Bindings== | + | ===== Bindings |
- | ===C=== | + | |
+ | ==== C ==== | ||
+ | <code c> | ||
#define INCL_DOSMISC | #define INCL_DOSMISC | ||
| | ||
Line 29: | Line 32: | ||
PUSHORT VersionWord; | PUSHORT VersionWord; | ||
USHORT | USHORT | ||
+ | </ | ||
- | ===MASM=== | + | ==== MASM ==== |
+ | <code asm> | ||
EXTRN DosGetVersion: | EXTRN DosGetVersion: | ||
INCL_DOSMISC | INCL_DOSMISC | ||
Line 37: | Line 42: | ||
PUSH@ WORD VersionWord | PUSH@ WORD VersionWord | ||
CALL | CALL | ||
+ | </ | ||
Returns WORD | Returns WORD | ||
- | ==Example== | + | ==== Example ==== |
The following example shows how one may obtain information for program initialization. The program locates the environment segment and prints the name of the command from the command line. It then obtains the OS version number and prints it. | The following example shows how one may obtain information for program initialization. The program locates the environment segment and prints the name of the command from the command line. It then obtains the OS version number and prints it. | ||
+ | <code c> | ||
#define INCL_DOS | #define INCL_DOS | ||
#include < | #include < | ||
Line 82: | Line 89: | ||
} | } | ||
} | } | ||
+ | </ | ||
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |