Пример #1
0
 internal static int WSManSetSessionOption(
     IntPtr wsManSessionHandle,
     WSManNativeApi.WSManSessionOption option,
     WSManNativeApi.WSManDataDWord data)
 {
     WSManNativeApi.MarshalledObject marshalledObject = data.Marshal();
     using (marshalledObject)
         return(WSManNativeApi.WSManSetSessionOption(wsManSessionHandle, option, marshalledObject.DataPtr));
 }
Пример #2
0
 internal WSManUserNameAuthenticationCredentials(
     string name,
     SecureString pwd,
     WSManNativeApi.WSManAuthenticationMechanism authMechanism)
 {
     this.cred = new WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct();
     this.cred.authenticationMechanism = authMechanism;
     this.cred.userName = name;
     if (pwd != null)
     {
         this.cred.password = Marshal.SecureStringToGlobalAllocUnicode(pwd);
     }
     this.data = WSManNativeApi.MarshalledObject.Create <WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct>(this.cred);
 }
Пример #3
0
 internal WSManUserNameAuthenticationCredentials()
 {
     this.cred = new WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct();
     this.data = WSManNativeApi.MarshalledObject.Create <WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct>(this.cred);
 }