http://www.carlosag.net/Tools/CodeTr...r/default.aspx
....should give you a good headstart:
public P3ADMINLib.P3User AddPop3User(string MachineName, string UserName, string DomainName, string
Password) {
// get a configuration object.
P3ADMINLib.P3Config P3 = new P3ADMINLib.P3Config();
// get the object from a VB Script/JScript
// Set P3 = CreateObject("P3Admin.P3Config")
// Connect To the remote computer.
if ((MachineName.Length > 0)) {
P3.MachineName = MachineName;
}
P3ADMINLib.P3Domain Domain;
P3ADMINLib.P3User User;
// get the domain object
// TODO: On Error Resume Next Warning!!!: The statement is not translatable
Domain = P3.Domains.Item[DomainName];
if ((Err == 2147942403)) {
// The domain is registered In SMTP but Not In POP3
}
else if ((Err == 2147943755)) {
// the domain does Not exist. Create it.
// TODO: On Error Resume Next Warning!!!: The statement is not translatable
P3.Domains.Add;
DomainName;
if ((Err != 0)) {
// On Error GoTo 0
Err.Raise;
Err;
("Domain "
+ (DomainName + " cannot be added."));
}
}
// add a user account
Domain.Users.AddEx;
UserName;
Password;
if ((Err == 134246480)) {
// ERROR_FILE_EXISTS
// the user account already exists.
// do some action In this Case.
}
// get the created user account
User = Domain.Users.Item[UserName];
return User;
}
Juan T. Llibre, asp.net MVP
aspnetfaq.com :
http://www.aspnetfaq.com/
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================
"Brady Love" <op******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I have been looking at that but I am having a hard time converting it
to c# (never worked with visual basic before) Is there anyone that can
help me out there?