NeKernel dev
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1/* -------------------------------------------
2
3 Copyright 2025 Amlal El Mahrouss.
4
5 FILE: ddk.h
6 PURPOSE: DDK Driver model base header.
7
8------------------------------------------- */
9
10#pragma once
11
12#include <stddef.h>
13#include <stdint.h>
14
15#if defined(__cplusplus)
16#define BOOL bool
17#define YES true
18#define NO false
19#define DDK_EXTERN extern "C" __declspec(dllexport)
20#define nil nullptr
21#undef NULL
22#define NULL 0
23#define DDK_FINAL final
24#else
25#define BOOL char
26#define YES 1
27#define NO 0
28#define DDK_EXTERN extern __declspec(dllexport)
29#define nil ((void*) 0)
30#undef NULL
31#define NULL ((void*) 0)
32#define DDK_FINAL
33#endif // defined(__cplusplus)
34
35#ifndef __DDK__
36#undef DDK_EXTERN
37#if defined(__cplusplus)
38#define DDK_EXTERN extern "C" __declspec(dllimport)
39#else
40#define DDK_EXTERN __declspec(dllimport)
41#endif
42#endif
43
44#define ATTRIBUTE(X) __attribute__((X))
45
46#ifndef __NEOSKRNL__
47#error !!! Do not include header in EL0/Ring 3 mode !!!
48#endif // __NEOSKRNL__