PeterC_UK
asked on
Named Pipes
I use a named pipe server to communicate from a printer port monitor to the user. This works fine when the pipe server and client are on the same PC. When I try to use this across a network the following code
hPipe=CreateFile(lpPipeNam e,GENERIC_ READ|GENER IC_WRITE,0 ,NULL,
OPEN_EXISTING,0,NULL);
returns Error 5 'Access denied'
The same pipe server is running on all PCs. The only difference is the inclusion of the server name or IP address in the pipe name.
LPSTR lpPipeName="\\\\.\\pipe\\T estPipe" for the local machine is OK
LPSTR lpPipeName="\\\\192.168.1. 25\\pipe\\ TestPipe" fails (unless ip is ip of the local machine)
OSs are a mixture of Windows 7 and XP
Programming in C++
I guess it is a security problem but I can't find any useful info on this.
Peter
hPipe=CreateFile(lpPipeNam
OPEN_EXISTING,0,NULL);
returns Error 5 'Access denied'
The same pipe server is running on all PCs. The only difference is the inclusion of the server name or IP address in the pipe name.
LPSTR lpPipeName="\\\\.\\pipe\\T
LPSTR lpPipeName="\\\\192.168.1.
OSs are a mixture of Windows 7 and XP
Programming in C++
I guess it is a security problem but I can't find any useful info on this.
Peter
try disable UAC in the remote machine, see if it solves he problem.
Make sure a password isn't required to access the printer's host-computer's resources (such as the printer itself) unless you've included a function to automatically input any required network username/password combination ...
ASKER
Thanks but...
Same issue with XP so not UAC
Client PC (which is running named pipe server) can print to the network printer on the server. It is named pipe from server back to PC that receives Access Denied. The server can access resources on client PC without a problem.
Peter
Same issue with XP so not UAC
Client PC (which is running named pipe server) can print to the network printer on the server. It is named pipe from server back to PC that receives Access Denied. The server can access resources on client PC without a problem.
Peter
What version of OS is the server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Had somewhat similar thing happen with security problems, found if I just copied the executable into the \windows\system32 directory, it worked. Never looked into the specifics of why, but it did solve the problem.
ASKER
Hi diqitap
Currently testing on peer to peer - mix of windws 7 and XP
Peter
Currently testing on peer to peer - mix of windws 7 and XP
Peter
ASKER
Many thanks, All solved. This had been a nagging issue for some time and then became urgent