C# Class CSharp___DllImport.Phone.TaskHost

Show file Open project: ApexHAB/apex-lumia

Public Methods

Method Description
CeImpersonateCurrentProcess ( ) : bool

This function is used to ensure the correct return value for every case. It ensures that only someone with the impersonate privilege is able to do this. It also ensures that after a valid impersonate call, the access rights for the impersonating application are appropriate. | Call "CeRevertToSelf" after changed privileges

CeRevertToSelf ( ) : bool

A process should call the RevertToSelf function after finishing any impersonation begun by using the DdeImpersonateClient, ImpersonateDdeClientWindow, ImpersonateLoggedOnUser, ImpersonateNamedPipeClient, ImpersonateSelf, ImpersonateAnonymousToken or SetThreadToken function. An RPC server that used the RpcImpersonateClient function to impersonate a client must call the RpcRevertToSelf or RpcRevertToSelfEx to end the impersonation. If RevertToSelf fails, your application continues to run in the context of the client, which is not appropriate. You should shut down the process if RevertToSelf fails.

GetCurrenHostInfo ( ) : HostInformation

Private Methods

Method Description
PreventDehydrating ( bool preventOn ) : void

Method Details

CeImpersonateCurrentProcess() public static method

This function is used to ensure the correct return value for every case. It ensures that only someone with the impersonate privilege is able to do this. It also ensures that after a valid impersonate call, the access rights for the impersonating application are appropriate. | Call "CeRevertToSelf" after changed privileges
public static CeImpersonateCurrentProcess ( ) : bool
return bool

CeRevertToSelf() public static method

A process should call the RevertToSelf function after finishing any impersonation begun by using the DdeImpersonateClient, ImpersonateDdeClientWindow, ImpersonateLoggedOnUser, ImpersonateNamedPipeClient, ImpersonateSelf, ImpersonateAnonymousToken or SetThreadToken function. An RPC server that used the RpcImpersonateClient function to impersonate a client must call the RpcRevertToSelf or RpcRevertToSelfEx to end the impersonation. If RevertToSelf fails, your application continues to run in the context of the client, which is not appropriate. You should shut down the process if RevertToSelf fails.
public static CeRevertToSelf ( ) : bool
return bool

GetCurrenHostInfo() public static method

public static GetCurrenHostInfo ( ) : HostInformation
return HostInformation