diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-19 19:09:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-19 19:09:07 +0000 |
commit | 41de1ce748d969a65bbefc6987c98d4e0a5010a3 (patch) | |
tree | 7568765f0ebf66fa54fa470f4eee22251301bc58 /protocols/WhatsApp/src/utils.cpp | |
parent | 5148c6e14bc21f758810aafff715bc4121c80d57 (diff) |
merge #2
git-svn-id: http://svn.miranda-ng.org/main/trunk@10527 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/utils.cpp')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 35d3ceb3a6..0aa95f1a16 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -1,25 +1,25 @@ #include "common.h"
std::string getLastErrorMsg()
-{
- // Retrieve the system error message for the last-error code
-
- LPVOID lpMsgBuf;
- DWORD dw = WSAGetLastError();
-
- FormatMessageA(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dw,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPSTR) &lpMsgBuf,
- 0, NULL );
-
- std::string ret((LPSTR) lpMsgBuf);
- LocalFree(lpMsgBuf);
- return ret;
+{
+ // Retrieve the system error message for the last-error code
+
+ LPVOID lpMsgBuf;
+ DWORD dw = WSAGetLastError();
+
+ FormatMessageA(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dw,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPSTR)&lpMsgBuf,
+ 0, NULL);
+
+ std::string ret((LPSTR)lpMsgBuf);
+ LocalFree(lpMsgBuf);
+ return ret;
}
BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest)
|