Click here to Skip to main content
15,891,597 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I try to establish a connection to the service control manage on the remote computer.
At the beginning, I used function WNetAddConnect3 with administrator account of the remote computer and it success.
After that, I use OpenSCManager but it errors with error code 5 : "Access Denied".
Code: OpenSCManager(_T("192.168.7.154", NULL, SC_MANAGER_ALL_ACCESS);
[192.168.7.154 : This is ip of remote computer]
I met this error with some target computer, but another not.
I don't known why this error happen. :(
Can somebody help me to fix the problem ?!
Thank a lot.
Posted

Hi,

U need to give admin privilege for that.

Thanks
 
Share this answer
 
Thank you Satheesh. But the account that I use with WNetAddConnect3 is Administrator Account.
I have thought this problem.
Maybe I must fix something on remote computer, aren't you? But I don't know how to do. :|
Can you show me?!
Thank you so much.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900