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. can't use FILETIME while writting idl file .

can't use FILETIME while writting idl file .

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 Posts 3 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.
  • V Offline
    V Offline
    vijay_k
    wrote on last edited by
    #1

    I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:

    1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
    1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
    1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
    1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

    If i am not including windows.h , compiler giving me the error:

    1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
    1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

    can anyone tell me how can i resolve this error ? Thanks Vijay_k

    M S 2 Replies Last reply
    0
    • V vijay_k

      I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:

      1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
      1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
      1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
      1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

      If i am not including windows.h , compiler giving me the error:

      1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
      1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

      can anyone tell me how can i resolve this error ? Thanks Vijay_k

      M Offline
      M Offline
      Marcelo Emmerich
      wrote on last edited by
      #2

      Hi Vijay_k, it's hard to answer this without looking at your code, but is sounds like you are missing a #pragma once or #ifdef... Marcelo

      -- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com

      1 Reply Last reply
      0
      • V vijay_k

        I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:

        1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
        1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
        1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
        1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

        If i am not including windows.h , compiler giving me the error:

        1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
        1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

        can anyone tell me how can i resolve this error ? Thanks Vijay_k

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        I'm not surprised - header files can't always be #include'd into IDL files. You could try...

        1. Copy & paste the definition of FILETIME into your IDL file.
        2. FILETIME is really just a 64-bit integer (but defined using a struct because Microsoft C didn't used to have 64 bit integers. IIRC). So, just use an IDL 64 bit integer - I think that's called a hyper? You could then convert to and from FILETIME when calling the functions defined in your IDL.
        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