Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / February 2007

Tip: Looking for answers? Try searching our database.

NetGroupAdd ERROR_ACCESS_DENIED problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
su haiqing - 27 Feb 2007 14:54 GMT
Hi All,

I am trying to use NetGroupAdd() to create a group on my computer, but it
always return  ERROR_ACCESS_DENIED. Do you guys know how to resolve the
problem? (Windows Xp sp3)

///code here
_GROUP_INFO_0 groupInfo;
DWORD param_err;
NET_API_STATUS sResult;

ZeroMemory(&groupInfo, sizeof(groupInfo));

groupInfo.grpi0_name = L"testGroup";

USES_CONVERSION;
sResult = NetGroupAdd(NULL, 0, (LPBYTE)&groupInfo, &param_err);

/// end code

Thanks
Su
Ben Voigt - 27 Feb 2007 15:16 GMT
> Hi All,
>
> I am trying to use NetGroupAdd() to create a group on my computer, but it
> always return  ERROR_ACCESS_DENIED. Do you guys know how to resolve the
> problem? (Windows Xp sp3)

Perhaps you need NetLocalGroupAdd, because you're running on a workstation,
not a domain controller?

> ///code here
> _GROUP_INFO_0 groupInfo;
[quoted text clipped - 12 lines]
> Thanks
> Su
Willy Denoyette [MVP] - 27 Feb 2007 22:21 GMT
> Hi All,
>
[quoted text clipped - 17 lines]
> Thanks
> Su

Do you run with administrative privileges?

Willy.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.