diff options
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)
|