other-licenses/7zstub/src/Windows/Error.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 // Windows/Error.h
michael@0 2
michael@0 3 #ifndef __WINDOWS_ERROR_H
michael@0 4 #define __WINDOWS_ERROR_H
michael@0 5
michael@0 6 #include "Common/String.h"
michael@0 7
michael@0 8 namespace NWindows {
michael@0 9 namespace NError {
michael@0 10
michael@0 11 bool MyFormatMessage(DWORD messageID, CSysString &message);
michael@0 12 inline CSysString MyFormatMessage(DWORD messageID)
michael@0 13 {
michael@0 14 CSysString message;
michael@0 15 MyFormatMessage(messageID, message);
michael@0 16 return message;
michael@0 17 }
michael@0 18 #ifdef _UNICODE
michael@0 19 inline UString MyFormatMessageW(DWORD messageID)
michael@0 20 { return MyFormatMessage(messageID); }
michael@0 21 #else
michael@0 22 bool MyFormatMessage(DWORD messageID, UString &message);
michael@0 23 inline UString MyFormatMessageW(DWORD messageID)
michael@0 24 {
michael@0 25 UString message;
michael@0 26 MyFormatMessage(messageID, message);
michael@0 27 return message;
michael@0 28 }
michael@0 29 #endif
michael@0 30
michael@0 31 }}
michael@0 32
michael@0 33 #endif

mercurial