User creating windows 7 c++

Could anyone explain to how to create a new user with a c++ program in windows 7 or 8, and set privileges to the same. Or if you could point me in the right direction.
I know that I could just do a bunch or system() calls but I am more interested in doing it manually so to say.

Thank you for your time.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776901(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762271(v=vs.85).aspx

These are two pages that seem to be like what you are looking for. Don't know about the privileges bit (never done much of that), but following a few links around that site should help out a bit.
Topic archived. No new replies allowed.