Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Automation: VARIANT gets lost

Automation: VARIANT gets lost

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiosysadmintesting
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rupel
    wrote on last edited by
    #1

    are there any known issues with dispatching VARIANTs from one app to another in VS.NET? when dispatching BSTRs and the like, everything goes fine. i tried some older applications (compiled under VS6) on my computer and they do work properly (using VARIANT as a paramter through automation). i built the very easiest example of one server-app exporting one function VARIANT Test(VARIANT var); and one client using this function through automation. when debugging the client, the server gets properly loaded and the mfc-dispatchwrappers all do their job well (at the and of F11-ing the client the VARIANT-argument is ok as i constructed it). but when i debug the server, the VARIANT-argument getting in there is crap. moreover: it is different for each debugging-session. as the proper functions get called, i assume, there's everything ok with registring the component and that stuff. is there anything known about this issue? any hints and ideas are greatly appreciated... :| thx. :wq

    R 1 Reply Last reply
    0
    • R Rupel

      are there any known issues with dispatching VARIANTs from one app to another in VS.NET? when dispatching BSTRs and the like, everything goes fine. i tried some older applications (compiled under VS6) on my computer and they do work properly (using VARIANT as a paramter through automation). i built the very easiest example of one server-app exporting one function VARIANT Test(VARIANT var); and one client using this function through automation. when debugging the client, the server gets properly loaded and the mfc-dispatchwrappers all do their job well (at the and of F11-ing the client the VARIANT-argument is ok as i constructed it). but when i debug the server, the VARIANT-argument getting in there is crap. moreover: it is different for each debugging-session. as the proper functions get called, i assume, there's everything ok with registring the component and that stuff. is there anything known about this issue? any hints and ideas are greatly appreciated... :| thx. :wq

      R Offline
      R Offline
      Rupel
      wrote on last edited by
      #2

      it even doesn't work, when i compile the server as a dll. in that case, everything is running in the same process and i can debug each and every step. just before the server-function is called, there are some fancy stack-creation and inline-assembler thingies in the code. when the function is called then, there's crap on the stack! ah. just found one more: even the return address seems to be corrupt. when i return from the server-function into the mfc-wrapper-code i end up higher than i started! :omg: the result is: the server-function is entered again and afterwards that inline-assembler-code wants to derefence a NULL-pointer. bang! :laugh: maybe there's an error in the VC++.NET implementation of that code? or maybe i have some wrong settings in my project? weird! :~ :wq

      R 1 Reply Last reply
      0
      • R Rupel

        it even doesn't work, when i compile the server as a dll. in that case, everything is running in the same process and i can debug each and every step. just before the server-function is called, there are some fancy stack-creation and inline-assembler thingies in the code. when the function is called then, there's crap on the stack! ah. just found one more: even the return address seems to be corrupt. when i return from the server-function into the mfc-wrapper-code i end up higher than i started! :omg: the result is: the server-function is entered again and afterwards that inline-assembler-code wants to derefence a NULL-pointer. bang! :laugh: maybe there's an error in the VC++.NET implementation of that code? or maybe i have some wrong settings in my project? weird! :~ :wq

        R Offline
        R Offline
        Rupel
        wrote on last edited by
        #3

        ok. i cross-checked that thing with VS6 and the following turns out: the VS6-client crashes when using the VS.NET server the VS.NET-client crashes when using the VS.NET server the VS6-client works correctly with the VS6 server the VS.NET-client works correctly with the VS6 server so i believe there is a bug in the VS.NET automation-server MFC-implementation when using a VARIANT-parameter. and now? how can i report this. :confused: or maybe i made a mistake somewhere, but i don't know where... :~ :wq

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups