【发布时间】:2011-03-18 22:03:04
【问题描述】:
我正在用 C# 转换一个 C++ 应用程序,并设法完成大部分工作。但是我坚持以下陈述:
#define GET_SHCALL_ID(L) (((L) >> 24) & 0x000000FF)
它被应用程序的另一部分调用,它接收到一个窗口消息并将lParam传递给这个调用,如下所示:
// We perform and event handling to display state as required here..
LRESULT CShockSampleDlg::OnShockCallEvent(WPARAM wParam, LPARAM lParam)
{
// Pass events here so that they will be displayed int the m_LogMessages window.
OnDebugCallEvents(wParam, lParam);
UINT callID = GET_SHCALL_ID(lParam);
UINT chanID = GET_SHCHAN_ID(lParam);
UINT info = GET_SHCHAN_INFO(lParam);
所以我的问题是:
- 宏/方法在做什么?
- C# 中的等价物是什么?
【问题讨论】: