VOID __stdcall PiSwUnlock(){ ExReleaseResourceLite((PERESOURCE)PiSwLockObj); KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread()); }