本文整理汇总了C#中SharpCifs.Dcerpc.Ndr.NdrBuffer.Dec_ndr_small方法的典型用法代码示例。如果您正苦于以下问题:C# NdrBuffer.Dec_ndr_small方法的具体用法?C# NdrBuffer.Dec_ndr_small怎么用?C# NdrBuffer.Dec_ndr_small使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpCifs.Dcerpc.Ndr.NdrBuffer
的用法示例。
在下文中一共展示了NdrBuffer.Dec_ndr_small方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
TimeLow = src.Dec_ndr_long();
TimeMid = (short)src.Dec_ndr_short();
TimeHiAndVersion = (short)src.Dec_ndr_short();
ClockSeqHiAndReserved = unchecked((byte)src.Dec_ndr_small());
ClockSeqLow = unchecked((byte)src.Dec_ndr_small());
int nodes = 6;
int nodei = src.Index;
src.Advance(1 * nodes);
if (Node == null)
{
if (nodes < 0 || nodes > unchecked(0xFFFF))
{
throw new NdrException(NdrException.InvalidConformance);
}
Node = new byte[nodes];
}
src = src.Derive(nodei);
for (int i = 0; i < nodes; i++)
{
Node[i] = unchecked((byte)src.Dec_ndr_small());
}
}
示例2: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
Length = src.Dec_ndr_long();
ImpersonationLevel = (short)src.Dec_ndr_short();
ContextMode = unchecked((byte)src.Dec_ndr_small());
EffectiveOnly = unchecked((byte)src.Dec_ndr_small());
}
示例3: Decode_header
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
internal virtual void Decode_header(NdrBuffer buf)
{
if (buf.Dec_ndr_small() != 5 || buf.Dec_ndr_small() != 0)
{
throw new NdrException("DCERPC version not supported");
}
Ptype = buf.Dec_ndr_small();
Flags = buf.Dec_ndr_small();
if (buf.Dec_ndr_long() != unchecked(0x00000010))
{
throw new NdrException("Data representation not supported");
}
Length = buf.Dec_ndr_short();
if (buf.Dec_ndr_short() != 0)
{
throw new NdrException("DCERPC authentication not supported");
}
CallId = buf.Dec_ndr_long();
}
示例4: Decode_out
public override void Decode_out(NdrBuffer _src) {
int _services = _src.Dec_ndr_long();
int _servicei = _src.Index;
_src.Advance(1 * _services);
if (service == null) {
if (_services < 0 || _services > 0xFFFF) throw new NdrException( NdrException.InvalidConformance );
service = new byte[_services];
}
_src = _src.Derive(_servicei);
for (int _i = 0; _i < _services; _i++) {
service[_i] = (byte)_src.Dec_ndr_small();
}
bytes_needed = (int)_src.Dec_ndr_long();
services_returned = (int)_src.Dec_ndr_long();
resume_handle = (int)_src.Dec_ndr_long();
retval = (int)_src.Dec_ndr_long();
}
示例5: Decode
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode(NdrBuffer src)
{
src.Align(4);
int netnamep = src.Dec_ndr_long();
Type = src.Dec_ndr_long();
int remarkp = src.Dec_ndr_long();
Permissions = src.Dec_ndr_long();
MaxUses = src.Dec_ndr_long();
CurrentUses = src.Dec_ndr_long();
int pathp = src.Dec_ndr_long();
int passwordp = src.Dec_ndr_long();
SdSize = src.Dec_ndr_long();
int securityDescriptorp = src.Dec_ndr_long();
if (netnamep != 0)
{
src = src.Deferred;
Netname = src.Dec_ndr_string();
}
if (remarkp != 0)
{
src = src.Deferred;
Remark = src.Dec_ndr_string();
}
if (pathp != 0)
{
src = src.Deferred;
Path = src.Dec_ndr_string();
}
if (passwordp != 0)
{
src = src.Deferred;
Password = src.Dec_ndr_string();
}
if (securityDescriptorp != 0)
{
src = src.Deferred;
int securityDescriptors = src.Dec_ndr_long();
int securityDescriptori = src.Index;
src.Advance(1 * securityDescriptors);
if (SecurityDescriptor == null)
{
if (securityDescriptors < 0 || securityDescriptors > unchecked(0xFFFF))
{
throw new NdrException(NdrException.InvalidConformance);
}
SecurityDescriptor = new byte[securityDescriptors];
}
src = src.Derive(securityDescriptori);
for (int i = 0; i < securityDescriptors; i++)
{
SecurityDescriptor[i] = unchecked((byte)src.Dec_ndr_small());
}
}
}
示例6: Decode_out
/// <exception cref="SharpCifs.Dcerpc.Ndr.NdrException"></exception>
public override void Decode_out(NdrBuffer src)
{
src.Dec_ndr_short();
src.Dec_ndr_short();
src.Dec_ndr_long();
int n = src.Dec_ndr_short();
src.Advance(n);
src.Align(4);
src.Dec_ndr_small();
src.Align(4);
Result = src.Dec_ndr_short();
src.Dec_ndr_short();
src.Advance(20);
}