winevt_c 0.2.1-x64-mingw32 → 0.2.2-x64-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: ed6d1b97a80d3a2f1b96614f969898908125f838214e7d6bec3dd55b4aa2fa40
4
- data.tar.gz: 7976f98208b0b3d55fe0dce01b847c2b099078323fa2d8498e6f042cce5b9dda
3
+ metadata.gz: f56210fe02fd6f88d8c52cf935a8181f164da08cff966b3a79ef3d5120a9c9eb
4
+ data.tar.gz: 7b6d4b0aa74b08ba8ff954f8c3b5fbcfdd9bf98d2897fe4c82f12d47331f2c77
5
5
  SHA512:
6
- metadata.gz: f2b78ac264a44daed4536ab6c142ef703fa4b3add8d573ef0988ca34bc5e0a2db703a6064fe7d37570a1061fdd2911507889d94cee506cb1e3adf1a29794d1ec
7
- data.tar.gz: b50386dd33f8da78def63658f541ed411b629c0b594c34c63bda105781c276d8d4b2c9158e335582e01c40c2176eba49183ac83816a0631912b97cdcbc2d0c4d
6
+ metadata.gz: 6c5543c487437a8cc5b9db6d77b4f03bfb079e5ca9b83d9688247dd2599e74edf6f6fcb164c4d7c2ee10f7c4680a5f278f86a2931b8b6893c7e1090ceaff20d2
7
+ data.tar.gz: 620ceb7ade1dfc5d484f367af9af9ab79f40734d66629aaa7a60d3f39c81b02be9a26e7d3028f3a794b71743b7543b78019ee13db3e2eb595785ba5d14b8db26
@@ -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: x64-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