10 Replies Latest reply on May 3, 2017 3:48 AM by darrenlawrence

    Problem using the XMLAPI

    darrenlawrence Rookie

      I have been working with the GM API for years. I have a my own VB6 COM version that wraps lots of the awkward stuff into an easier interface.


      I have been working on some new C#.NET version while converting some old projects for a client that I originally wrote in VB6 and I am now converting to C#


      There are 2 projects. 1 requires a username and password to login and is pretty much complete and works fine, however my second project is a little different


      The second application was always intended to be used with GoldMine open and logged in before it is launched and would use the DDE_LOGIN_CREDENTIALS to authenticate.


      The new GMXMLAPI still has this ability but I have been unable to make it work


      The API Guide states you can issue "GetLoginCredentials" to get the Auth ticket which works fine

      I call the GMXMLAPI with  xmlDoc.LoadXml(String.Format("<GMAPI call=\"{0}\" SessionID=\"x\"/>", sCommand));


      where sCommand is "GetLoginCredentials" - this returns the username follwed by some hex string kist like the old COM DDE call

      <GMAPI call="GetLoginCredentials"><status code="1">DARREN  01D2B239A3FAAC40EA3AF6FC4B449CD775F204019A29DAEB</status></GMAPI>


      Then a call to LoadAPI with this


      <GMAPI call="LoadAPI">

      <data name="User">*DDE_LOGIN_CREDENTIALS*</data>

      <data name="Password">DARREN  01D2B239E8ECAAB0C8C0362C5D21F8B146ADE83824515536</data>

      <data name="SysDir">CDATA[c:\apps\gm_trugoldcrm\]</data>

      <data name="GoldDir">aaa:</data>

      <data name="ComDir">aaa:</data>



      Fails with

      <GMAPI call="LoadAPI">

      <status code="1">The data engine loaded successfully, but GoldMine did not create a session ID. Please use the Login command to retrieve a session ID.</status>

      <inner_status code="-2">Failed to validate GoldMine user name and password.</inner_status></GMAPI>


      I tried many things but always the same result


      Anybody been able to get this to actually work?  if it cant then I will have to resort to asking for the password and storing it encrypted but this will also mean a INI per user when I never needed one before as it was all global apart from the logged in username


      This is against GM 2016