Hi,
I'm using the file MostOfDavesClasses.cs. When I trying using the function aaApi_OpenDocument I get this error in my console:
Unable to find an entry point named 'aaApi_OpenDocument' in DLL 'dmscli.dll'
I tried building in both 32 and 64 bit and I get the same error.
Other functions such as aaApi_CheckOutDocument, aaApi_CheckOutDocument, and aaApi_CopyOutDocument are working with no issues.
Anyone have a solution for this?
Thanks,
Dave
What "version" of MostOfDavesClasses.cs" are you using? (FWIW, the source isn't marked by a "version", so it is hard to determine if the source is "up-to-date" or not).
The "version" of MostOfDavesClasses.cs" for my "SampleLogin" up on Github is an older "version" of MostOfDavesClasses.cs and it does NOT contain a DllImport for that function.
If you add it yourself, then it should work.
Here's what you need to add:
[DllImport("dmawin.dll", CharSet = CharSet.Unicode)] public static extern bool aaApi_OpenDocument(int lProjectNo, int lDocumentId, bool bReadOnly);
Or, download the latest available version from https://github.com/DaveBrumbaugh/MostOfDavesClasses-CSharp-Wrappers-For-ProjectWise as it has it on line 2331 of MostOfDavesClasses.cs.
Answer Verified By: David Casilllas
Dan,
I must have had an old version from the LoginSample. Downloading the latest version worked.
Thank you.