Class: Unknownr::Windows::PROPERTYKEY

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/unknownr.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](type, index) ⇒ Object



387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/unknownr.rb', line 387

def self.[](type, index)
	new.tap { |key|
		key[:fmtid].tap { |guid|
			guid[:Data1] = 0x00000000 + index
			guid[:Data2] = 0x7363
			guid[:Data3] = 0x696e
			[0x84, 0x41, 0x79, 0x8a, 0xcf, 0x5a, 0xeb, 0xb7].each_with_index { |part, i|
				guid[:Data4][i] = part
			}
		}

		key[:pid] = type
	}
end

Instance Method Details

#==(other) ⇒ Object



402
# File 'lib/unknownr.rb', line 402

def ==(other) Windows.memcmp(other, self, size) == 0 end