コード例 #1
0
 internal MQSOCKACT(int convId, int requestId, int type, int parm1, int parm2)
 {
     base.TrConstructor("%Z% %W%  %I% %E% %U%", new object[] { convId, requestId, type, parm1, parm2 });
     this.sockatFlow = new structMQSockat();
     this.sockatFlow.conversationId = convId;
     this.sockatFlow.requestId      = requestId;
     this.sockatFlow.type           = type;
     this.sockatFlow.parm1          = parm1;
     this.sockatFlow.parm2          = parm2;
 }
コード例 #2
0
        internal int ReadStruct(byte[] b, int Offset)
        {
            uint method = 630;

            this.TrEntry(method, new object[] { b, Offset });
            IntPtr zero   = IntPtr.Zero;
            int    length = this.GetLength();
            int    result = 0;

            try
            {
                zero = Marshal.AllocCoTaskMem(length);
                Marshal.Copy(b, Offset, zero, length);
                this.sockatFlow = (structMQSockat)Marshal.PtrToStructure(zero, typeof(structMQSockat));
                Marshal.FreeCoTaskMem(zero);
                result = Offset + length;
            }
            finally
            {
                base.TrExit(method, result);
            }
            return(result);
        }