NETAPI32.DLL错误帮助 [英] NETAPI32.DLL Error Help

查看:162
本文介绍了NETAPI32.DLL错误帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在很大程度上是一个基础设施人员。但是,我做了一些开发......主要是实用工具。多年前,我需要能够自动断开用户与网络连接共享的连接。经过一番研究,我找到了"openfiles.exe"。这个时间满足我的需求

I'm an infrastructure guy for the most part. However, I do some development... utilities mostly. Years ago I needed an ability to automate the disconnection of users from network connected shares. After some research, I found "openfiles.exe". At the time this fulfilled my needs.

最近,我遇到了SAN到SAN迁移的类似情况。然而,似乎随着网络和其他现代技术的速度,关闭与网络共享文件的开放连接是困难的。 Openfiles.exe不再符合我的
需求。所以,我回到了我的一些开发背景,并决定创建一个可执行文件来关闭用户"会话"。使用NETAPI32.dll(因此终止所有打开的文件连接)。我过去写过类似的实用工具而没有太多的b $ b困难。

Recently, I've run into this similar situation on a SAN to SAN migration. However, it appears that with the speed of networking and other modern technologies, closing open connections to network shared files is difficult. Openfiles.exe no longer meets my need. So, I reached back into some of my development background and decided to create an executable to close a users "session" using NETAPI32.dll (hence killing all open connections to files). I've written similar utilities in the past without too much difficulty.

我已经编写了这个实用程序的代码,我有一个小问题......虽然实用程序"完全符合预期",在新SAN上我只能使用NetShareEnum函数列出Shares。当我尝试使用NetFileEnum或NetSessionEnum枚举会话或文件
时,我收到234错误...此错误记录为"网络浏览器不可用"。我不知道这意味着什么,或者如何克服这个错误。我的可执行文件适用于
Microsoft Server的所有版本和版本,并且它适用于此客户环境中的CIFS服务器。但是,在有问题的新SAN上,我仅在列出会话和文件时收到此错误。

I've written the code for this utility and I am having one small issue... although the utility works "exactly as expected", on the new SAN I am only able to list SHARES using the NetShareEnum function. When I attempt to enumerate sessions or files using NetFileEnum, or NetSessionEnum I am receiving a 234 Error... This error is documented as "Network browsers not available". I have no clue what this means, or how to overcome this error. My executable works against all flavors and versions of Microsoft Server, and it works against the CIFS servers in this customers environment. However, on the one new SAN in question, I am receiving this 234 error ONLY when listing sessions and files.

如果我打开"计算机管理" MMC并连接到新的SAN,位于"系统工具\共享文件夹"下。我可以毫无问题地列出股票,会话和连接......任何人都可以提供一些指导吗?

If I open a "Computer Management" MMC and connect to the new SAN, under "System Tools \ Shared Folders" I can list the Shares, Sessions and Connections without a problem... Can anyone provide some guidance?

提前致谢,

Stew Basterash

Stew Basterash

ME

推荐答案

嗨Stewart_Bash,

Hi Stewart_Bash,

感谢您在此发帖。

对于您的问题,您如何得到错误234?这是系统错误吗?根据我的搜索,错误234与您的不同。

For your question, how do you get your error 234? Is it the system error? Based on my search, the error 234 is different like yours.

ERROR_MORE_DATA
234 (0xEA)
More data is available.

以下是有关系统错误代码的详细信息。

Here is the details about the system error codes.

https: //msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx

对于NetSessionEnum函数,只有成员管理员或服务器操作员本地组可以成功执行级别1或级别2的NetSessionEnum功能。您是否尝试过管理员权限?

For the NetSessionEnum function, only members of the Administrators or Server Operators local group can successfully execute the NetSessionEnum function at level 1 or level 2. Have you try the admin permission?

有关详细信息,请参阅该文档。

For more details, you could refer to the document.

https: //msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx

最诚挚的问候,

Wendy


这篇关于NETAPI32.DLL错误帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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