diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-03-04 18:52:10 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-03-04 18:52:10 +0000 |
commit | a9e2b96e8d4664fddea569f0c233bc0b028555f1 (patch) | |
tree | b55fa82e609cf319873dfafdb8529aff6efcd425 /plugins/NotifyAnything/SendLog/SendLogWin.cpp | |
parent | 907045128b7dae896d45a40319eb86007df3e36b (diff) |
- SndLog command line compilation method restored
git-svn-id: http://svn.miranda-ng.org/main/trunk@3886 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotifyAnything/SendLog/SendLogWin.cpp')
-rw-r--r-- | plugins/NotifyAnything/SendLog/SendLogWin.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/NotifyAnything/SendLog/SendLogWin.cpp b/plugins/NotifyAnything/SendLog/SendLogWin.cpp new file mode 100644 index 0000000000..37f112efb8 --- /dev/null +++ b/plugins/NotifyAnything/SendLog/SendLogWin.cpp @@ -0,0 +1,30 @@ +#include <windows.h>
+#include <winsock.h>
+
+#include <iostream>
+#include <string>
+
+void implementation(int argc, char **argv, bool console);
+
+int main(int argc, char **argv)
+try
+{
+ if (argc == 1 || argc == 2 && !strcmp("/?", argv[1])) {
+ MessageBox(NULL, "Syntax: sendlog32 [-T] [-H host] [-P port] text\n"
+ "\tSends single text message.", "Sendlog32", MB_OK);
+ return 0;
+ }
+
+ implementation(argc, argv, false);
+}
+catch (DWORD err) {
+ LPVOID lpMsgBuf;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL);
+
+ MessageBox(NULL, (LPCTSTR)lpMsgBuf, "sendlog32", MB_OK);
+
+ LocalFree(lpMsgBuf);
+
+ return 1;
+}
|