module Process

def format_creds_from_hash(hash)

def format_creds_from_hash(hash)
  logon = hash["with_logon"].to_wide_string
  if hash["password"]
    passwd = hash["password"].to_wide_string
  else
    raise ArgumentError, "password must be specified if with_logon is used"
  end
  if hash["domain"]
    domain = hash["domain"].to_wide_string
  end
  [ logon, passwd, domain ]
end