/// <summary> /// NetrLogonUasLogoff IDL method. Opnum: 1 /// </summary> /// <param name="ServerName"> /// ServerName parameter. /// </param> /// <param name="UserName"> /// UserName parameter. /// </param> /// <param name="Workstation"> /// Workstation parameter. /// </param> /// <param name="LogoffInformation"> /// LogoffInformation parameter. /// </param> public NetApiStatus NetrLogonUasLogoff( string ServerName, string UserName, string Workstation, out _NETLOGON_LOGOFF_UAS_INFO? LogoffInformation) { const ushort opnum = 1; byte[] requestStub; byte[] responseStub; Int3264[] paramList; int retVal; SafeIntPtr pServerName = Marshal.StringToHGlobalUni(ServerName); SafeIntPtr pUserName = Marshal.StringToHGlobalUni(UserName); SafeIntPtr pWorkstation = Marshal.StringToHGlobalUni(Workstation); paramList = new Int3264[] { pServerName, pUserName, pWorkstation, IntPtr.Zero, 0 // retVal }; requestStub = RpceStubEncoder.ToBytes( RpceStubHelper.GetPlatform(), NrpcRpcStubFormatString.TypeFormatString, new RpceStubExprEval[] { new RpceStubExprEval(logon__NETLOGON_DELTA_USERExprEval_0000) }, NrpcRpcStubFormatString.ProcFormatString, NrpcRpcStubFormatString.ProcFormatStringOffsetTable[opnum], true, paramList); rpceClientTransport.Call(opnum, requestStub, rpceTimeout, out responseStub); using (RpceInt3264Collection outParamList = RpceStubDecoder.ToParamList( RpceStubHelper.GetPlatform(), NrpcRpcStubFormatString.TypeFormatString, new RpceStubExprEval[] { new RpceStubExprEval(logon__NETLOGON_DELTA_USERExprEval_0000) }, NrpcRpcStubFormatString.ProcFormatString, NrpcRpcStubFormatString.ProcFormatStringOffsetTable[opnum], true, responseStub, paramList)) { IntPtr pValidationInformation = outParamList[3]; LogoffInformation = TypeMarshal.ToNullableStruct<_NETLOGON_LOGOFF_UAS_INFO>(pValidationInformation); retVal = outParamList[4].ToInt32(); } pServerName.Dispose(); pUserName.Dispose(); pWorkstation.Dispose(); return (NetApiStatus)retVal; }
/// <summary> /// NetrLogonUasLogoff IDL method. Opnum: 1 /// </summary> /// <param name="serverName"> /// ServerName parameter. /// </param> /// <param name="userName"> /// UserName parameter. /// </param> /// <param name="workstation"> /// Workstation parameter. /// </param> /// <param name="logoffInformation"> /// LogoffInformation parameter. /// </param> /// <returns> /// The method returns 0x00000000 on success; /// otherwise, it returns a nonzero error code. /// </returns> public NetApiStatus NetrLogonUasLogoff( string serverName, string userName, string workstation, out _NETLOGON_LOGOFF_UAS_INFO? logoffInformation) { return rpc.NetrLogonUasLogoff( serverName, userName, workstation, out logoffInformation); }