|
|
|
| 1 |
|
/*** |
| 2 |
|
*dos.h - definitions for MS-DOS interface routines |
| 3 |
|
* |
| 4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
| 5 |
|
* |
| 6 |
|
*Purpose: |
| 7 |
|
* Defines the structs and unions used for the direct DOS interface |
| 8 |
|
* routines; includes macros to access the segment and offset |
| 9 |
|
* values of far pointers, so that they may be used by the routines; and |
| 10 |
|
* provides function prototypes for direct DOS interface functions. |
| 11 |
|
* |
| 12 |
|
* [Public] |
| 13 |
|
* |
| 14 |
|
****/ |
| 15 |
|
|
| 16 |
|
#if _MSC_VER > 1000 |
| 17 |
|
#pragma once |
| 18 |
|
#endif |
| 19 |
|
|
| 20 |
|
#ifndef _INC_DOS |
| 21 |
|
#define _INC_DOS |
| 22 |
|
|
| 23 |
|
#include <crtdefs.h> |
| 24 |
|
|
| 25 |
|
#ifdef _MSC_VER |
| 26 |
|
/* |
| 27 |
|
* Currently, all MS C compilers for Win32 platforms default to 8 byte |
| 28 |
|
* alignment. |
| 29 |
|
*/ |
| 30 |
|
#pragma pack(push,_CRT_PACKING) |
| 31 |
|
#endif /* _MSC_VER */ |
| 32 |
|
|
| 33 |
|
#ifdef __cplusplus |
| 34 |
|
extern "C" { |
| 35 |
|
#endif |
| 36 |
|
|
| 37 |
|
#ifndef _DISKFREE_T_DEFINED |
| 38 |
|
/* _getdiskfree structure (duplicated in DIRECT.H) */ |
| 39 |
|
struct _diskfree_t { |
| 40 |
|
unsigned total_clusters; |
| 41 |
|
unsigned avail_clusters; |
| 42 |
|
unsigned sectors_per_cluster; |
| 43 |
|
unsigned bytes_per_sector; |
| 44 |
|
}; |
| 45 |
|
|
| 46 |
|
#define _DISKFREE_T_DEFINED |
| 47 |
|
#endif |
| 48 |
|
|
| 49 |
|
/* File attribute constants */ |
| 57 |
|
|
| 58 |
|
/* Function prototypes */ |
| 59 |
|
#ifndef _GETDISKFREE_DEFINED |
| 60 |
|
_Check_return_ _CRTIMP unsigned __cdecl _getdiskfree(_In_ unsigned _Drive, _Out_ struct _diskfree_t * _DiskFree); |
| 61 |
|
#define _GETDISKFREE_DEFINED |
| 62 |
|
#endif |
| 63 |
|
|
| 64 |
|
#ifdef _M_IX86 |
| 65 |
|
void __cdecl _disable(void); |
| 66 |
|
void __cdecl _enable(void); |
| 67 |
|
#endif /* _M_IX86 */ |
| 68 |
|
|
| 69 |
|
#if !__STDC__ |
| 70 |
|
/* Non-ANSI name for compatibility */ |
| 71 |
|
#define diskfree_t _diskfree_t |
| 72 |
|
#endif /* __STDC__ */ |
| 73 |
|
|
| 74 |
|
#ifdef __cplusplus |
| 75 |
|
} |
| 76 |
|
#endif |
| 77 |
|
|
| 78 |
|
#ifdef _MSC_VER |
| 79 |
|
#pragma pack(pop) |
| 80 |
|
#endif /* _MSC_VER */ |
| 81 |
|
|
| 82 |
|
#endif /* _INC_DOS */ |
| 83 |
|
|
|
|
|