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

Last change on this file since 1186 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
RevLine 
[1166]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.