コード例 #1
0
        public CcmErrorCode GetSessionInfo(int sessionId, out CcmIcaSession sessionInfo)
        {
            var ptr = IntPtr.Zero;

            var result = Environment.Is64BitProcess ?
                         CcmSdk64.CCMGetSessionInfo(sessionId, ref ptr) :
                         CcmSdk32.CCMGetSessionInfo(sessionId, ref ptr);

            sessionInfo = Marshal.PtrToStructure <CcmIcaSession>(ptr);

            _ = Environment.Is64BitProcess ?
                CcmSdk64.CCMFreeICASession(1U, ptr) :
                CcmSdk32.CCMFreeICASession(1U, ptr);

            return((CcmErrorCode)result);
        }