Codesite (Express) doesn’t work when called from a 64-bit application.

Home Forums CodeSite Codesite (Express) doesn’t work when called from a 64-bit application.

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #1776
      Steven Camilleri
      Participant

        I’m trying to log from a COM DLL to the Live Viewer. Whilst everything works fine when the COM object is a 32-bit dll, it doesn’t work from 64-bit. The call to CodeSite.Send is executed, but the logger is not registered with the dispatcher. This is the log when I am using 32 bit (just hid machine and app name) :

        Reg Register Logger D95EAFF3: [ XXX-XXX MyAppName (24428) ] — “Viewer” 27/04/2020 17:09:26.089
        Unreg Unregister Logger D95EAFF3: [ XXX-XXX MyAppName (24428) ] — “Viewer” 27/04/2020 17:10:24.181

         

        I do not get this when trying from 64-bit. Am I missing something?

      • #1778
        Steven Camilleri
        Participant

          As an aside a 64-bit vcl application has no problem.

        • #1788
          Ray Konopka
          Keymaster

            Hi Steven,

            I apologize for the delay. I’ve been looking over old posts and emails to see if anything like this has been reported before. I vaguely recall something similar to what you are reporting, but was unable to locate anything concrete. I’ll keep looking.

            In the meantime, what I suspect is happening is that when your 64-bit COM Dll is trying to send a CodeSite message (using the TCodeSiteLogger) to the Dispatcher, the default transport mechanism is getting blocked because by Windows. The default transport method between loggers and Dispatcher is WM_COPYDATA. Over the years, Microsoft keeps reducing the situations in which this message is allowed. For example, a service app runs in a different window station from the user’s desktop and WM_COPYDATA messages are not allowed to transport across window stations. I believe the same thing is happening between the 64-bit COM Dll and the 32-bit Dispatcher. There is no problem between 64-bit app and 32-bit Dispatcher.

            I believe the solution to the 64-bit COM DLL situation is the same as logging from a service. That is, the transport method the loggers use needs to be changed to TCP. This is accomplished by calling the ConnectUsingTcp method before sending your first CodeSite message. We recommend calling ConnectUsingTcp on the CodeSiteManager, so that all CodeSite loggers will use the same connection method.

            Ray

          • #1777
            David Hoyle
            Participant

              I have this with my Excel COM-Addins. The below might help you (i.e. you need to use TCP/IP).

              https://www.davidghoyle.co.uk/WordPress/?p=2237

               

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.