trouble with aaApi_Login(), and how do I find the correct DLL for declaring a function?

I'm learning how to use the ProjectWise API through VBA, and I'm trying to build a basic Hello World program.  So far, I have:

Public Declare Function aaApi_Initialize Lib "DMSCLI.dll" (ByVal ulModule As Long) As Long
Public Declare Function aaApi_GetCurrentUserId Lib "DMSCLI.dll" () As Long
Public Declare Function aaApi_Login Lib "DMSCLI.dll" (ByVal lDsType As Long, lpctstrDSource As String, ByVal lpctstrUser As String, ByVal lpctstrPassword As String, ByVal lpctstrSchema As String) As Boolean

Sub LogIn()

Dim result1 As Boolean
Dim result2 As Boolean
Dim result3 As Long


'Initialize the API
result1 = aaApi_Initialize(AAMODULE_ALL)
'Login to PW using single sign-on
result2 = aaApi_Login(AAAPIDB_UNKNOWN, "XYZABC.my.site.com:PWOPPID_ABC", vbNullString, vbNullString, vbNullString)
'Get ID for current user
result3 = aaApi_GetCurrentUserId()

End Sub

The aaApi_Login() call is returning false, and I don't know why. I want to use aaApi_GetLastErrorID() to inspect the problem, but I don't know which DLL to use for declaring it.

Short of running a dumpbin on every DLL in the ProjectWise\Bin folder and searching through each dump, is there an easier way to find out which DLL should be used to declare a given function? Is this information available somewhere in the SDK that I've overlooked?

Parents Reply Children