WNetAddConnect3成功后

WNetAddConnect3成功后

本文介绍了WNetAddConnect3成功后,OpenSCManager访问被拒绝.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试与远程计算机上的服务控制管理建立连接.
开始时,我将WNetAddConnect3函数与远程计算机的管理员帐户一起使用,并且成功.
之后,我使用OpenSCManager,但是它的错误代码为5:访问被拒绝".
代码:OpenSCManager(_T("192.168.7.154",NULL,SC_MANAGER_ALL_ACCESS);
[192.168.7.154:这是远程计算机的IP]
我在某些目标计算机上遇到了此错误,但是在另一台计算机上却没有.
我不知道为什么会发生此错误. :(
有人可以帮我解决问题吗?!
非常感谢.

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.

推荐答案



这篇关于WNetAddConnect3成功后,OpenSCManager访问被拒绝.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-20 19:46