I am new to C# and I am having problems getting some snippets of code to build. I am using VS2010 and am trying to use GetDeviceCaps or CreateGraphics to get the DPI of my monitor. This is the GetDeviceCaps code that I have.

HDC screen = GetDC(NULL);
double hDPI = GetDeviceCaps(screen,LOGPIXELSX);
double vDPI = GetDeviceCaps(screen,LOGPIXELSY);
ReleaseDC(NULL, screen);

Do I need to add a resource or library or something else so the compiler recognizes SetProcessDPIAware, GetDC, HDC, GetDeviceCaps, and ReleaseDC?