STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dos.h
Go to the documentation of this file.
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 #pragma once
17 
18 #ifndef _INC_DOS
19 #define _INC_DOS
20 
21 #include <crtdefs.h>
22 
23 /*
24  * Currently, all MS C compilers for Win32 platforms default to 8 byte
25  * alignment.
26  */
27 #pragma pack(push,_CRT_PACKING)
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32 
33 #ifndef _DISKFREE_T_DEFINED
34 /* _getdiskfree structure (duplicated in DIRECT.H) */
35 struct _diskfree_t {
36  unsigned total_clusters;
37  unsigned avail_clusters;
38  unsigned sectors_per_cluster;
39  unsigned bytes_per_sector;
40  };
41 
42 #define _DISKFREE_T_DEFINED
43 #endif /* _DISKFREE_T_DEFINED */
44 
45 /* File attribute constants */
46 
47 #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
48 #define _A_RDONLY 0x01 /* Read only file */
49 #define _A_HIDDEN 0x02 /* Hidden file */
50 #define _A_SYSTEM 0x04 /* System file */
51 #define _A_SUBDIR 0x10 /* Subdirectory */
52 #define _A_ARCH 0x20 /* Archive file */
53 
54 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
55 /* Function prototypes */
56 #ifndef _GETDISKFREE_DEFINED
57 _Check_return_ _CRTIMP unsigned __cdecl _getdiskfree(_In_ unsigned _Drive, _Out_ struct _diskfree_t * _DiskFree);
58 #define _GETDISKFREE_DEFINED
59 #endif /* _GETDISKFREE_DEFINED */
60 #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */
61 
62 #ifdef _M_IX86
63 void __cdecl _disable(void);
64 void __cdecl _enable(void);
65 #endif /* _M_IX86 */
66 
67 #if !__STDC__
68 /* Non-ANSI name for compatibility */
69 #define diskfree_t _diskfree_t
70 #endif /* !__STDC__ */
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #pragma pack(pop)
77 
78 #endif /* _INC_DOS */
#define _Out_
Definition: sal.h:351
#define _CRTIMP
Definition: crtdefs.h:23
#define _Check_return_
Definition: sal.h:563
#define _In_
Definition: sal.h:314
_Check_return_ _CRTIMP unsigned __cdecl _getdiskfree(_In_ unsigned _Drive, _Out_ struct _diskfree_t *_DiskFree)
_Pre_maybenull_ _Post_z_ char * _Drive
Definition: stdlib.h:854
unsigned bytes_per_sector
Definition: direct.h:40
Definition: direct.h:36
unsigned avail_clusters
Definition: direct.h:38
unsigned total_clusters
Definition: direct.h:37
unsigned sectors_per_cluster
Definition: direct.h:39