I am trying to use NetShareAdd to create shared folders. The function call succeeds and the shared folder is seen on the remote computer. However, when trying to open a file or a sub-folder, you get "Access Denied". Note that when you share the folder manually, everything works fine.
CODE
SHARE_INFO_2 shareInfo;
DWORD parm_err = 0;
NET_API_STATUS res;
// Fill out rhw SHARE_INFO_2 structure
BOOL res = NetShareAdd(NULL,2,(LPBYTE)&shareInfo, &parm_err);