winevt_c 0.4.2-x64-mingw32 → 0.4.3-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/winevt/winevt_channel.c +1 -1
- data/ext/winevt/winevt_subscribe.c +1 -1
- data/ext/winevt/winevt_utils.cpp +8 -7
- data/lib/winevt/2.4/winevt.so +0 -0
- data/lib/winevt/2.5/winevt.so +0 -0
- data/lib/winevt/2.6/winevt.so +0 -0
- data/lib/winevt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10076ff427b8f805432e001b16b4752b7da474799c0510872af0ef057751b4ec
|
4
|
+
data.tar.gz: 16c1cfb82445f2e99d2a3b2e5083f8604b17931aa3b5e0f7c2d83fd43028f62c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d97b53e0330f439bee7a7d03a7035cc01ca30138a3b817105b5a2703ef5b29e433e4f710f9a0662bb509e5d73dad41eedf8bfabde6fdb75fc4c8ec0bab2403
|
7
|
+
data.tar.gz: ee945bf7736b1c73a9d98c1cb031c9268cdd1c962e439baf83218c0d50ee0ea0de1c467cb8f49baf4e157546d3d7ae17f4a8c68781fe6a144ea043336a1f8e45
|
data/ext/winevt/winevt_channel.c
CHANGED
@@ -74,7 +74,7 @@ rb_winevt_subscribe_subscribe(int argc, VALUE *argv, VALUE self)
|
|
74
74
|
VALUE rb_path, rb_query, rb_bookmark;
|
75
75
|
EVT_HANDLE hSubscription = NULL, hBookmark = NULL;
|
76
76
|
HANDLE hSignalEvent;
|
77
|
-
DWORD len, flags;
|
77
|
+
DWORD len, flags = 0L;
|
78
78
|
VALUE wpathBuf, wqueryBuf;
|
79
79
|
PWSTR path, query;
|
80
80
|
DWORD status = ERROR_SUCCESS;
|
data/ext/winevt/winevt_utils.cpp
CHANGED
@@ -67,7 +67,7 @@ WCHAR* render_event(EVT_HANDLE handle, DWORD flags)
|
|
67
67
|
VALUE errmsg = rb_str_new2(msgBuf);
|
68
68
|
LocalFree(msgBuf);
|
69
69
|
|
70
|
-
rb_raise(rb_eWinevtQueryError, "ErrorCode: %
|
70
|
+
rb_raise(rb_eWinevtQueryError, "ErrorCode: %ld\nError: %s\n", status, RSTRING_PTR(errmsg));
|
71
71
|
}
|
72
72
|
|
73
73
|
result = _wcsdup(buffer);
|
@@ -108,8 +108,9 @@ VALUE get_values(EVT_HANDLE handle)
|
|
108
108
|
do {
|
109
109
|
if (bufferSizeNeeded > bufferSize) {
|
110
110
|
bufferSize = bufferSizeNeeded;
|
111
|
-
|
112
|
-
|
111
|
+
try {
|
112
|
+
buffer.resize(bufferSize);
|
113
|
+
} catch (std::bad_alloc e) {
|
113
114
|
status = ERROR_OUTOFMEMORY;
|
114
115
|
bufferSize = 0;
|
115
116
|
rb_raise(rb_eWinevtQueryError, "Out of memory");
|
@@ -142,7 +143,7 @@ VALUE get_values(EVT_HANDLE handle)
|
|
142
143
|
VALUE errmsg = rb_str_new2(msgBuf);
|
143
144
|
LocalFree(msgBuf);
|
144
145
|
|
145
|
-
rb_raise(rb_eWinevtQueryError, "ErrorCode: %
|
146
|
+
rb_raise(rb_eWinevtQueryError, "ErrorCode: %lu\nError: %s\n", status, RSTRING_PTR(errmsg));
|
146
147
|
}
|
147
148
|
|
148
149
|
PEVT_VARIANT pRenderedValues = (PEVT_VARIANT)buffer.c_str();
|
@@ -344,7 +345,7 @@ static std::wstring get_message(EVT_HANDLE hMetadata, EVT_HANDLE handle)
|
|
344
345
|
}
|
345
346
|
|
346
347
|
if (status != ERROR_INSUFFICIENT_BUFFER)
|
347
|
-
rb_raise(rb_eWinevtQueryError, "ErrorCode: %
|
348
|
+
rb_raise(rb_eWinevtQueryError, "ErrorCode: %lu", status);
|
348
349
|
}
|
349
350
|
|
350
351
|
if (status == ERROR_INSUFFICIENT_BUFFER) {
|
@@ -382,7 +383,7 @@ static std::wstring get_message(EVT_HANDLE hMetadata, EVT_HANDLE handle)
|
|
382
383
|
goto cleanup;
|
383
384
|
}
|
384
385
|
|
385
|
-
rb_raise(rb_eWinevtQueryError, "ErrorCode: %
|
386
|
+
rb_raise(rb_eWinevtQueryError, "ErrorCode: %lu", status);
|
386
387
|
}
|
387
388
|
}
|
388
389
|
}
|
@@ -438,7 +439,7 @@ WCHAR* get_description(EVT_HANDLE handle)
|
|
438
439
|
VALUE errmsg = rb_str_new2(msgBuf);
|
439
440
|
LocalFree(msgBuf);
|
440
441
|
|
441
|
-
rb_raise(rb_eWinevtQueryError, "ErrorCode: %
|
442
|
+
rb_raise(rb_eWinevtQueryError, "ErrorCode: %lu\nError: %s\n", status, RSTRING_PTR(errmsg));
|
442
443
|
}
|
443
444
|
|
444
445
|
// Obtain buffer as EVT_VARIANT pointer. To avoid ErrorCide 87 in EvtRender.
|
data/lib/winevt/2.4/winevt.so
CHANGED
Binary file
|
data/lib/winevt/2.5/winevt.so
CHANGED
Binary file
|
data/lib/winevt/2.6/winevt.so
CHANGED
Binary file
|
data/lib/winevt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winevt_c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|