// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
NET_API_STATUS res=0;
SHARE_INFO_2 inf;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
NET_API_STATUS res;
SHARE_INFO_2 p;
DWORD parm_err = 0;
LPWSTR domain = (LPWSTR)"DOMEN";
p.shi2_netname = (LPWSTR)TEXT("TESTSHARE");
p.shi2_type = STYPE_DISKTREE; // disk drive
p.shi2_remark = (LPWSTR)TEXT("TESTSHARE to test NetShareAdd");
p.shi2_permissions = 0;
p.shi2_max_uses = 4;
p.shi2_current_uses = 0;
p.shi2_path = (LPWSTR)TEXT("D:\\audio");
p.shi2_passwd = NULL; // no password