WNetAddConnect3成功后,OpenSCManager访问被拒绝. [英] OpenSCManager access denied after WNetAddConnect3 success.

查看:116
本文介绍了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.

推荐答案



您需要为此授予管理员权限.

谢谢
Hi,

U need to give admin privilege for that.

Thanks


谢谢Satheesh.但是我与WNetAddConnect3一起使用的帐户是管理员帐户.
我已经想到了这个问题.
也许我必须在远程计算机上修复某些东西,不是吗?但是我不知道该怎么办. :|
能给我看看么?!
非常感谢.
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.


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆