【发布时间】:2012-04-06 10:33:13
【问题描述】:
我正在尝试为 .net 设置 freetype2,但我仍然不够幸运。所以我使用来自this question 的答案。目前,我尝试使用 Init_FreeType 函数时遇到一个异常,我试图将其写入受保护的内存。我使用的代码如下:
Intptr library = new Intptr();
FreeType.FT.Init_FreeType(library);
包装器中Init_FreeType函数的声明如下:
[DllImport(FT_DLL, EntryPoint = "FT_Init_FreeType"), SuppressUnmanagedCodeSecurity]
public static extern int Init_FreeType(IntPtr /*IntPtr LibraryRec_*/ alibrary);
有什么想法吗?
【问题讨论】: