Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ImpersonateAndTryCode()

static void System.IO.Pipes.NamedPipeServerStream.ImpersonateAndTryCode ( object helper)
inlinestaticprivate

Definition at line 358 of file NamedPipeServerStream.cs.

359 {
360 ExecuteHelper executeHelper = (ExecuteHelper)helper;
361 if (global::Interop.Advapi32.ImpersonateNamedPipeClient(executeHelper._handle))
362 {
363 executeHelper._mustRevert = true;
364 }
365 else
366 {
367 executeHelper._impersonateErrorCode = Marshal.GetLastPInvokeError();
368 }
369 if (executeHelper._mustRevert)
370 {
371 executeHelper._userCode();
372 }
373 }

References System.IO.Pipes.NamedPipeServerStream.ExecuteHelper._handle, System.IO.Pipes.NamedPipeServerStream.ExecuteHelper._mustRevert, System.IO.Pipes.NamedPipeServerStream.ExecuteHelper._userCode, and System.Runtime.InteropServices.Marshal.GetLastPInvokeError().

Referenced by System.IO.Pipes.NamedPipeServerStream.RunAsClient().