문제

The code below is working superbly, but now I want to generalize it, as GetNamedPipeClientProcessID is only compatible with Windows Vista and above. What alternative options do I have that support windows XP?

bRet = GetNamedPipeClientProcessId(hIn, &ClientID);
if (FALSE == bRet)
{
        printf("\nGetNamedPipeClientProcessId FAILED\n");
    CloseHandle(Overlapped.hEvent);
    CloseHandle(hIn);
    return 1;
}
도움이 되었습니까?

해결책

If you handle the protocol, when the connection is established send a packet with the process id and read it in the other endpoint.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top