Page 1 of 1

ProFormAPI Classic 15 SP 3.3 unable to load

Posted: Tue Jul 26, 2016 6:51 pm
by danvanf
Hello,

Today I'm updating a tool from using the Classic 15 SP1 API to the Classic 15 SP 3.3 ProFormAPI.Dll and associated files. I'm generating an exception "Unable to load DLL 'ProFormAPI.dll': The activation context being deactivated is not active for the current thread of execution. (Exception from HRESULT: 0x80073705)"

I replaced ProFormAPI.dll, softpro.dll, SoftProRichEdit.dll and spcrystal.dll with ones dated 6/13/2016, time a bit after 5 PM, ProFormAPI.dll file version is 15.0.30415.120. Previous file version was .55 rather than .120.

The DLL's match what is in the %ProgramFiles(x86)%\SoftPro\Enterprise\Client folder. The app is using the Classic API rather than the Com+. I've done a bit of research on the issue without luck. For the record, Mfc42.dll is present. The DLL's are loaded from the application directory and they do not exist in SysWow64. I'm sure they exist elsewhere, unlikely in the %Path%.

The call is

Code: Select all

ret1 = SPOpenFile(FileNumb, "default")

that was changed on 6-18-2015 from

Code: Select all

ret1 = SPOpenFile("default", FileNumb)
which also gave the same error, and is how the docs have it.

SPOpenFile in VB.Net is defined as:

Code: Select all

  Private Declare Function SPOpenFile Lib "ProFormAPI.dll" (ByVal strUsrID As String,  ByVal strFileID As String) As Short
I've also tried

Code: Select all

   <DllImport("ProFormAPI.DLL", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>  Private Function SPOpenFile(<MarshalAs(UnmanagedType.VBByRefStr)> ByRef strUserID As String, <MarshalAs(UnmanagedType.VBByRefStr)> ByRef strFileID As String) As Short
    End Function
I'm at a loss and a bind as it was updated on Friday and 2 corrupt files were reported today which overlaid with an attempt to access &General past it's end and failed to overlay at least some CD tab information.

Thanks for the assist!
-Dan

Re: ProFormAPI Classic 15 SP 3.3 unable to load

Posted: Tue Sep 27, 2016 5:42 pm
by Stephen Martin
A change was made to the ProFormAPI so that it can detect what flavor of ProForm (Enterprise or Standard) is being used. To support this change, the libraries ClassicLicensingBridge.dll, SoftProClassic.Licensing.Client.dll and SoftPro.Licensing.Client.dll will also need to be added to the ProFormAPI.dll path. These libraries can be found in the SOftPro\Enterprise\Client folder.