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)); }
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); }
internal WSManUserNameAuthenticationCredentials() { this.cred = new WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct(); this.data = WSManNativeApi.MarshalledObject.Create <WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct>(this.cred); }