首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

VC程序,取消共享文件夹解决办法

2012-04-01 
VC程序,取消共享文件夹怎样用VC做个一个程序,取消已共享的文件夹啊。就是自己共享的文件夹,现在使它不共享,

VC程序,取消共享文件夹
怎样用VC做个一个程序,取消已共享的文件夹啊。就是自己共享的文件夹,现在使它不共享,怎样用程序控制啦。麻烦各位大小指点,尽量能给出一个实例。谢谢啦。

[解决办法]
NetShareAdd Shares a resource on a server. 
NetShareCheck Queries whether a server is sharing a device. 
NetShareDel Deletes a share name from a server's list of shared resources. 
NetShareEnum Retrieves share information about each shared resource on a server. 
NetShareGetInfo Retrieves information about a specified shared resource on a server. 
NetShareSetInfo Sets a shared resource's parameters. 

[解决办法]

C/C++ code
#define UNICODE#include <windows.h>#include <stdio.h>#include <lm.h>void wmain( int argc, TCHAR *argv[ ]){   NET_API_STATUS res;   if(argc<3)      printf("Usage: NetShareDel server share\n");   else   {      //      // Call the NetShareDel function to delete the share.      //      res=NetShareDel(argv[1], argv[2], 0);      //      // Display the result of the call.      //      if(res==0)         printf("Share Removed.\n");      else         printf("Error: %u\n", res);   }   return;}
[解决办法]
探讨

这是MSND上面的,我看过,就是不是很明白
用的时候,没效果,可以举一个,自己做的程序实例么

[解决办法]
把这个下载下来看看吧
http://www.pudn.com/downloads90/sourcecode/windows/system/detail345331.html
[解决办法]
探讨

大哥,还是不行哦,你说的权限是只哪个方面的,怎样设置

热点排行