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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. How to use structure in Method?

How to use structure in Method?

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helptutorialquestion
7 Posts 6 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.
  • A Offline
    A Offline
    Amar Sutar
    wrote on last edited by
    #1

    Hi All I am writing a component using ATL. One of the method from the component accept a pointer to a structure. This structure definition is in other header file. [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file. When I am trying to compile the project it gives me error in IDL file as .\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE" .\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation Thanks in Advance.:) Amar -- modified at 9:25 Thursday 11th May, 2006

    L H T S 4 Replies Last reply
    0
    • A Amar Sutar

      Hi All I am writing a component using ATL. One of the method from the component accept a pointer to a structure. This structure definition is in other header file. [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file. When I am trying to compile the project it gives me error in IDL file as .\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE" .\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation Thanks in Advance.:) Amar -- modified at 9:25 Thursday 11th May, 2006

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #2

      I think you need to add header file in the component so that idl can understand what is AM_MEDIA_TYPE Knock out 'T' from CAN'T , You 'CAN' if you think you 'CAN' :cool: -- modified at 1:03 Friday 12th May, 2006

      1 Reply Last reply
      0
      • A Amar Sutar

        Hi All I am writing a component using ATL. One of the method from the component accept a pointer to a structure. This structure definition is in other header file. [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file. When I am trying to compile the project it gives me error in IDL file as .\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE" .\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation Thanks in Advance.:) Amar -- modified at 9:25 Thursday 11th May, 2006

        H Offline
        H Offline
        heboy
        wrote on last edited by
        #3

        hello ,how can I ask question in here? I just can't find a place to post my question .Which button allows me to write? I have use WTL from a short time ago. I didn't know MFC very well. so , about the macro of message ,they are so hard for me ! I wonder all the message function protype(and how many they are). ok , MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*, NOTIFY_HANDER, and so on ,is they are different? Give me a detail describe. Thank you! I like my job.

        T T 2 Replies Last reply
        0
        • H heboy

          hello ,how can I ask question in here? I just can't find a place to post my question .Which button allows me to write? I have use WTL from a short time ago. I didn't know MFC very well. so , about the macro of message ,they are so hard for me ! I wonder all the message function protype(and how many they are). ok , MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*, NOTIFY_HANDER, and so on ,is they are different? Give me a detail describe. Thank you! I like my job.

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          look in the heading banner of the forum (on the left), there is a "new message" button...


          TOXCCT >>> GEII power

          [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

          1 Reply Last reply
          0
          • H heboy

            hello ,how can I ask question in here? I just can't find a place to post my question .Which button allows me to write? I have use WTL from a short time ago. I didn't know MFC very well. so , about the macro of message ,they are so hard for me ! I wonder all the message function protype(and how many they are). ok , MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*, NOTIFY_HANDER, and so on ,is they are different? Give me a detail describe. Thank you! I like my job.

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            heboy wrote:

            MESSAGE_HANDLER ,COMMAND_HANDLER, and which like ON_BN_CLICK, MSG_WM_*,

            by Usage they are same, but technically they are different@

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta VC Forum Q&A :- I/ IV

            1 Reply Last reply
            0
            • A Amar Sutar

              Hi All I am writing a component using ATL. One of the method from the component accept a pointer to a structure. This structure definition is in other header file. [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file. When I am trying to compile the project it gives me error in IDL file as .\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE" .\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation Thanks in Advance.:) Amar -- modified at 9:25 Thursday 11th May, 2006

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              Amar Sutar wrote:

              [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file.

              it better you copy that structure in your IDL file!

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta VC Forum Q&A :- I/ IV

              1 Reply Last reply
              0
              • A Amar Sutar

                Hi All I am writing a component using ATL. One of the method from the component accept a pointer to a structure. This structure definition is in other header file. [id(3), helpstring("method get_StreamMediaType")] HRESULT get_StreamMediaType([in,out] AM_MEDIA_TYPE* pVal); AM_MEDIA_TYPE present in 'strmif.h' file. When I am trying to compile the project it gives me error in IDL file as .\DSMediaInfoServices.idl(24) : error MIDL2025 : syntax error : expecting a type specification near "AM_MEDIA_TYPE" .\DSMediaInfoServices.idl(24) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation Thanks in Advance.:) Amar -- modified at 9:25 Thursday 11th May, 2006

                S Offline
                S Offline
                Stone Free
                wrote on last edited by
                #7

                There is also a strmif.idl file, which includes axcore.idl which defines that structure AM_MEDIA_TYPE, so I would import "strmif.idl";to get hold of the definiton

                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