winevt_c 0.2.1-x86-mingw32 → 0.2.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b9988958563107ae1dd65a24a199ea5195b66c903591cde77b4577d5ff1784e
4
- data.tar.gz: dbd7afb874c1388be1783090e33ca7167e72ff6e45c25ffbaba7176913989b26
3
+ metadata.gz: 8f6eaafbfe993c524c6cc8d95c0a169019bb87dab25febc025133998397fee9e
4
+ data.tar.gz: 5b36a013f94b523fa4ca848ead1fc3888512b18271f9d973b7d522bc39a87840
5
5
  SHA512:
6
- metadata.gz: ec504eecbe5c185eff33722a2695e949ebed7db02d69618dd94c8157e1706cdec6586ed71210d84627b83ddec449236d6f06b7f5b0a76dea1678fe6071207101
7
- data.tar.gz: 583ce2c0a7a11f21d7b280c996133084fdfb3aed4e7856cd7c4f8fe3ffa0e4f2d1d984c58906b119dcbf10e71dbd73af0e33dd4bece7a034ef976fadfc15c0a2
6
+ metadata.gz: 95e0ff75505e614adec6cbb1ed7d753ea8551b5138c23411023cb590ec16d26a69ce34259fc25a7da10a8ab8ed839adaab956f9939bc3cae5ee7f6cee6612e2e
7
+ data.tar.gz: 2ce5f7827b2415f633c96c81836bd3e83f6344605790569d3ea9fb9df1d4f3fbf2a72a19678c0ea796a1e7f5bbc12e6059b4cba87e5b17c4b1a99d2e715cf373
@@ -88,7 +88,7 @@ rb_winevt_channel_each(VALUE self)
88
88
 
89
89
  result = wstr_to_mbstr(CP_UTF8, buffer, -1);
90
90
 
91
- rb_yield(rb_str_new2(result));
91
+ rb_yield(rb_utf8_str_new_cstr(result));
92
92
  }
93
93
 
94
94
  return Qnil;
@@ -202,21 +202,21 @@ char* get_description(EVT_HANDLE handle)
202
202
  hModule = LoadLibraryEx(messageEXE, NULL,
203
203
  DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE);
204
204
 
205
- if (FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS,
206
- hModule,
207
- eventId,
208
- 0, // Use current code page. Users must specify character encoding in Ruby side.
209
- descriptionBuffer,
210
- MAX_BUFFER,
211
- NULL)) {
212
- } else if (!FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS,
213
- hModule,
214
- 0xB0000000 | eventId,
215
- 0, // Use current code page. Users must specify character encoding in Ruby side.
216
- descriptionBuffer,
217
- MAX_BUFFER,
218
- NULL)){
219
- goto cleanup;
205
+ if(FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS,
206
+ hModule,
207
+ eventId,
208
+ 0, // Use current code page. Users must specify character encoding in Ruby side.
209
+ descriptionBuffer,
210
+ MAX_BUFFER,
211
+ NULL) == 0){
212
+
213
+ FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS,
214
+ hModule,
215
+ 0xB0000000 | eventId,
216
+ 0, // Use current code page. Users must specify character encoding in Ruby side.
217
+ descriptionBuffer,
218
+ MAX_BUFFER,
219
+ NULL);
220
220
  }
221
221
  }
222
222
 
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Winevt
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.2.1
4
+ version: 0.2.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Hiroshi Hatake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-18 00:00:00.000000000 Z
11
+ date: 2019-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler