本文整理汇总了C#中Int3264类的典型用法代码示例。如果您正苦于以下问题:C# Int3264类的具体用法?C# Int3264怎么用?C# Int3264使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Int3264类属于命名空间,在下文中一共展示了Int3264类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}