ERROR: ‘GetNamedPipeClientProcessId’ was not declared but Winbase is included

I'm using Windows 10 (1709) with cygwin. Here is my code:

#include <windows.h>
#include <stdio.h>  
#include <Winbase.h>

int main()
{

    HANDLE hPipe;
    char buffer[1024];
    DWORD dwRead;
    PULONG ClientProcessId = NULL;


    hPipe = CreateNamedPipe(TEXT("\\\\.\\pipe\\Pipe"),
                            PIPE_ACCESS_DUPLEX,
                            PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
                            1,
                            1024 * 16,
                            1024 * 16,
                            NMPWAIT_USE_DEFAULT_WAIT,
                            NULL);
    while (hPipe != INVALID_HANDLE_VALUE)
    {
        if (ConnectNamedPipe(hPipe, NULL) != FALSE)
        {
             if (GetNamedPipeClientProcessId(hPipe, ClientProcessId) != 0)
             {
                  printf("ID -> %lu\n", ClientProcessId);
                  fflush(stdout);
             }
        }
    }
}

This is a little test program which just creates a server pipe and starts to listen to it, and when someone gets connected it just prints pipe client processes ID.

The problem I'm having is

error: ‘GetNamedPipeClientProcessId’ was not declared in this scope
          if (GetNamedPipeClientProcessId(hPipe, ClientProcessId) == 0)

Since I got Winbase.h included it was really strange, I opened Winbase.h and found declaration of this function:

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

WINBASEAPI
BOOL
WINAPI
GetNamedPipeClientProcessId(
    _In_ HANDLE Pipe,
    _Out_ PULONG ClientProcessId
    );

After quick google search I've found that WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) is just to determine what platform you have and what API's are suitable for your platform ( winapifamily.h). Seems like it function should be available on desktop platforms.

I've got little confused here. What else could be the problem? thanks.