コード例 #1
0
        void AcquireData(byte[] buffer, CalcDataHeader header)
        {
            int requiredSize = (int)header.DataCount * sizeof(float);

            if (pinnedHeader == IntPtr.Zero || dataSize < requiredSize)
            {
                ReleaseData();
                pinnedData = Marshal.AllocHGlobal(requiredSize);
                dataSize   = requiredSize;
            }

            Marshal.Copy(buffer, 64, pinnedData, requiredSize);
        }
コード例 #2
0
 bool CalcValidateHeader(CalcDataHeader header)
 {
     return(header.Token1 == 0x88FF && header.Token2 == 0x99FF);
 }