What is the purpose of the following: UNREFERENCED_PARAMETER?

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)

UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);

What is the purpose here of UNREFERENCED_PARAMETER?

+5
source share
1 answer

It simply suppresses the compiler warning that two parameters are not used in the function.

The macro itself is probably just defined as

#define UNREFERENCED_PARAMETER(x) (x)

therefore, he refers to his argument, but does nothing with it.

+5
source

All Articles