title: StreamString(pipeClient) throws error Type is not defined
body: <p>I am trying to unlock the machine by passing user id and password in UiPath when scheduled bot trying to run the process in locked system</p>
  
  <p>Below is my code</p>
  
  <pre><code>    'Create a new pipe client
      Using pipeClient As New System.IO.Pipes.NamedPipeClientStream(
          ".",
          "CredentialProviderPipe",
          PipeDirection.InOut,
          PipeOptions.None,
          System.Security.Principal.TokenImpersonationLevel.Impersonation)
  
          'Attempt to connect to it
          pipeClient.Connect(10000)
          'Send credentials
          Dim dom As String
           If Domain = "" Then
              dom = Environment.UserDomainName
          Else
              dom = Domain
          End If
  
          Dim ss As New StreamString(pipeClient)
  
          ss.WriteString(String.Format("LOGON{0}{1}{0}{2}{0}{3}", vbLf, dom, Username, Password))
  
          'Wait for reply
          Using pr As New StreamReader(pipeClient, System.Text.Encoding.Unicode)
              Response = pr.ReadLine()
              If Response = "OK" OrElse Response = "UNKNOWN" Then Return
  
              ErrorCode = pr.ReadLine()
              ErrorMessage = pr.ReadLine()
          End Using
      End Using
  Catch ex As TimeoutException
      Response = "ERROR"
      ErrorCode = "0x80131505"
      ErrorMessage = ex.Message
  Catch ex As Exception
      Response = "ERROR"
      ErrorCode = ""
      ErrorMessage = ex.Message
  End Try
  </code></pre>
  
  <p>I am getting below error that error BC30002: Type StringStream is not defined.</p>
  
  <p>I dont know how to resolve the issue. Please help</p>