I'm converting a C++ application in C# and managing to work my way through most of it. However I'm stuck with the following statement:
#define GET_SHCALL_ID(L) (((L) >> 24) & 0x000000FF)
It's called by another part of the application that receives a Window Message and is passing in the lParam to this call, as shown below:
// 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);
So my questions are:
- What is the macro/method doing?
- What would be the equivalent in C#?