WinCommon 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7c4bfe76872952b47611704aae5087ff318f59ba
4
+ data.tar.gz: 167b26d4b8e11a5d3118496198d10af51b7f051a
5
+ SHA512:
6
+ metadata.gz: 561538be030a9514f8a626536acdf4ff0b7ffd6635eecff0da7345cb7f6a79b4e0adb795ec925634b4b36c874de76ba521d77c1940f823f4d85e80053b5ca647
7
+ data.tar.gz: f223b600b92b11a654a6248eba569b9c123d33ce9bb8aa76b598c3432af3377f4960241615c7a696be8a3da34d62609f56689ad88f6aea04ffb922c8f81a9d0d
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.1
4
+ - 2.0.0
5
+ - ruby-head
6
+ matrix:
7
+ allow_failures:
8
+ - rvm: ruby-head
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --markup markdown
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in wincommon.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # WinCommon
2
+
3
+ Library for commonly used Windows constants, data types, typedefs, structures and functions.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'WinCommon'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install WinCommon
18
+
19
+ ## Unlicense
20
+
21
+ ![Copyright-Free](http://unlicense.org/pd-icon.png)
22
+
23
+ All text, documentation, code and files in this repository are in public domain (including this text, README).
24
+ It means you can copy, modify, distribute and include in your own work/code, even for commercial purposes, all without asking permission.
25
+
26
+ [About Unlicense](http://unlicense.org/)
27
+
28
+ ## Contributing
29
+
30
+ Feel free to improve as you see.
31
+
32
+ 1. Fork it ( https://github.com/davispuh/WinCommon/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create a new Pull Request
37
+
38
+
39
+ **Warning**: By sending pull request to this repository you dedicate any and all copyright interest in pull request (code files and all other) to the public domain. (files will be in public domain even if pull request doesn't get merged)
40
+
41
+ Also before sending pull request you acknowledge that you own all copyrights or have authorization to dedicate them to public domain.
42
+
43
+ If you don't want to dedicate code to public domain or if you're not allowed to (eg. you don't own required copyrights) then DON'T send pull request.
44
+
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'yard'
4
+
5
+ desc 'Default: run specs.'
6
+ task :default => :spec
7
+
8
+ desc 'Run specs'
9
+ RSpec::Core::RakeTask.new(:spec) do |t|
10
+ end
11
+
12
+ YARD::Rake::YardocTask.new(:doc) do |t|
13
+ end
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <http://unlicense.org/>
@@ -0,0 +1,6 @@
1
+ module WinCommon
2
+ module Constants
3
+ FALSE = 0
4
+ TRUE = 1
5
+ end
6
+ end
@@ -0,0 +1,4 @@
1
+ module WinCommon
2
+ module Enums
3
+ end
4
+ end
@@ -0,0 +1,92 @@
1
+ module WinCommon
2
+ module Errors
3
+ module HRESULT
4
+ # Defined in winerror.h
5
+ SEVERITY_SUCCESS = 0
6
+ SEVERITY_ERROR = 1
7
+ NOERROR = 0x00000000
8
+ S_OK = 0x00000000
9
+ S_FALSE = 0x00000001
10
+ E_PENDING = 0x8000000A
11
+ E_BOUNDS = 0x8000000B
12
+ E_CHANGED_STATE = 0x8000000C
13
+ E_ILLEGAL_STATE_CHANGE = 0x8000000D
14
+ E_ILLEGAL_METHOD_CALL = 0x8000000E
15
+ RO_E_METADATA_NAME_NOT_FOUND = 0x8000000F
16
+ RO_E_METADATA_NAME_IS_NAMESPACE = 0x80000010
17
+ RO_E_METADATA_INVALID_TYPE_FORMAT = 0x80000011
18
+ RO_E_INVALID_METADATA_FILE = 0x80000012
19
+ RO_E_CLOSED = 0x80000013
20
+ RO_E_EXCLUSIVE_WRITE = 0x80000014
21
+ RO_E_CHANGE_NOTIFICATION_IN_PROGRESS = 0x80000015
22
+ RO_E_ERROR_STRING_NOT_FOUND = 0x80000016
23
+ E_STRING_NOT_NULL_TERMINATED = 0x80000017
24
+ E_ILLEGAL_DELEGATE_ASSIGNMENT = 0x80000018
25
+ E_ASYNC_OPERATION_NOT_STARTED = 0x80000019
26
+ E_APPLICATION_EXITING = 0x8000001A
27
+ E_APPLICATION_VIEW_EXITING = 0x8000001B
28
+ RO_E_MUST_BE_AGILE = 0x8000001C
29
+ RO_E_UNSUPPORTED_FROM_MTA = 0x8000001D
30
+ RO_E_COMMITTED = 0x8000001E
31
+ RO_E_BLOCKED_CROSS_ASTA_CALL = 0x8000001F
32
+ E_NOTIMPL = 0x80004001
33
+ E_NOINTERFACE = 0x80004002
34
+ E_POINTER = 0x80004003
35
+ E_ABORT = 0x80004004
36
+ E_FAIL = 0x80004005
37
+ E_UNEXPECTED = 0x8000FFFF
38
+ E_PATH_NOT_FOUND = 0x80070003
39
+ E_ACCESSDENIED = 0x80070005
40
+ E_HANDLE = 0x80070006
41
+ E_INVALID_DATA = 0x8007000D
42
+ E_OUTOFMEMORY = 0x8007000E
43
+ E_INVALIDARG = 0x80070057
44
+ def self.toUnsigned(hresult)
45
+ hresult += 0x1_0000_0000 if (hresult < 0)
46
+ hresult
47
+ end
48
+
49
+ def self.GetSeverity(hresult)
50
+ (toUnsigned(hresult) >> 31) & 0x01
51
+ end
52
+
53
+ def self.GetFacility(hresult)
54
+ (toUnsigned(hresult) >> 16) & 0x1FFF
55
+ end
56
+
57
+ def self.GetCode(hresult)
58
+ toUnsigned(hresult) & 0x0000FFFF
59
+ end
60
+
61
+ def self.IsSuccess?(hresult)
62
+ GetSeverity(hresult) == SEVERITY_SUCCESS
63
+ end
64
+
65
+ def self.IsError?(hresult)
66
+ GetSeverity(hresult) == SEVERITY_ERROR
67
+ end
68
+
69
+ def self.GetName(hresult)
70
+ hresult = toUnsigned(hresult)
71
+ constants(true).each do |name|
72
+ if const_get(name) == hresult
73
+ return name.to_s
74
+ end
75
+ end
76
+ if IsSuccess?(hresult)
77
+ 'UKNOWN_SUCCESS'
78
+ else
79
+ 'UKNOWN_ERROR'
80
+ end
81
+ end
82
+ end
83
+
84
+ class HRESULTError < WinCommonError
85
+ attr_reader :code
86
+ def initialize(hr)
87
+ @code = HRESULT.toUnsigned(hr)
88
+ super(HRESULT.GetName(@code) + " [0x%08X]" % @code)
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,7 @@
1
+ module WinCommon
2
+ module Errors
3
+ class WinCommonError < RuntimeError; end
4
+ end
5
+ end
6
+
7
+ require_relative 'errors/hresult'
@@ -0,0 +1,5 @@
1
+ module WinCommon
2
+ module Functions
3
+
4
+ end
5
+ end
@@ -0,0 +1,72 @@
1
+ module WinCommon
2
+ module Structs
3
+ class GUID < FFI::Struct
4
+ layout({
5
+ :data1 => :ulong,
6
+ :data2 => :ushort,
7
+ :data3 => :ushort,
8
+ :data4 => [ :uchar, 8 ]
9
+ })
10
+
11
+ def from_str(guid)
12
+ data = [guid.gsub(/[{\-}]/, '')].pack('H*').unpack('L>S>2C8')
13
+ self[:data1] = data[0]
14
+ self[:data2] = data[1]
15
+ self[:data3] = data[2]
16
+ 3.upto(data.count - 1) do |i|
17
+ self[:data4][i-3] = data[i]
18
+ end
19
+ end
20
+
21
+ def to_s
22
+ str = "%08X-%04X-%04X-%02X%02X-" % [self[:data1], self[:data2], self[:data3], self[:data4][0], self[:data4][1]]
23
+ 2.upto(7) do |i|
24
+ str << "%02X" % self[:data4][i]
25
+ end
26
+ str
27
+ end
28
+
29
+ def to_ref
30
+ self.ptr
31
+ end
32
+ end
33
+
34
+ class IID < GUID
35
+ end
36
+
37
+ class CLSID < GUID
38
+ end
39
+
40
+ class FMTID < GUID
41
+ end
42
+
43
+ class WideString
44
+ extend FFI::DataConverter
45
+ native_type FFI::Type::POINTER
46
+ def self.to_native(value, context)
47
+ end
48
+
49
+ def self.from_native(pointer, context)
50
+ end
51
+
52
+ def self.size
53
+ FFI.type_size(FFI::Type::POINTER)
54
+ end
55
+
56
+ def self.reference_required?
57
+ false
58
+ end
59
+ end
60
+ end
61
+
62
+ module Typedefs
63
+ FFI.typedef Structs::GUID.ptr, :LPGUID
64
+ FFI.typedef Structs::GUID.ptr, :LPCGUID
65
+ FFI.typedef Structs::IID.ptr, :LPIID
66
+ FFI.typedef Structs::CLSID.ptr, :LPCLSID
67
+ FFI.typedef Structs::FMTID.ptr, :LPFMTID
68
+ FFI.typedef Structs::GUID.by_ref(:in), :REFGUID
69
+ FFI.typedef Structs::IID.by_ref(:in), :REFIID
70
+ FFI.typedef Structs::CLSID.by_ref(:in), :REFCLSID
71
+ end
72
+ end
@@ -0,0 +1,197 @@
1
+ module WinCommon
2
+ module Typedefs
3
+ FFI.typedef :void, :VOID
4
+ FFI.typedef :int, :BOOL
5
+ FFI.typedef :char, :CHAR
6
+ FFI.typedef :short, :SHORT
7
+ FFI.typedef :int, :INT
8
+ FFI.typedef :uint, :UINT
9
+ FFI.typedef :long, :LONG
10
+ FFI.typedef :ulong, :ULONG
11
+ FFI.typedef :pointer, :PULONG
12
+ FFI.typedef :ushort, :USHORT
13
+ FFI.typedef :pointer, :PUSHORT
14
+ FFI.typedef :uchar, :UCHAR
15
+ FFI.typedef :pointer, :PUCHAR
16
+ FFI.typedef :pointer, :PSZ
17
+ FFI.typedef :pointer, :CALLBACK
18
+ FFI.typedef :int, :BOOL
19
+ FFI.typedef :uchar, :BYTE
20
+ FFI.typedef :ushort, :WORD
21
+ FFI.typedef :ulong, :DWORD
22
+ FFI.typedef :float, :FLOAT
23
+ FFI.typedef :pointer, :PFLOAT
24
+ FFI.typedef :pointer, :PBOOL
25
+ FFI.typedef :pointer, :LPBOOL
26
+ FFI.typedef :pointer, :PBYTE
27
+ FFI.typedef :pointer, :LPBYTE
28
+ FFI.typedef :pointer, :PPBYTE
29
+ FFI.typedef :pointer, :PINT
30
+ FFI.typedef :pointer, :PUINT
31
+ FFI.typedef :pointer, :LPINT
32
+ FFI.typedef :pointer, :PWORD
33
+ FFI.typedef :pointer, :LPWORD
34
+ FFI.typedef :pointer, :LPLONG
35
+ FFI.typedef :pointer, :PDWORD
36
+ FFI.typedef :pointer, :LPDWORD
37
+ FFI.typedef :pointer, :LPVOID
38
+ FFI.typedef :pointer, :LPCVOID
39
+ FFI.typedef :pointer, :PSHORT
40
+ FFI.typedef :pointer, :PLONG
41
+ FFI.typedef :size_t, :HANDLE
42
+ FFI.typedef :pointer, :PHANDLE
43
+ FFI.typedef :pointer, :LPHANDLE
44
+ FFI.typedef :BYTE, :FCHAR
45
+ FFI.typedef :WORD, :FSHORT
46
+ FFI.typedef :DWORD, :FLONG
47
+ FFI.typedef :LONG, :HRESULT
48
+ FFI.typedef :char, :CCHAR
49
+ FFI.typedef :DWORD, :LCID
50
+ FFI.typedef :PDWORD, :PLCID
51
+ FFI.typedef :WORD, :LANGID
52
+ FFI.typedef :long_long, :LONGLONG
53
+ FFI.typedef :pointer, :PLONGLONG
54
+ FFI.typedef :ulong_long, :ULONGLONG
55
+ FFI.typedef :pointer, :PULONGLONG
56
+ FFI.typedef :LONGLONG, :USN
57
+ FFI.typedef :ULONGLONG, :DWORDLONG
58
+ FFI.typedef :pointer, :PDWORDLONG
59
+ FFI.typedef :BYTE, :BOOLEAN
60
+ FFI.typedef :pointer, :PBOOLEAN
61
+ FFI.typedef :int8, :INT8
62
+ FFI.typedef :pointer, :PINT8
63
+ FFI.typedef :int16, :INT16
64
+ FFI.typedef :pointer, :PINT16
65
+ FFI.typedef :int32, :INT32
66
+ FFI.typedef :pointer, :PINT32
67
+ FFI.typedef :int64, :INT64
68
+ FFI.typedef :pointer, :PINT64
69
+ FFI.typedef :uint8, :UINT8
70
+ FFI.typedef :pointer, :PUINT8
71
+ FFI.typedef :uint16, :UINT16
72
+ FFI.typedef :pointer, :PUINT16
73
+ FFI.typedef :uint32, :UINT32
74
+ FFI.typedef :pointer, :PUINT32
75
+ FFI.typedef :uint64, :UINT64
76
+ FFI.typedef :pointer, :PUINT64
77
+ FFI.typedef :int32, :LONG32
78
+ FFI.typedef :pointer, :PLONG32
79
+ FFI.typedef :int32, :ULONG32
80
+ FFI.typedef :pointer, :PULONG32
81
+ FFI.typedef :int32, :DWORD32
82
+ FFI.typedef :pointer, :PDWORD32
83
+ FFI.typedef :long, :INT_PTR
84
+ FFI.typedef :pointer, :PINT_PTR
85
+ FFI.typedef :size_t, :UINT_PTR
86
+ FFI.typedef :pointer, :PINT_PTR
87
+ FFI.typedef :long, :LONG_PTR
88
+ FFI.typedef :pointer, :PLONG_PTR
89
+ FFI.typedef :size_t, :ULONG_PTR
90
+ FFI.typedef :pointer, :PULONG_PTR
91
+ FFI.typedef :ULONG_PTR, :SIZE_T
92
+ FFI.typedef :pointer, :PSIZE_T
93
+ FFI.typedef :LONG_PTR, :SSIZE_T
94
+ FFI.typedef :pointer, :PSSIZE_T
95
+ FFI.typedef :ULONG_PTR, :DWORD_PTR
96
+ FFI.typedef :pointer, :PDWORD_PTR
97
+ FFI.typedef :int64, :LONG64
98
+ FFI.typedef :pointer, :PLONG64
99
+ FFI.typedef :uint64, :ULONG64
100
+ FFI.typedef :pointer, :PULONG64
101
+ FFI.typedef :uint64, :DWORD64
102
+ FFI.typedef :pointer, :PDWORD64
103
+ FFI.typedef :UINT_PTR, :WPARAM
104
+ FFI.typedef :LONG_PTR, :LPARAM
105
+ FFI.typedef :LONG_PTR, :LRESULT
106
+ FFI.typedef :HANDLE, :HGLOBAL
107
+ FFI.typedef :HANDLE, :HLOCAL
108
+ FFI.typedef :ulong_long, :HANDLE_PTR
109
+ FFI.typedef :WORD, :ATOM
110
+ FFI.typedef :HANDLE, :HKEY
111
+ FFI.typedef :pointer, :PHKEY
112
+ FFI.typedef :HANDLE, :HINSTANCE
113
+ FFI.typedef :HINSTANCE, :HMODULE
114
+ FFI.typedef :HANDLE, :HWND
115
+ FFI.typedef :HANDLE, :HHOOK
116
+ FFI.typedef :HANDLE, :HICON
117
+ FFI.typedef :HANDLE, :HMENU
118
+ FFI.typedef :HICON, :HCURSOR
119
+ FFI.typedef :short, :WCHAR
120
+ FFI.typedef :pointer, :PWCHAR
121
+ FFI.typedef :pointer, :LPWCH
122
+ FFI.typedef :pointer, :PWCH
123
+ FFI.typedef :pointer, :LPCWCH
124
+ FFI.typedef :pointer, :PCWCH
125
+ FFI.typedef :pointer, :NWPSTR
126
+ FFI.typedef :pointer, :LPWSTR
127
+ FFI.typedef :pointer, :PLPWSTR
128
+ FFI.typedef :pointer, :PWSTR
129
+ FFI.typedef :pointer, :PZPWSTR
130
+ FFI.typedef :pointer, :PCZPWSTR
131
+ FFI.typedef :pointer, :LPUWSTR
132
+ FFI.typedef :pointer, :PUWSTR
133
+ FFI.typedef :pointer, :PZPCWSTR
134
+ FFI.typedef :pointer, :LPCWSTR
135
+ FFI.typedef :pointer, :PCWSTR
136
+ FFI.typedef :pointer, :PCZPCWSTR
137
+ FFI.typedef :pointer, :LPCUWSTR
138
+ FFI.typedef :pointer, :PCUWSTR
139
+ FFI.typedef :pointer, :PZZWSTR
140
+ FFI.typedef :pointer, :PCZZWSTR
141
+ FFI.typedef :pointer, :PUZZWSTR
142
+ FFI.typedef :pointer, :PCUZZWSTR
143
+ FFI.typedef :pointer, :PNZWCH
144
+ FFI.typedef :pointer, :PCNZWCH
145
+ FFI.typedef :pointer, :PUNZWCH
146
+ FFI.typedef :pointer, :PCUNZWCH
147
+ FFI.typedef :pointer, :LPCWCHAR
148
+ FFI.typedef :pointer, :PCWCHAR
149
+ FFI.typedef :pointer, :LPCUWCHAR
150
+ FFI.typedef :pointer, :PCUWCHAR
151
+ FFI.typedef :ulong, :UCSCHAR
152
+ FFI.typedef :pointer, :PCHAR
153
+ FFI.typedef :pointer, :LPCH
154
+ FFI.typedef :pointer, :PCH
155
+ FFI.typedef :pointer, :LPCCH
156
+ FFI.typedef :pointer, :PCCH
157
+ FFI.typedef :pointer, :NPSTR
158
+ FFI.typedef :pointer, :LPSTR
159
+ FFI.typedef :pointer, :PSTR
160
+ FFI.typedef :pointer, :PZPSTR
161
+ FFI.typedef :pointer, :PCZPSTR
162
+ FFI.typedef :pointer, :LPCSTR
163
+ FFI.typedef :pointer, :PCSTR
164
+ FFI.typedef :pointer, :PZPCSTR
165
+ FFI.typedef :pointer, :PCZPCSTR
166
+ FFI.typedef :pointer, :PZZSTR
167
+ FFI.typedef :pointer, :PCZZSTR
168
+ FFI.typedef :pointer, :PNZCH
169
+ FFI.typedef :pointer, :PCNZCH
170
+ FFI.typedef :WCHAR, :TCHAR
171
+ FFI.typedef :pointer, :PTCHAR
172
+ FFI.typedef :WCHAR, :TBYTE
173
+ FFI.typedef :pointer, :PTBYTE
174
+ FFI.typedef :LPWCH, :LPTCH
175
+ FFI.typedef :LPWCH, :PTCH
176
+ FFI.typedef :LPCWCH, :LPCTCH
177
+ FFI.typedef :LPCWCH, :PCTCH
178
+ FFI.typedef :LPWSTR, :PTSTR
179
+ FFI.typedef :LPWSTR, :LPTSTR
180
+ FFI.typedef :LPCWSTR, :PCTSTR
181
+ FFI.typedef :LPCWSTR, :LPCTSTR
182
+ FFI.typedef :LPUWSTR, :PUTSTR
183
+ FFI.typedef :LPUWSTR, :LPUTSTR
184
+ FFI.typedef :LPCUWSTR, :PCUTSTR
185
+ FFI.typedef :LPCUWSTR, :LPCUTSTR
186
+ FFI.typedef :LPWSTR, :LP
187
+ FFI.typedef :PZZWSTR, :PZZTSTR
188
+ FFI.typedef :PCZZWSTR, :PCZZTSTR
189
+ FFI.typedef :PUZZWSTR, :PUZZTSTR
190
+ FFI.typedef :PCUZZWSTR, :PCUZZTSTR
191
+ FFI.typedef :PZPWSTR, :PZPTSTR
192
+ FFI.typedef :PNZWCH, :PNZTCH
193
+ FFI.typedef :PCNZWCH, :PCNZTCH
194
+ FFI.typedef :PUNZWCH, :PUNZTCH
195
+ FFI.typedef :PCUNZWCH, :PCUNZTCH
196
+ end
197
+ end
@@ -0,0 +1,3 @@
1
+ module WinCommon
2
+ VERSION = '0.0.1'
3
+ end
data/lib/win_common.rb ADDED
@@ -0,0 +1,8 @@
1
+ require_relative 'win_common/version'
2
+ require_relative 'win_common/constants'
3
+ require_relative 'win_common/errors'
4
+ require_relative 'win_common/functions'
5
+
6
+ module WinCommon
7
+
8
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: UTF-8
2
+ require 'simplecov'
3
+
4
+ SimpleCov.start
5
+ require_relative '../lib/win_common'
@@ -0,0 +1,5 @@
1
+ # encoding: UTF-8
2
+ require 'spec_helper'
3
+
4
+ describe WinCommon do
5
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'win_common/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'WinCommon'
8
+ spec.version = WinCommon::VERSION
9
+ spec.authors = ['Dāvis']
10
+ spec.email = ['davispuh@gmail.com']
11
+ spec.summary = 'Commonly used things when interacting with Windows'
12
+ spec.description = 'Library for commonly used Windows constants, data types, typedefs, structures and functions.'
13
+ spec.homepage = 'https://github.com/davispuh/WinCommon'
14
+ spec.license = 'UNLICENSE'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.6'
22
+ spec.add_development_dependency 'rake'
23
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: WinCommon
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dāvis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Library for commonly used Windows constants, data types, typedefs, structures
42
+ and functions.
43
+ email:
44
+ - davispuh@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - ".travis.yml"
51
+ - ".yardopts"
52
+ - Gemfile
53
+ - README.md
54
+ - Rakefile
55
+ - UNLICENSE
56
+ - lib/win_common.rb
57
+ - lib/win_common/constants.rb
58
+ - lib/win_common/enums.rb
59
+ - lib/win_common/errors.rb
60
+ - lib/win_common/errors/hresult.rb
61
+ - lib/win_common/functions.rb
62
+ - lib/win_common/structs.rb
63
+ - lib/win_common/typedefs.rb
64
+ - lib/win_common/version.rb
65
+ - spec/spec_helper.rb
66
+ - spec/win_common_spec.rb
67
+ - win_common.gemspec
68
+ homepage: https://github.com/davispuh/WinCommon
69
+ licenses:
70
+ - UNLICENSE
71
+ metadata: {}
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubyforge_project:
88
+ rubygems_version: 2.2.2
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: Commonly used things when interacting with Windows
92
+ test_files:
93
+ - spec/spec_helper.rb
94
+ - spec/win_common_spec.rb
95
+ has_rdoc: