• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Int3264类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Int3264的典型用法代码示例。如果您正苦于以下问题:C# Int3264类的具体用法?C# Int3264怎么用?C# Int3264使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Int3264类属于命名空间,在下文中一共展示了Int3264类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SamrRemoveMemberFromGroup

        /// <summary>
        ///  The SamrRemoveMemberFromGroup method removes a member
        ///  from a group. Opnum: 24 
        /// </summary>
        /// <param name="GroupHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a group object.
        /// </param>
        /// <param name="MemberId">
        ///  A RID representing an account to remove from the group's
        ///  membership list.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrRemoveMemberFromGroup(IntPtr GroupHandle, uint MemberId)
        {
            const ushort opnum = 24;
            Int3264[] paramList;
            int retVal = 0;

            paramList = new Int3264[] {
                GroupHandle,
                MemberId,
                IntPtr.Zero
            };

            using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
            {
                retVal = outParamList[2].ToInt32();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:34,代码来源:SamrRpcAdapter.cs


示例2: RpceCall

        /// <summary>
        /// The common part of all the FSRVP methods
        /// </summary>
        /// <param name="paramList">input param list to decode</param>
        /// <param name="opnum">opnum of the current FSRVP method</param>
        /// <returns>the decoded paramlist</returns>
        public RpceInt3264Collection RpceCall(Int3264[] paramList, ushort opnum)
        {
            byte[] requestStub;
            byte[] responseStub;
            RpceInt3264Collection outParamList = null;

            requestStub = RpceStubEncoder.ToBytes(
                    RpceStubHelper.GetPlatform(),
                    FsrvpStubFormatString.TypeFormatString,
                    null,
                    FsrvpStubFormatString.ProcFormatString,
                    FsrvpStubFormatString.ProcFormatStringOffsetTable[opnum],
                    true,
                    paramList);

            rpceClientTransport.Call(opnum, requestStub, rpceTimeout, out responseStub);

            outParamList = RpceStubDecoder.ToParamList(
                    RpceStubHelper.GetPlatform(),
                    FsrvpStubFormatString.TypeFormatString,
                    null,
                    FsrvpStubFormatString.ProcFormatString,
                    FsrvpStubFormatString.ProcFormatStringOffsetTable[opnum],
                    true,
                    responseStub,
                    paramList);

            return outParamList;
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:35,代码来源:FsrvpClient.cs


示例3: StartShadowCopySet

        /// <summary>
        /// The StartShadowCopySet method is called by the client to initiate a new shadow copy set for shadow copy creation.
        /// </summary>
        /// <param name="pShadowCopySetId">On output, the GUID of the shadow copy set that must be created by server.</param>
        /// <returns></returns>
        public int StartShadowCopySet(
            Guid clientShadowCopySetId,
            out Guid pShadowCopySetId)
        {
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pClientShadowCopySetId = TypeMarshal.ToIntPtr(clientShadowCopySetId);

            paramList = new Int3264[] {
                pClientShadowCopySetId,
                IntPtr.Zero,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, (ushort)FSRVP_OPNUM.StartShadowCopySet))
                {
                    pShadowCopySetId = TypeMarshal.ToStruct<Guid>(outParamList[1]);
                    retVal = outParamList[2].ToInt32();
                }
            }
            finally
            {
                pClientShadowCopySetId.Dispose();
            }

            return retVal;
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:35,代码来源:FsrvpClient.cs


示例4: GetSupportedVersion

        /// <summary>
        /// Get the Server supported version range.  
        /// Windows Server 8 compatiable Agent should return both  
        /// as FSSAGENT_RPC_VERSION_1
        /// </summary>
        /// <param name="MinVersion">The minor version.</param>
        /// <param name="MaxVersion">The maximum version.</param>
        /// <returns></returns>
        public int GetSupportedVersion(out uint MinVersion, out uint MaxVersion)
        {
            Int3264[] paramList;
            int retVal = 0;

            paramList = new Int3264[] {
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero
            };

            using (RpceInt3264Collection outParamList = RpceCall(paramList, (ushort)FSRVP_OPNUM.GetSupportedVersion))
            {
                MinVersion = (uint)Marshal.ReadInt32(outParamList[0]);
                MaxVersion = (uint)Marshal.ReadInt32(outParamList[1]);
                retVal = outParamList[2].ToInt32();
            }

            return retVal;
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:28,代码来源:FsrvpClient.cs


示例5: IsPathSupported

        /// <summary>
        /// The IsPathSupported method is invoked by client to query if a given share is supported by the server 
        /// for shadow copy operations.
        /// </summary>
        /// <param name="ShareName">The full path of the share in UNC format.</param>
        /// <param name="SupportedByThisProvider">On output, a Boolean, when set to TRUE, indicates that shadow
        /// copies of this share are supported by the server.</param>
        /// <param name="OwnerMachineName">On output, the name of the server machine to which the client MUST 
        /// connect to create shadow copies of the specified ShareName.</param>
        /// <returns></returns>
        public int IsPathSupported(
            string ShareName,
            out bool SupportedByThisProvider,
            out string OwnerMachineName)
        {
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pShareName = Marshal.StringToHGlobalUni(ShareName);

            paramList = new Int3264[] {
                pShareName,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, (ushort)FSRVP_OPNUM.IsPathSupported))
                {
                    SupportedByThisProvider = TypeMarshal.ToStruct<bool>(outParamList[1]);//(Marshal.ReadInt32(outParamList[1]) == 1);
                    OwnerMachineName = Marshal.PtrToStringUni(Marshal.ReadIntPtr(outParamList[2]));
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pShareName.Dispose();
            }

            return retVal;
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:43,代码来源:FsrvpClient.cs


示例6: SamrCreateUser2InDomain

        /// <summary>
        ///  The SamrCreateUser2InDomain method creates a user. Opnum
        ///  : 50 
        /// </summary>
        /// <param name="DomainHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a domain object.
        /// </param>
        /// <param name="Name">
        ///  The value to use as the name of the user. See the message
        ///  processing shown later in this section for details
        ///  on how this value maps to the data model.
        /// </param>
        /// <param name="AccountType">
        ///  A 32-bit value indicating the type of account to create.
        ///  See the message processing shown later in this section
        ///  for possible values.
        /// </param>
        /// <param name="DesiredAccess">
        ///  The access requested on the UserHandle on output. See
        ///  section  for a listing of possible values.
        /// </param>
        /// <param name="UserHandle">
        ///  An RPC context handle, as specified in section.
        /// </param>
        /// <param name="GrantedAccess">
        ///  The access granted on UserHandle.
        /// </param>
        /// <param name="RelativeId">
        ///  The RID of the newly created user.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrCreateUser2InDomain(
            IntPtr DomainHandle,
            _RPC_UNICODE_STRING? Name,
            uint AccountType,
            uint DesiredAccess,
            out IntPtr UserHandle,
            out uint GrantedAccess,
            out uint RelativeId)
        {
            const ushort opnum = 50;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pName = TypeMarshal.ToIntPtr(Name);

            paramList = new Int3264[] {
                DomainHandle,
                pName,
                AccountType,
                DesiredAccess,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    UserHandle = Marshal.ReadIntPtr(outParamList[4]);
                    GrantedAccess = TypeMarshal.ToStruct<uint>(outParamList[5]);
                    RelativeId = TypeMarshal.ToStruct<uint>(outParamList[6]);
                    retVal = outParamList[7].ToInt32();
                }
            }
            finally
            {
                pName.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:77,代码来源:SamrRpcAdapter.cs


示例7: DeleteShareMapping

        /// <summary>
        /// The DeleteShareMapping method deletes the mapping of a share’s shadow copy from a shadow copy set.
        /// </summary>
        /// <param name="ShadowCopySetId">The GUID of the shadow copy set.</param>
        /// <param name="ShadowCopyId">The GUID of the shadow copy associated with the share.</param>
        /// <param name="ShareName">The name of the share for which the share mapping is to be deleted.</param>
        /// <returns></returns>
        public int DeleteShareMapping(
            Guid ShadowCopySetId,
            Guid ShadowCopyId,
            string ShareName)
        {
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pShadowCopySetId = TypeMarshal.ToIntPtr(ShadowCopySetId);
            SafeIntPtr pShadowCopyId = TypeMarshal.ToIntPtr(ShadowCopyId);
            SafeIntPtr pShareName = Marshal.StringToHGlobalUni(ShareName);

            paramList = new Int3264[] {
                pShadowCopySetId,
                pShadowCopyId,
                pShareName,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, (ushort)FSRVP_OPNUM.DeleteShareMapping))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pShadowCopySetId.Dispose();
                pShadowCopyId.Dispose();
                pShareName.Dispose();
            }

            return retVal;
        }
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:42,代码来源:FsrvpClient.cs


示例8: SamrSetMemberAttributesOfGroup

        /// <summary>
        ///  The SamrSetMemberAttributesOfGroup method sets the attributes
        ///  of a member relationship. Opnum: 26 
        /// </summary>
        /// <param name="GroupHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a group object.
        /// </param>
        /// <param name="MemberId">
        ///  A RID that represents a member of a group (which is
        ///  a user or machine account).
        /// </param>
        /// <param name="Attributes">
        ///  The characteristics of the membership relationship.
        ///  For legal values, see section.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetMemberAttributesOfGroup(IntPtr GroupHandle, uint MemberId, uint Attributes)
        {
            const ushort opnum = 26;
            Int3264[] paramList;
            int retVal = 0;

            paramList = new Int3264[] {
                GroupHandle,
                MemberId,
                Attributes,
                IntPtr.Zero
            };

            using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
            {
                retVal = outParamList[3].ToInt32();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:39,代码来源:SamrRpcAdapter.cs


示例9: SamrSetSecurityObject

        /// <summary>
        ///  The SamrSetSecurityObject method sets the access control
        ///  on a server, domain, user, group, or alias object.
        ///  Opnum: 2 
        /// </summary>
        /// <param name="ObjectHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a server, domain, user, group, or alias object.
        /// </param>
        /// <param name="SecurityInformation">
        ///  A bit field that indicates the fields of SecurityDescriptor
        ///  that are requested to be set. The SECURITY_INFORMATION
        ///  type is defined in [MS-DTYP] section. The following
        ///  bits are valid; all other bits MUST be zero on send
        ///  and ignored on receipt.
        /// </param>
        /// <param name="SecurityDescriptor">
        ///  A security descriptor expressing access that is specific
        ///  to the ObjectHandle.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetSecurityObject(
            IntPtr ObjectHandle,
            SecurityInformation_Values SecurityInformation,
            _SAMPR_SR_SECURITY_DESCRIPTOR? SecurityDescriptor)
        {
            const ushort opnum = 2;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pSecurityDescriptor = TypeMarshal.ToIntPtr(SecurityDescriptor);

            paramList = new Int3264[] {
                ObjectHandle,
                (uint)SecurityInformation,
                pSecurityDescriptor,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pSecurityDescriptor.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:55,代码来源:SamrRpcAdapter.cs


示例10: SamrSetInformationGroup

        /// <summary>
        ///  The SamrSetInformationGroup method updates attributes
        ///  on a group object. Opnum: 21 
        /// </summary>
        /// <param name="GroupHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a group object.
        /// </param>
        /// <param name="GroupInformationClass">
        ///  An enumeration indicating which attributes to update.
        ///  See section  for a listing of possible values.
        /// </param>
        /// <param name="Buffer">
        ///  The requested attributes and values to update. See section
        ///   for structure details.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetInformationGroup(
            IntPtr GroupHandle,
            _GROUP_INFORMATION_CLASS GroupInformationClass,
            _SAMPR_GROUP_INFO_BUFFER Buffer)
        {
            const ushort opnum = 21;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pBuffer = TypeMarshal.ToIntPtr(Buffer, GroupInformationClass, null, null);

            paramList = new Int3264[] {
                GroupHandle,
                (int)GroupInformationClass,
                pBuffer,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pBuffer.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:51,代码来源:SamrRpcAdapter.cs


示例11: SamrSetInformationUser2

        /// <summary>
        ///  The SamrSetInformationUser2 method updates attributes
        ///  on a user object. Opnum: 58 
        /// </summary>
        /// <param name="UserHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a user object.
        /// </param>
        /// <param name="UserInformationClass">
        ///  An enumeration indicating which attributes to update.
        ///  See section  for a listing of possible values.
        /// </param>
        /// <param name="Buffer">
        ///  The requested attributes and values to update. See section
        ///   for structure details.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetInformationUser2(
            System.IntPtr UserHandle,
            _USER_INFORMATION_CLASS UserInformationClass,
            [Switch("UserInformationClass")] _SAMPR_USER_INFO_BUFFER Buffer)
        {
            const ushort opnum = 58;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pBuffer = TypeMarshal.ToIntPtr(Buffer, UserInformationClass, null, null);

            paramList = new Int3264[] {
                UserHandle,
                (int)UserInformationClass,
                pBuffer,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pBuffer.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:51,代码来源:SamrRpcAdapter.cs


示例12: SamrSetInformationDomain

        /// <summary>
        ///  The SamrSetInformationDomain method updates attributes
        ///  on a domain object. Opnum: 9 
        /// </summary>
        /// <param name="DomainHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a domain object.
        /// </param>
        /// <param name="DomainInformationClass">
        ///  An enumeration indicating which attributes to update.
        ///  See section  for a list of possible values.
        /// </param>
        /// <param name="DomainInformation">
        ///  The requested attributes and values to update. See section
        ///   for structure details.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetInformationDomain(
            IntPtr DomainHandle,
            _DOMAIN_INFORMATION_CLASS DomainInformationClass,
            _SAMPR_DOMAIN_INFO_BUFFER DomainInformation)
        {
            const ushort opnum = 9;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pDomainInformation = TypeMarshal.ToIntPtr(
                DomainInformation,
                DomainInformationClass,
                null,
                null);

            paramList = new Int3264[] {
                DomainHandle,
                (int)DomainInformationClass,
                pDomainInformation,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pDomainInformation.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:55,代码来源:SamrRpcAdapter.cs


示例13: SamrSetDSRMPassword

        /// <summary>
        ///  The SamrSetDSRMPassword method sets a local recovery
        ///  password. Opnum: 66 
        /// </summary>
        /// <param name="BindingHandle">
        ///  An RPC binding handle parameter, as specified in [C706-Ch2Intro].
        /// </param>
        /// <param name="Unused">
        ///  A string value. This value is not used in the protocol
        ///  and is ignored by the server.
        /// </param>
        /// <param name="UserId">
        ///  A RID of a user account. See the message processing
        ///  later in this section for details on restrictions on
        ///  this value.
        /// </param>
        /// <param name="EncryptedNtOwfPassword">
        ///  The NT hash of the new password (as presented by the
        ///  client) encrypted according to the specification of
        ///  ENCRYPTED_NT_OWF_PASSWORD, where the key is the User ID.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrSetDSRMPassword(
            System.IntPtr BindingHandle,
            [Indirect()] _RPC_UNICODE_STRING Unused,
            uint UserId,
            [Indirect()] _ENCRYPTED_LM_OWF_PASSWORD EncryptedNtOwfPassword)
        {
            const ushort opnum = 66;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pUnused = TypeMarshal.ToIntPtr(Unused);
            SafeIntPtr pEncryptedNtOwfPassword = TypeMarshal.ToIntPtr(EncryptedNtOwfPassword);

            paramList = new Int3264[] {
                pUnused,
                UserId,
                pEncryptedNtOwfPassword,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[3].ToInt32();
                }
            }
            finally
            {
                pUnused.Dispose();
                pEncryptedNtOwfPassword.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:59,代码来源:SamrRpcAdapter.cs


示例14: SamrRidToSid

        /// <summary>
        ///  The SamrRidToSid method obtains the SID of an account,
        ///  given a RID. Opnum: 65 
        /// </summary>
        /// <param name="ObjectHandle">
        ///  An RPC context handle, as specified in section. The
        ///  message processing shown later in this section contains
        ///  details on which types of ObjectHandle are accepted
        ///  by the server.
        /// </param>
        /// <param name="Rid">
        ///  A RID of an account.
        /// </param>
        /// <param name="Sid">
        ///  The SID of the account referenced by Rid.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrRidToSid(System.IntPtr ObjectHandle, uint Rid, out _RPC_SID? Sid)
        {
            const ushort opnum = 65;
            Int3264[] paramList;
            int retVal = 0;

            paramList = new Int3264[] {
                ObjectHandle,
                Rid,
                IntPtr.Zero,
                IntPtr.Zero
            };

            using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
            {
                Sid = TypeMarshal.ToNullableStruct<_RPC_SID>(Marshal.ReadIntPtr(outParamList[2]));
                retVal = outParamList[3].ToInt32();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:40,代码来源:SamrRpcAdapter.cs


示例15: SamrConnect5

        /// <summary>
        ///  The SamrConnect5 method obtains a handle to a server
        ///  object. Opnum: 64 
        /// </summary>
        /// <param name="ServerName">
        ///  The null-terminated NETBIOS name of the server; this
        ///  parameter MAYServerName is ignored on receipt.  be
        ///  ignored on receipt.
        /// </param>
        /// <param name="DesiredAccess">
        ///  An ACCESS_MASK that indicates the access requested for
        ///  ServerHandle on output. For a listing of possible values,
        ///  see section.
        /// </param>
        /// <param name="InVersion">
        ///  Indicates which field of the InRevisionInfo union is
        ///  used.
        /// </param>
        /// <param name="InRevisionInfo">
        ///  Revision information. For details, see the definition
        ///  of the SAMPR_REVISION_INFO_V1 structure, which is contained
        ///  in the SAMPR_REVISION_INFO union.
        /// </param>
        /// <param name="OutVersion">
        ///  Indicates which field of the OutRevisionInfo union is
        ///  used.
        /// </param>
        /// <param name="OutRevisionInfo">
        ///  Revision information. For details, see the definition
        ///  of the SAMPR_REVISION_INFO_V1 structure, which is contained
        ///  in the SAMPR_REVISION_INFO union.
        /// </param>
        /// <param name="ServerHandle">
        ///  An RPC context handle, as specified in section.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrConnect5(
            [String()] string ServerName,
            uint DesiredAccess,
            uint InVersion,
            [Switch("InVersion")] SAMPR_REVISION_INFO InRevisionInfo,
            out System.UInt32 OutVersion,
            [Switch("*OutVersion")] out SAMPR_REVISION_INFO OutRevisionInfo,
            out System.IntPtr ServerHandle)
        {
            const ushort opnum = 64;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pServerName = Marshal.StringToHGlobalUni(ServerName);
            SafeIntPtr pInRevisionInfo = TypeMarshal.ToIntPtr(InRevisionInfo, InVersion, null, null);

            paramList = new Int3264[] {
                pServerName,
                DesiredAccess,
                InVersion,
                pInRevisionInfo,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    OutVersion = TypeMarshal.ToStruct<uint>(outParamList[4]);
                    OutRevisionInfo = TypeMarshal.ToStruct<SAMPR_REVISION_INFO>(
                        outParamList[5], OutVersion, null, null);
                    ServerHandle = Marshal.ReadIntPtr(outParamList[6]);
                    retVal = outParamList[7].ToInt32();
                }
            }
            finally
            {
                pServerName.Dispose();
                pInRevisionInfo.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:84,代码来源:SamrRpcAdapter.cs


示例16: SamrUnicodeChangePasswordUser2

        /// <summary>
        ///  The SamrUnicodeChangePasswordUser2 method changes a
        ///  user account's password. Opnum: 55 
        /// </summary>
        /// <param name="BindingHandle">
        ///  An RPC binding handle parameter as specified in [C706-Ch2Intro].
        /// </param>
        /// <param name="ServerName">
        ///  A null-terminated string containing the NETBIOS name
        ///  of the server; this parameter MAY servers ignore the
        ///  ServerName parameter.  be ignored by the server.
        /// </param>
        /// <param name="UserName">
        ///  The name of the user. See the message processing later
        ///  in this section for details on how this value is used
        ///  as a database key to locate the account that is the
        ///  target of this password change operation.
        /// </param>
        /// <param name="NewPasswordEncryptedWithOldNt">
        ///  A clear text password encrypted according to the specification
        ///  of SAMPR_ENCRYPTED_USER_PASSWORD, where the key is
        ///  the NT hash of the existing password for the target
        ///  user (as presented by the client in the OldNtOwfPasswordEncryptedWithNewNt
        ///  parameter). 
        /// </param>
        /// <param name="OldNtOwfPasswordEncryptedWithNewNt">
        ///  The NT hash of the target user's existing password (as
        ///  presented by the client) encrypted according to the
        ///  specification of ENCRYPTED_LM_OWF_PASSWORD, where the
        ///  key is the NT hash of the clear text password obtained
        ///  from decrypting NewPasswordEncryptedWithOldNt.
        /// </param>
        /// <param name="LmPresent">
        ///  If this parameter is zero, NewPasswordEncryptedWithOldLm
        ///  and OldLmOwfPasswordEncryptedWithOldLm MUST be ignored;
        ///  otherwise these fields MUST be processed.
        /// </param>
        /// <param name="NewPasswordEncryptedWithOldLm">
        ///  A clear text password encrypted according to the specification
        ///  of SAMPR_ENCRYPTED_USER_PASSWORD, where the key is
        ///  the LM hash of the existing password for the target
        ///  user (as presented by the client).
        /// </param>
        /// <param name="OldLmOwfPasswordEncryptedWithNewNt">
        ///  The LM hash the target user's existing password (as
        ///  presented by the client) encrypted according to the
        ///  specification of ENCRYPTED_LM_OWF_PASSWORD, where the
        ///  key is the NT hash of the clear text password obtained
        ///  from decrypting NewPasswordEncryptedWithOldNt.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrUnicodeChangePasswordUser2(
            System.IntPtr BindingHandle,
            [Indirect()] _RPC_UNICODE_STRING ServerName,
            [Indirect()] _RPC_UNICODE_STRING UserName,
            [Indirect()] _SAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
            [Indirect()] _ENCRYPTED_LM_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
            byte LmPresent,
            [Indirect()] _SAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
            [Indirect()] _ENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewNt)
        {
            const ushort opnum = 55;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pServerName = TypeMarshal.ToIntPtr(ServerName);
            SafeIntPtr pUserName = TypeMarshal.ToIntPtr(UserName);
            SafeIntPtr pNewPasswordEncryptedWithOldNt = TypeMarshal.ToIntPtr(NewPasswordEncryptedWithOldNt);
            SafeIntPtr pOldNtOwfPasswordEncryptedWithNewNt = TypeMarshal.ToIntPtr(OldNtOwfPasswordEncryptedWithNewNt);
            SafeIntPtr pNewPasswordEncryptedWithOldLm = TypeMarshal.ToIntPtr(NewPasswordEncryptedWithOldLm);
            SafeIntPtr pOldLmOwfPasswordEncryptedWithNewNt = TypeMarshal.ToIntPtr(OldLmOwfPasswordEncryptedWithNewNt);

            paramList = new Int3264[] {
                pServerName,
                pUserName,
                pNewPasswordEncryptedWithOldNt,
                pOldNtOwfPasswordEncryptedWithNewNt,
                (uint)LmPresent,
                pNewPasswordEncryptedWithOldLm,
                pOldLmOwfPasswordEncryptedWithNewNt,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[7].ToInt32();
                }
            }
            finally
            {
                pServerName.Dispose();
                pUserName.Dispose();
                pNewPasswordEncryptedWithOldNt.Dispose();
                pOldNtOwfPasswordEncryptedWithNewNt.Dispose();
                pNewPasswordEncryptedWithOldLm.Dispose();
                pOldLmOwfPasswordEncryptedWithNewNt.Dispose();
//.........这里部分代码省略.........
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:101,代码来源:SamrRpcAdapter.cs


示例17: SamrCreateAliasInDomain

        /// <summary>
        ///  The SamrCreateAliasInDomain method creates an alias.
        ///  Opnum: 14 
        /// </summary>
        /// <param name="DomainHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  a domain object.
        /// </param>
        /// <param name="AccountName">
        ///  The value to use as the name of the alias. Details on
        ///  how this value maps to the data model are provided
        ///  later in this section.
        /// </param>
        /// <param name="DesiredAccess">
        ///  The access requested on the AliasHandle on output. See
        ///  section  for a listing of possible values.
        /// </param>
        /// <param name="AliasHandle">
        ///  An RPC context handle, as specified in section.
        /// </param>
        /// <param name="RelativeId">
        ///  The RID of the newly created alias.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrCreateAliasInDomain(
            IntPtr DomainHandle,
            _RPC_UNICODE_STRING AccountName,
            uint DesiredAccess,
            out IntPtr AliasHandle,
            out uint RelativeId)
        {
            const ushort opnum = 14;
            Int3264[] paramList;
            int retVal = 0;

            SafeIntPtr pAccountName = TypeMarshal.ToIntPtr(AccountName);

            paramList = new Int3264[] {
                DomainHandle,
                pAccountName,
                DesiredAccess,
                IntPtr.Zero,
                IntPtr.Zero,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    AliasHandle = Marshal.ReadIntPtr(outParamList[3]);
                    RelativeId = TypeMarshal.ToStruct<uint>(outParamList[4]);
                    retVal = outParamList[5].ToInt32();
                }
            }
            finally
            {
                pAccountName.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:64,代码来源:SamrRpcAdapter.cs


示例18: SamrAddMultipleMembersToAlias

        /// <summary>
        ///  The SamrAddMultipleMembersToAlias method adds multiple
        ///  members to an alias. Opnum: 52 
        /// </summary>
        /// <param name="AliasHandle">
        ///  An RPC context handle, as specified in section , representing
        ///  an alias object.
        /// </param>
        /// <param name="MembersBuffer">
        ///  A structure containing a list of SIDs to add as members
        ///  to the alias.
        /// </param>
        /// <returns>
        /// status of the function call, for example: 0 indicates STATUS_SUCCESS
        /// </returns>
        public int SamrAddMultipleMembersToAlias(IntPtr AliasHandle, _SAMPR_PSID_ARRAY? MembersBuffer)
        {
            const ushort opnum = 52;
            Int3264[] paramList;
            int retVal = 0;
            SafeIntPtr pMembersBuffer = TypeMarshal.ToIntPtr(MembersBuffer);

            paramList = new Int3264[] {
                AliasHandle,
                pMembersBuffer,
                IntPtr.Zero
            };

            try
            {
                using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum))
                {
                    retVal = outParamList[2].ToInt32();
                }
            }
            finally
            {
                pMembersBuffer.Dispose();
            }

            return retVal;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:42,代码来源:SamrRpcAdapter.cs


示例19: AddToShadowCopySet

        /// <summary>
        /// The AddToShadowCopySet method adds a share to an existing shadow copy set.
        /// </summary>
        /// <param name="ClientShadowCopyId">The GUID of the client. This MUST be set to NULL.</param>
        /// <param name="ShadowCopySetId">The GUID of the shadow copy set to which ShareName is to be added.</param>
        /// <param name="ShareName">The name of the share in UNC format for which a shadow copy is required.</param>
        /// <param name="pShadowCopyId">On output, the GUID of the shadow copy associated to the share.</param>
         

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Int32Image类代码示例发布时间:2022-05-24
下一篇:
C# Int32类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap