What is the usage difference between the GetDesktopWindow and OpenInputDesktop APIs in Windows?
They return completely different values, so they are not interchangeable. You can tell just by looking at their function signatures in the documentation:
GetDesktopWindow returns an HWND, which is a handle to a window:
HWND WINAPI GetDesktopWindow(void);
while OpenInputDesktop returns an HDESK, which is a handle to a desktop:
HDESK WINAPI OpenInputDesktop(
__in DWORD dwFlags,
__in BOOL fInherit,
__in ACCESS_MASK dwDesiredAccess
);
Therefore, which one you use would obviously depend on which type of value you needed. All of the Desktop functions require parameters of type HDESK. All window manipulation functions are going to require handles to a window (HWND).
All of that said, I would be remiss if I didn't caution you against abusing the desktop window, as returned by the GetDesktopWindow function. The desktop window is very special.