#include<iostream>
using namespace std;
#include<conio.h>
#include <windows.h>
#include <lm.h>
#include <lmdfs.h>
#include <stdio.h>
#pragma comment(lib, "NetApi32.lib")
void main()
{
DWORD res=0;
LPWSTR ServerName=L"\\\\WINSRV2003_32";
LPWSTR RootShare=L"\\fshare";
res =NetDfsAddStdRoot(ServerName,RootShare,NULL,0);
if(res==NERR_Success)
{
cout<<"Function succeeds"<<endl;
}
else
{
cout<<" Not Function succeeds"<<endl;
}
getch();
}