如何将MFC代码转换为c#应用程序 [英] How to convert MFC code to c# application
本文介绍了如何将MFC代码转换为c#应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
以下是MFC中我需要转换的代码c#
Hi all
Below is the code in MFC which i have to convert in c#
DWORD WINAPI PrtStatus()
{
CriticalSection cs;
DBGPRINTF(5, ("PrtStatus()\n"));
DWORD dwRet = Status();
return dwRet;
}
请帮助我
Please help me in this
推荐答案
在你的班级中声明这个对象
Declare this object in your class
private object lockObject = new object();
ushort PrtStatus()
{
// Locks the section and releases upon scope exit.
lock (lockObject)
{
Debug.WriteLine("PrtStatus()", 5);
return Status();
}
}
这篇关于如何将MFC代码转换为c#应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文