private static NtAlpcClient ConnectPort(string path, SecurityQualityOfService sqos) { AlpcReceiveMessageAttributes in_attr = new AlpcReceiveMessageAttributes(); return(NtAlpcClient.Connect(path, null, CreatePortAttributes(sqos), AlpcMessageFlags.SyncRequest, null, null, null, in_attr, NtWaitTimeout.FromSeconds(5))); }
/// <summary> /// Method to create an object from a set of object attributes. /// </summary> /// <param name="obj_attributes">The object attributes to create/open from.</param> /// <returns>The newly created object.</returns> protected override object CreateObject(ObjectAttributes obj_attributes) { if (ParameterSetName == "SidCheck") { return(NtAlpcClient.Connect(Path, HandleObjectAttributes, PortAttributes, Flags, RequiredServerSid, ConnectionMessage, OutMessageAttributes, InMessageAttributes, Timeout)); } else { return(NtAlpcClient.Connect(obj_attributes, HandleObjectAttributes, PortAttributes, Flags, ServerSecurityRequirements, ConnectionMessage, OutMessageAttributes, InMessageAttributes, Timeout)); } }