本文整理汇总了C#中Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Cifs.CifsServerPerConnection.GenerateSID方法的典型用法代码示例。如果您正苦于以下问题:C# CifsServerPerConnection.GenerateSID方法的具体用法?C# CifsServerPerConnection.GenerateSID怎么用?C# CifsServerPerConnection.GenerateSID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Cifs.CifsServerPerConnection
的用法示例。
在下文中一共展示了CifsServerPerConnection.GenerateSID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTrans2FindFirst2FinalResponse
public SmbTrans2FindFirst2FinalResponsePacket CreateTrans2FindFirst2FinalResponse(
CifsServerPerConnection connection,
SmbTrans2FindFirst2RequestPacket request,
ushort endOfSearch,
Array findInformationLevel)
{
if (findInformationLevel != null &&
!CheckInformationLevel(request.Trans2Parameters.InformationLevel, findInformationLevel))
{
throw new InvalidCastException("The findInformationLevel must correspond with "
+ request.Trans2Parameters.InformationLevel);
}
SmbTrans2FindFirst2FinalResponsePacket response = new SmbTrans2FindFirst2FinalResponsePacket();
response.SmbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);
TRANS2_FIND_FIRST2_Response_Trans2_Parameters trans2Parameters = response.Trans2Parameters;
trans2Parameters.SID = (ushort)connection.GenerateSID();
trans2Parameters.SearchCount = (ushort)(findInformationLevel != null ? findInformationLevel.Length : 0);
trans2Parameters.EndOfSearch = endOfSearch;
response.Trans2Parameters = trans2Parameters;
TRANS2_FIND_FIRST2_Response_Trans2_Data trans2Data = response.Trans2Data;
trans2Data.Data = findInformationLevel;
response.Trans2Data = trans2Data;
response.UpdateCountAndOffset();
return response;
}