I have the following setup.

machine #1: windows2003 sp1, edirectory 8.7.3
machine #2: windows2003 sp1, groupwise 6.5 sp3
machine #3: windows2003 sp1 -- code is run here.

All are part of the same AD, same ip subnet.

What I'm trying to do is to connect w/ the groupwise administrative API to
the groupwise domain on machine #2.

The program is as running as a service as local system.

The first thing the program does is a NDS login and then it tries to run
System->Connect(..). This is all done via C++.

Here is the problem. If I do it as above, I get an error: 80020009,
exception occurred. I was thinking that this might have to do w/ who I
was logged in as. So I did an impersonate user call. Same error. On a
whim, I tried mapping a drive to the groupwise machine programatically
using wnetaddconnection2...when I do that, everything magically starts
working. If I map a connection, but no drive letter, it doesn't work.

My question is, why is this happening? Is there a better approach than
mapping a drive to the groupwise machine? I think this article might have
some relevance:




Defect #343123: The Admin API won't release drive mappings. The way
that mappings are suppose to work is illustrated by the following

The Admin API shared code with administration snapin code. When this
code opens a domain database it will use the UNC path to open the
database. If a drive is already mapped then it should not be creating
a new mapping. The one exception to this would be when a third party
has used an IP address to map a drive, when the snpain code cannot
the match with the UNC path and it will create a new mapping.

It appears that the Admin API doesn't work like this. It appears that
even if a drive is already mapped, the Admin API does not use it and
maps another drive, even if it is duplicated. This behavior does not
match how the snapins work. The snapins should reuse a mapping if it
already exists and it contains the server and volume name. It looks
the Admin API is creating a new mapping everytime reagardless of
connections. Defect submitted to GroupWise Development.

NOTE: If the connect doesn't work, check to make sure you are passing
in the full and correct path. You must have sufficient administrative


The Admin API has a memory leak with the System.Users method. Fixed in
GW 6.5, Dec. 2002.

David Moore
Courion Corporation
dmoore AT courion DOT com