Class: SmbRpc::Svcctl::CreateServiceReq
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- SmbRpc::Svcctl::CreateServiceReq
- Defined in:
- lib/smbRpc/svcctl/createService.rb
Instance Method Summary collapse
-
#displayLen ⇒ Object
helper method to get displayname length.
- #initialize_instance ⇒ Object
Instance Method Details
#displayLen ⇒ Object
helper method to get displayname length
40 41 42 |
# File 'lib/smbRpc/svcctl/createService.rb', line 40 def displayLen #helper method to get displayname length get_parameter(:display).bytesize end |
#initialize_instance ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/smbRpc/svcctl/createService.rb', line 26 def initialize_instance super scHandle.value = get_parameter(:handle) serviceName.str = "#{get_parameter(:name)}\x00".bytes.pack("v*") displayName.str = "#{get_parameter(:display)}\x00".bytes.pack("v*") if displayLen > 0 #if display not empty binaryPathName.str = "#{get_parameter(:path)}\x00".bytes.pack("v*") desiredAccess.value = get_parameter(:access) serviceType.value = get_parameter(:type) startType.value = get_parameter(:start) errorControl.value = get_parameter(:error) request.pduHead.frag_length = self.num_bytes request.opnum.value = 12 #RCreateServiceW end |