I've had some issues dealing with the ADMIN API and threads and I solved my
problems by keeping the GW API in the main thread. My Problem now is I run a
Service that nees to run and I am getting the following message...

Unable to cast COM object of type 'AdminTypeLibrary.SystemClass' to
interface type 'AdminTypeLibrary.DIADSystem'. This operation failed because
the QueryInterface call on the COM component for the interface with IID
'{35FC2357-811A-11D0-8A96-00805FC16077}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002

Code Snippet:

Dim oNovell As Object = New clsNovellAPINET
Dim oTempNovell As Object = New clsNovellAPINET
Dim strGroupwiseFileID As String
Dim oGWSystem As New AdminTypeLibrary.System
Dim oGWUsers As AdminTypeLibrary.IADUsers
Dim oGWUser3 As AdminTypeLibrary.IADUser3
Dim strGWPO, strGWDomain As String
Dim MyReturn As Boolean = False
Dim StriptedUserName As String
Dim StriptedPO As String
Dim StriptedDomain As String
oNovell.FullName = "[ROOT]"
oNovell.HighConfidenceMode = True
oNovell.BoundObject = UserName
strGroupwiseFileID = oNovell.GetFieldValue("NGW: File Id")
If [String].IsNullOrEmpty(Trim(strGroupwiseFileID)) = False Then
strGWPO = oNovell.GetFieldValue("NGW: Post Office").ToString
oTempNovell.FullName = "[ROOT]"
oTempNovell.HighConfidenceMode = True
oTempNovell.BoundObject = strGWPO
strGWDomain = oTempNovell.GetFieldValue("NGW:

*** oGWSystem.ConnectByDN(strGWDomain) 'ERRORS HERE

oGWUsers = oGWSystem.Users

I have narrowed this down to be a threading issues. Services that use timers
to kick off sections of codes (Or in this Case a Class Library) still run
under the Thread of the Timer. Not the main code (The service) does anyone
know how to get around this perticular issue???????

Michael Baker