+1  A: 
Alex Farber
@Patrick ,Updated the Code as per the Suggestions . Still Facing the same Issue.
Subhen
@Alex Farber, The Function Returns True and Unable to get Last Error as the System keeps on waiting in Transact Named Pipe function
Subhen
I was under the impression that the reverse was true: If an object is created without FILE_FLAG_OVERLAPPED then passing an overlapped structure results in undefined behaviour. However, in the reverse case - an FILE_FLAG_OVERLAPPED handle can be used for both synchronous and asynchronous operation.
Chris Becke
If you create file without FILE_FLAG_OVERLAPPED flag, all I/O operations are synchronous and LPOVERLAPPED parameter should be NULL (if it is not NULL, it is possibly ignored). If file is created with FILE_FLAG_OVERLAPPED flag, all I/O operations are asynchronous and LPOVERLAPPED parameter must point to OVERLAPPED structure. This behavior is defined when file is created, and cannot be changed later.
Alex Farber
+1  A: 

For starters

m_OverLaped.hEvent=hPipe;

Is wrong, hEvent needs to be set to the event you've created, not the pipe. Before you do the read you need to call:

WaitForSingleObject( oOverlap.hEvent, 

and then:

GetOverlappedResult()

Have you got the pipe working in non-overlapped mode?

Patrick