Hi Mark,

I noticed one thing while using ConnectNamedPipe() function.

I am checking the return type something like this


CreateNamedPipe.....

While...
       hr  = ConnectName....

       if(hr !=0 and hr!=win32pipe.ERROR_PIPE_CONNECTED):
            raise MyOwnException

      DoSomeStuff

Ideally it should return 535 for ERROR_PIPE_CONNECTED. But sometimes it 
returns 234 which is ERROR_MORE_DATA.

When I read like 1024 byte of data from the Pipe I dont have any problem, 
since my data is always lesser than 200 Bytes.

If I read only 10 bytes (BTW I am using pipe in Message Mode) First time it 
is working fine But when the client connects next time it returns me 234.

The documentation says it will return the underlying HRESULT. I guess it is 
returning GetLastError() API result. I tested with Setting my own error 
codes and then ConnectnamedPipe returns Those:)

Is it a defect??? or how can i get around my problem. Probably use 
SetlastError before Calling ConnectNamedPipe.


--Hari

_________________________________________________________________
One and only Ash. Find out all about her. Only on MSN Search 
http://server1.msn.co.in/profile/aishwarya.asp

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to