Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 984277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:59:23+00:00 2026-05-16T04:59:23+00:00

I have been having a prolonged encounter with the beast known as COM Interop…

  • 0

I have been having a prolonged encounter with the beast known as COM Interop…

I am currently trying to generate a .tlb from a .idl file generated by the OLE/COM Object Viewer. However when trying to run Midl.exe to compile it I get an error:

.\Sim.API.IDL(236) : error MIDL2025 : syntax error : expecting a type s
pecification near "ImportFileStatus"

My .idl file is more that 1000 lines long so I don’t particularly want to post it here however, I believe the Part of interest is:

typedef [uuid(980B172E-19C1-389A-BB74-29A54737C5B4), version(1.0)    ,
  custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "Sim.API.ImportFileResult")    
 ]
 struct tagImportFileResult {

  ImportFileStatus _status;

  LPSTR _message;
 } ImportFileResult;

Then Several lines later…

 typedef [uuid(A4B9A0FF-A2D4-3EC5-AB7E-69311B9122C8), version(1.0)    ,
  custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "Sim.API.ImportFileStatus")    
 ]
 enum {
  ImportFileStatus_Success = 0,
  ImportFileStatus_VersionMismatch = 1,
  ImportFileStatus_Failure = 2
 } ImportFileStatus;

I have a Feeling that these should be revered in order to fix the Type specification error. However if I do this I get a new problem.

midl\oleaut32.dll : warning MIDL2368 : error generating type library, ignored :
Could not set UUID : tagImportFileResult (0x800288C6)

I am pretty unfamiliar with the idl format and with the use of midl.exe, perhaps there is something blatantly wrong with what I am doing?

As always any help would be greatly appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:59:24+00:00Added an answer on May 16, 2026 at 4:59 am

    You are correct, swapping the declarations is required to keep MIDL happy. OleView.exe indeed won’t generate declarations in the original order. I think it groups them by kind, the way the type lib is organized.

    The message you are getting is just a warning, not an error. It is caused by having an alias for the structure name that’s different. You can safely ignore it because code won’t use the “tagImportFileResult” identifier. But you can get rid of it by making the tag name the same as the typedef name:

    typedef [..] 
       struct ImportFileResult {
       //...
    } ImportFileResult;
    

    Here’s a KB article on the subject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having some problems trying to get my PHP running. When I
I have been trying to tackle this problem , but I am having difficulty
I have been having some issues with LINQ-To-SQL around memory usage. I'm using it
This is a really weird problem that I have been having. When I download
I have to compute at libraries quite often these days, and have been having
I have been creating Unit tests like crazy and find that I'm often having
I having trouble in dividing the HTML frames. I have been using the following
Have been looking at the MVC storefront and see that IQueryable is returned from
Have been studying the file system related classes of Adobe AIR 1.5, but so
We have been using CruiseControl for quite a while with NUnit and NAnt. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.