source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/fltsafe.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 322 bytes
Line 
1#if (NTDDI_VERSION >= NTDDI_WINXP)
2struct FLOATSAFE {
3 KFLOATING_SAVE FloatSave;
4 NTSTATUS ntStatus;
5 FLOATSAFE::FLOATSAFE(void) {
6 ntStatus = KeSaveFloatingPointState(&FloatSave);
7 }
8 FLOATSAFE::~FLOATSAFE(void) {
9 if (NT_SUCCESS(ntStatus)) {
10 KeRestoreFloatingPointState(&FloatSave);
11 }
12 }
13};
14#endif
Note: See TracBrowser for help on using the repository browser.