none
ActiveX Problem in VSTO 2010 Word 2007 Add-in RRS feed

  • Question

  • I have a new VSTO 2010 developed add-ins for Word 2007 and Word 2010. Both versions use
    Net Framework 4 and each use an ActiveX API from a 3rd party company, Digital River, to access an online web-store for product activation/deactivation. <o:p></o:p>

    Everything works fine with the Word 2010 version of my add-in, but the same calls to the
    embedded ActiveX APIs in the Word 2007 version cause Word to believe there is an infinite loop (call stack error) and Word shuts down.<o:p></o:p>

    If I execute the code in debug mode either line-by-line or inserting a break point on the "If" statement check that follows the API call, it runs fine. However, if I try to execute the code directly as an end user would, the problem occurs and Word shuts down. Below is one of the routines that have the issue in Word 2007 and execute perfectly in Word 2010.

        Sub Ck4Update()
            Try
                Dim esellerate As eWeb.eWebSDK
                Dim resultData As eWeb.eWebResultData
                Dim result As eWeb.eWebReturnValues
    
                esellerate = CreateObject("eWebSDK.365")
                resultData = CreateObject("eWebResultData.365")
                result = esellerate.eWeb_CheckForUpdate(ThisAddIn.STid, ThisAddIn.SKUid, ThisAddIn.PreviewId, ThisAddIn.LayoutId, "", "", "", ThisAddIn.ATid, "", resultData)
    
                If result = eWebControl.eWebReturnValues.E_INET_CONNECTION_FAILURE Or
                    result = eWebControl.eWebReturnValues.E_INET_DEVICE_CONNECTION_FAILURE Or
                    result = eWebControl.eWebReturnValues.E_INET_SILENT_CONNECTION_FAILURE Then
                    MsgBox(My.Resources.Error_NoInternetConnection, MsgBoxStyle.Critical, ThisAddIn.GCL)
                End If
                esellerate = Nothing
                resultData = Nothing
    
            Catch ex As Exception
                Err.Clear()
            End Try
        End Sub
    

    I have logged a support question with the Digital River folks because at one level it would appear to be a problem with their API. However, since the API runs fine when I am in debug mode, then it would appear that the problem might be a Word 2007 security issue with embedded ActiveX controls.

    Is there something unique with Word 2007 and how to install at runtime ActiveX controls that my add-in requires?


    <o:p></o:p>



    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, October 18, 2012 12:46 PM

Answers

  • I found the problem.

    Office 2007 took exception to the two ActiveX control libraries from Digital River being signed with our VeriSign Code Signing Certicate. The libraries are not signed and from our deployment software, InstallShield, we normally sign all dll and exe files in the package.

    Office 2010 does not have this same issue. And I have not seen this same problem with other 3rd party API libraries and Office 2007.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, October 18, 2012 8:52 PM

All replies

  • I found the problem.

    Office 2007 took exception to the two ActiveX control libraries from Digital River being signed with our VeriSign Code Signing Certicate. The libraries are not signed and from our deployment software, InstallShield, we normally sign all dll and exe files in the package.

    Office 2010 does not have this same issue. And I have not seen this same problem with other 3rd party API libraries and Office 2007.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, October 18, 2012 8:52 PM
  • Hi Rich,

    I’m glad to hear that you have solved it by yourself. Thanks for sharing your experience here, it really helpful for those community members who have similar problem.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, October 19, 2012 2:49 AM
    Moderator