コード例 #1
0
ファイル: CascApi.cs プロジェクト: zach-cloud/stormlibsharp
        public long CascGetFileSize(CascStorageFileSafeHandle hFile)
        {
            uint high;

            uint low    = CascGetFileSizeBase(hFile, out high);
            long result = (high << 32) | low;

            return(result);
        }
コード例 #2
0
        internal CascFileStream(CascStorageFileSafeHandle handle, CascApi api)
        {
            Debug.Assert(handle != null);
            Debug.Assert(!handle.IsInvalid);
            Debug.Assert(api != null);

            _api    = api;
            _handle = handle;
        }
コード例 #3
0
ファイル: CascApi.cs プロジェクト: zach-cloud/stormlibsharp
        public long CascSetFilePointer(CascStorageFileSafeHandle hFile, long filePos, SeekOrigin moveMethod)
        {
            uint low, high;

            unchecked
            {
                low  = (uint)(filePos & 0xffffffff);
                high = (uint)(((ulong)filePos & 0xffffffff00000000) >> 32);
            }

            low = CascSetFilePointerBase(hFile, low, ref high, moveMethod);

            long result = (high << 32) | low;

            return(result);
        }