This is my first use of the Groupwise API's so I am probably missing
something obvious.

I am trying to create a new DL. I can connect to the domain database
and read entries without problem, but when I try and create a DL with
the following code.

<excuse the state of the code>
procedure TForm1.Button3Click(Sender: TObject);
PS: IADPostOffices;
P: DIADPostOffice;
DS: Variant;
D: DIADDomain;
sPO: string;
sDom: string;
DLS: IADDistributionLists;
sName: string;
sDN: string;
DL: DIADDistributionList;
nRes: HResult;
PS:= FAdmin.PostOffices as IADPostOffices;
nRes:= PS.ItemByObjectID(FPOID, P);
D:= FAdmin.Domains.ItemByObjectID(*FDOMID);
P:= FAdmin.PostOffices.ItemByObjec*tID(FPOID);
if D <> nil then begin
DLS:= P.DistributionLists as IADDistributionLists;
sName:= Edit1.Text;
sDN:= Edit1.Text + '.SERVICES.CITY.SW';
sDom:= 'dom1.SERVICES.CITY.SW';
nRes:= DLS.Add(sName, sDN, sPO, sDom, DL); <<<=== problems

The result of this call (nRes) is -2147352567 ($80020009).

I have tried late binding with the same result.

Can anyone point me in the right direction.