sysbase.h
来自「一个操作系统,用C语言实现开发的,我在一个浙江大学的操作系统实验网站找到.大家学」· C头文件 代码 · 共 82 行
H
82 行
// System APIs
// Definitions and Structures
#ifndef __SYSBASE_H
#define __SYSBASE_H
#include <knldefs.h>
// Interfaces
typedef struct _INVOKESTRUCT
{
_u32 ebx, ecx, edx;
_u32 esi, edi;
_u32 uResult;
} INVOKESTRUCT;
// return -1 indicates error occurred
long SysInvoke(_u32 uFunc, INVOKESTRUCT *pIS);
// Basic system
#ifndef NO_SYSBASE
#define __SYSBASE
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _SYSVERSION
{
_u32 uVersion;
_u32 uBuild;
_u32 uTime1, uTime2;
} SYSVERSION;
void SystemVersion(SYSVERSION *pVersion);
void ExitProcess(_u32 uExitCode);
#ifdef __cplusplus
}
#endif
#endif
// End of Basic system
// Filesystem
#ifndef NO_FILESYSTEM
#ifndef __FILESYSTEM
#define __FILESYSTEM
#endif
typedef _u32 HANDLE;
// Maximun length of path
#define MAX_PATH 1024
// CreateStruct
typedef struct _CREATEFILESTRUCT
{
_u32 uSize; // size of the structure
_u32 uFlags; // flags
} CREATEFILESTRUCT;
// IOCTL structure
typedef struct _IOCTLSTRUCT
{
_u32 uCommand; // ioctl command
_u32 uInputBuffer; // input buffer to send data to driver
_u32 uInputSize; // size of input buffer in bytes
_u32 uOutputBuffer; // output buffer to receive data from driver
_u32 uOutputSize; // size of output buffer in bytes
_u32 uTransferSize; // bytes tranferred during this operation
} IOCTLSTRUCT;
#endif
// End of Filesystem
// User defined services
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?