Пример #1
0
        public virtual int CreateFontFileReference(
            ref ushort filePath,
            ref _FILETIME lastWriteTime,
            out IDWriteFontFile fontFile
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_CreateFontFileReferenceFunc == null)
            {
                m_CreateFontFileReferenceFunc = (CreateFontFileReferenceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateFontFileReferenceFunc));
            }
            fontFile = new IDWriteFontFile();
            return(m_CreateFontFileReferenceFunc(m_ptr, ref filePath, ref lastWriteTime, out fontFile.PtrForNew));
        }
Пример #2
0
        public virtual int GetLastWriteTimeFromKey(
            IntPtr fontFileReferenceKey,
            uint fontFileReferenceKeySize,
            out _FILETIME lastWriteTime
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_GetLastWriteTimeFromKeyFunc == null)
            {
                m_GetLastWriteTimeFromKeyFunc = (GetLastWriteTimeFromKeyFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetLastWriteTimeFromKeyFunc));
            }

            return(m_GetLastWriteTimeFromKeyFunc(m_ptr, fontFileReferenceKey, fontFileReferenceKeySize, out lastWriteTime));
        }
Пример #3
0
        public virtual int SetElementTimes(
            ref ushort pwcsName,
            ref _FILETIME pctime,
            ref _FILETIME patime,
            ref _FILETIME pmtime
            )
        {
            var fp = GetFunctionPointer(14);

            if (m_SetElementTimesFunc == null)
            {
                m_SetElementTimesFunc = (SetElementTimesFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetElementTimesFunc));
            }

            return(m_SetElementTimesFunc(m_ptr, ref pwcsName, ref pctime, ref patime, ref pmtime));
        }