16,548
社区成员




#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <stdio.h>
#include <lm.h>
#pragma comment(lib, "Netapi32.lib")
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;
}