C# Class dlech.SshAgentLib.PageantAgent

Creates a window using Windows API calls so that we can register the class of the window. This is how putty "talks" to pageant. This window will not actually be shown, just used to receive messages from clients.
Inheritance: Agent
ファイルを表示 Open project: dlech/SshAgentLib Class Usage Examples

Public Methods

Method Description
CheckPageantRunning ( ) : bool

Checks to see if any Pageant-like application is running

Dispose ( ) : void
PageantAgent ( ) : System

Creates a new instance of PageantWindow that acts as a server for Putty-type clients.

This window is not meant to be used for UI.

StartCygwinSocket ( string path ) : void

Starts a cygwin style socket that can be used by the ssh program that comes with cygwin.

StartMsysSocket ( string path ) : void

Starts a msysgit style socket that can be used by the ssh program that comes with msysgit.

StopCygwinSocket ( ) : void
StopMsysSocket ( ) : void

Private Methods

Method Description
CloseHandle ( IntPtr hObject ) : bool
CreateWindowExW ( UInt32 dwExStyle, [ lpClassName, [ lpWindowName, UInt32 dwStyle, Int32 x, Int32 y, Int32 nWidth, Int32 nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lpParam ) : IntPtr
CustomWndProc ( IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam ) : IntPtr

DefWindowProcW ( IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam ) : IntPtr
DestroyWindow ( IntPtr hWnd ) : bool
Dispose ( bool disposing ) : void
DoOSCheck ( ) : void
FindWindow ( String sClassName, String sAppName ) : IntPtr
GetProcessOwnerSID ( int pid ) : System.Security.Principal.SecurityIdentifier
GetSecurityInfo ( IntPtr handle, SE_OBJECT_TYPE objectType, SECURITY_INFORMATION securityInfo, IntPtr &ppsidOwner, IntPtr &ppsidGroup, IntPtr &ppDacl, IntPtr &ppSacl, IntPtr &ppSecurityDescriptor ) : long
OpenProcess ( AccessRights dwDesiredAccess, bool bInheritHandle, long dwProcessId ) : IntPtr
RegisterClassW ( [ lpWndClass ) : UInt16
RunWindowInNewAppcontext ( ) : void
connectionHandler ( Stream stream, Process process ) : void

Method Details

CheckPageantRunning() public static method

Checks to see if any Pageant-like application is running
public static CheckPageantRunning ( ) : bool
return bool

Dispose() public method

public Dispose ( ) : void
return void

PageantAgent() public method

Creates a new instance of PageantWindow that acts as a server for Putty-type clients.
This window is not meant to be used for UI.
/// Thrown when another instance of Pageant is running. ///
public PageantAgent ( ) : System
return System

StartCygwinSocket() public method

Starts a cygwin style socket that can be used by the ssh program that comes with cygwin.
public StartCygwinSocket ( string path ) : void
path string The path to the socket file that will be created.
return void

StartMsysSocket() public method

Starts a msysgit style socket that can be used by the ssh program that comes with msysgit.
public StartMsysSocket ( string path ) : void
path string The path to the socket file that will be created.
return void

StopCygwinSocket() public method

public StopCygwinSocket ( ) : void
return void

StopMsysSocket() public method

public StopMsysSocket ( ) : void
return void