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. ATL / WTL / STL
  4. ATL7 probs with enum in interface

ATL7 probs with enum in interface

Scheduled Pinned Locked Moved ATL / WTL / STL
help
2 Posts 2 Posters 1 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
    Rainer Mangold
    wrote on last edited by
    #1

    In ATL6 (VS6) creating an interface like this interface ICtrl1 : IDispatch { typedef enum {Diedel, Doedel, Doing} DUMMY; [id(1), helpstring("method Foo")] HRESULT Foo([in]DUMMY Dummy); }; in Foo.idl the file was properly compiled by MIDL. However doing the same in ATL7 in the controls headerfile __interface ICtrl1 : public IDispatch { typedef enum {Diedel, Doedel, Doing} DUMMY; [id(1), helpstring("method Foo")] HRESULT Foo([in] DUMMY Dummy); }; results in an error MIDL2025 : syntax error : expecting a type specification near "DUMMY". I have no idea what I am doing wrong here :confused::confused::confused: Rainer

    A 1 Reply Last reply
    0
    • R Rainer Mangold

      In ATL6 (VS6) creating an interface like this interface ICtrl1 : IDispatch { typedef enum {Diedel, Doedel, Doing} DUMMY; [id(1), helpstring("method Foo")] HRESULT Foo([in]DUMMY Dummy); }; in Foo.idl the file was properly compiled by MIDL. However doing the same in ATL7 in the controls headerfile __interface ICtrl1 : public IDispatch { typedef enum {Diedel, Doedel, Doing} DUMMY; [id(1), helpstring("method Foo")] HRESULT Foo([in] DUMMY Dummy); }; results in an error MIDL2025 : syntax error : expecting a type specification near "DUMMY". I have no idea what I am doing wrong here :confused::confused::confused: Rainer

      A Offline
      A Offline
      AlexO
      wrote on last edited by
      #2

      I am little bit rusty in IDL, but I do not think enum inside of interface is valid syntax (granted that VC6 compiled that). Compile in VC6, use OleView on the resulting tlb, my guess is that older MIDL just silently moved that typedef out of interface definition during compilation.

      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