How to get value of lProjectIds and plDocumentIds in aaApi_DocumentSelectDlg with C#

lProjectIds and plDocumentIds give values of 0 and -734941776.

I've declared them as Integers but the documentation states LPLONG and array of project IDs.

Not sure if I need to Marshal the result.

Parents Reply Children
  • Kevin, I know that you are aware of MostOfDavesClasses.cs, but I wanted to add a note for others who find this thread in the future.

    You can download MostOfDavesClasses from here: https://github.com/DaveBrumbaugh/MostOfDavesClasses-CSharp-Wrappers-For-ProjectWise 

    His classes do not wrap all the functionality found in the ProjectWise SDK, but pretty much everything his group has used over the last few years for various projects.  Plus, Dave has added classes and associated methods to make things a bit easier to use, such as retrieving all users and placing them into a DataTable, or being able to update the document attributes for a document by passing a hash table, etc.

    And of course, you can review his code for examples of how he has marshaled some of the more common datatypes that the ProjectWise APIs use.  Please keep in mind that sometimes it is just easier to do something in native (unmanaged) code, and then wrap that so that you can call a simple method from your .NET application.

    Also, please keep in mind that support for MostOfDavesClasses is the same as for his PWPS_DAB module.  Here's the disclaimer from a PWPS_DAB posting:

    VERY IMPORTANT NOTE: This PowerShell Module is not covered under your SELECT Agreement and is not supported via your contractual support channels. Support is only available from the community of users via the BE Communities site (see below).

    You can also find some coding samples that use MostOfDavesClasses here:  https://github.com/DanWilliamsAtBentleyDotCom