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. MIDL2039 warning

MIDL2039 warning

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 2 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.
  • S Offline
    S Offline
    skuu
    wrote on last edited by
    #1

    hi, I am getting an MIDL2039 warning when you compile an .idl file . Can anyone plz help me? Thanx in advance, skuu

    R 1 Reply Last reply
    0
    • S skuu

      hi, I am getting an MIDL2039 warning when you compile an .idl file . Can anyone plz help me? Thanx in advance, skuu

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      I guess you've added the oleautomation keyword to an interface definition. The MIDL compiler is complaining about the interface not being compliant with oleautomation, e.g you've used variables that cannot be represented with a VARIANT. Or in other words from MSDN: "MIDL2039 : interface is not automation marshaling conformant, requires Windows NT 4.0 SP4 or greater The interface does not meet the requirements for an OLE Automation interface. Check to make sure the interface is derived from IUnknown or IDispatch." Hope this helps -- Roger


      It's supposed to be hard, otherwise anybody could do it!

      S 1 Reply Last reply
      0
      • R Roger Stoltz

        I guess you've added the oleautomation keyword to an interface definition. The MIDL compiler is complaining about the interface not being compliant with oleautomation, e.g you've used variables that cannot be represented with a VARIANT. Or in other words from MSDN: "MIDL2039 : interface is not automation marshaling conformant, requires Windows NT 4.0 SP4 or greater The interface does not meet the requirements for an OLE Automation interface. Check to make sure the interface is derived from IUnknown or IDispatch." Hope this helps -- Roger


        It's supposed to be hard, otherwise anybody could do it!

        S Offline
        S Offline
        skuu
        wrote on last edited by
        #3

        thank u roger. I like to know whether it is possible to disable this warning. rgds, skuu

        R 1 Reply Last reply
        0
        • S skuu

          thank u roger. I like to know whether it is possible to disable this warning. rgds, skuu

          R Offline
          R Offline
          Roger Stoltz
          wrote on last edited by
          #4

          By settings the 'oleautomation' option for an interface you ask the MIDL compiler for help making sure that the interface is compliant with the automation standard. Asking for the compilers help and then tell it to shut up doesn't make any sense. Remove the 'oleautomation' keyword from the interface definition instead. Hope this helps -- Roger


          It's supposed to be hard, otherwise anybody could do it!

          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