在c ++项目中,我创建了一个gdi + pen.c ++代码示例:
long GetPen()
{
Pen *pen = new Pen(Color.Red);
return (long)pen;
}
在c#项目中,我想用c ++ project.c创建gdi + pen##code example:
[DllImport("xxxx.dll")]
public static extern IntPtr GetPen();
public void test()
{
Intptr penptr = GetPen();
//i want to convert the penptr to C# pen,is there any way?
}