当前位置: 首页>>代码示例>>C#>>正文


C# Int3264.ToInt64方法代码示例

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


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

示例1: NdrMarshalRoutines

        private void NdrMarshalRoutines(
            Int3264 arg,
            int typeFormatStringOffset,
            RpceFormatCharType formatChar)
        {
            switch ((RpceFormatCharType)((int)formatChar & FORMAT_CHAR_ROUTINE_BITMASK))
            {
                case RpceFormatCharType.FC_ZERO:
                    throw new InvalidOperationException("Bad format char: FC_ZERO.");

                case RpceFormatCharType.FC_BYTE:
                case RpceFormatCharType.FC_CHAR:
                case RpceFormatCharType.FC_SMALL:
                case RpceFormatCharType.FC_USMALL:
                    unchecked { NdrByteMarshal((byte)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_WCHAR:
                case RpceFormatCharType.FC_SHORT:
                case RpceFormatCharType.FC_USHORT:
                    unchecked { NdrInt16Marshal((short)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_LONG:
                case RpceFormatCharType.FC_ULONG:
                case RpceFormatCharType.FC_FLOAT:
                    unchecked { NdrInt32Marshal((int)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_HYPER:
                case RpceFormatCharType.FC_DOUBLE:
                    unchecked { NdrInt64Marshal((long)arg.ToInt64()); }
                    break;

                case RpceFormatCharType.FC_ENUM16:
                    unchecked { NdrInt16Marshal((short)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_ENUM32:
                    unchecked { NdrInt32Marshal((int)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_ERROR_STATUS_T:
                    unchecked { NdrInt32Marshal((int)arg.ToInt32()); }
                    break;

                case RpceFormatCharType.FC_RP:
                case RpceFormatCharType.FC_UP:
                case RpceFormatCharType.FC_OP:
                case RpceFormatCharType.FC_FP:
                    NdrPointerMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_STRUCT:
                case RpceFormatCharType.FC_PSTRUCT:
                    NdrSimpleStructMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_CSTRUCT:
                case RpceFormatCharType.FC_CPSTRUCT:
                    NdrConformantStructMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_CVSTRUCT:
                    NdrConformantVaryingStructMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_BOGUS_STRUCT:
                case (RpceFormatCharType)((int)
                RpceFormatCharType.FC_FORCED_BOGUS_STRUCT & FORMAT_CHAR_ROUTINE_BITMASK):
                    NdrComplexStructMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_CARRAY:
                    NdrConformantArrayMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_CVARRAY:
                    NdrConformantVaryingArrayMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_SMFARRAY:
                case RpceFormatCharType.FC_LGFARRAY:
                    NdrFixedArrayMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_SMVARRAY:
                case RpceFormatCharType.FC_LGVARRAY:
                    NdrVaryingArrayMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_BOGUS_ARRAY:
                    NdrComplexArrayMarshall(arg, typeFormatStringOffset);
                    break;

                case RpceFormatCharType.FC_C_CSTRING:
                case RpceFormatCharType.FC_C_BSTRING:
                case RpceFormatCharType.FC_C_SSTRING:
                case RpceFormatCharType.FC_C_WSTRING:
                    NdrConformantStringMarshall(arg, typeFormatStringOffset);
//.........这里部分代码省略.........
开发者ID:gitter-badger,项目名称:WindowsProtocolTestSuites,代码行数:101,代码来源:RpceStubEncoder.cs


注:本文中的Int3264.ToInt64方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。