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 7978865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:36:31+00:00 2026-06-04T09:36:31+00:00

i’m learning about COM through an internet tutorial(http://www.codeguru.com/cpp/com-tech/activex/tutorials/article.php/c5567/Step-by-Step-COM-Tutorial.htm). The first thing is creating a

  • 0

i’m learning about COM through an internet tutorial(http://www.codeguru.com/cpp/com-tech/activex/tutorials/article.php/c5567/Step-by-Step-COM-Tutorial.htm). The first thing is creating a IDL file and compile it to create another 5 files. The detail is after:

  1. Open VS2010
  2. Create Win32 DLL project name AddObj
  3. Add IAdd.idl file with the content

    import “unknwn.idl”;

    [
    object,
    uuid(1221db62-f3d8-11d4-825d-00104b3646c0),
    helpstring(“interface IAdd is used for implementing a super-fast addition Algorithm”)
    ]

    interface IAdd : IUnknown
    {
    HRESULT SetFirstNumber(long nX1);

    HRESULT SetSecondNumber(long nX2);
    HRESULT DoTheAddition([out,retval] long *pBuffer);
    };

    [
    uuid(3ff1aab8-f3d8-11d4-825d-00104b3646c0),
    helpstring(“Interfaces for Code Guru algorithm implementations .”)
    ]
    library CodeGuruMathLib
    {
    importlib(“stdole32.tlb”);
    importlib(“stdole2.tlb”);

    interface IAdd;
    }

After that, follow the tutorial, if i compile IAdd.idl file, it will generate:

–IAdd.h Contains the C++ style interface declarations.

–dlldata.c Contains code for proxy DLL. Useful when invoking the object on a different process/computer.

–IAdd.tlb Binary file , with a well defined format that completely describes our interface IAdd along with all it’s methods. This file is to be distributed to all the clients of our COM component.

–IAdd_p.c Contains marshalling code for proxy DLL. Useful while invoking the object on a different process/computer.

–IAdd_i.c Contains the interface IIDs

but when i compile IAdd by right click it and choose compile in shortcut menu, there is no file being generate. But when open view class, i can see IAdd interface with some method.

I also try it by compile it manually by download midl.exe from internet and run in command line but it failed.

I fine a lot of material by google and all said that i can compile idl file by visual studio but i try many time, on my both computer but no file being generate after i compile idl file. I also install new Win7, new visual studio 2010 ultimate but nothing change.

  • 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-06-04T09:36:32+00:00Added an answer on June 4, 2026 at 9:36 am

    I just created a new project and created a new idl file with the code you specified.If i right click and choose compile it works just fine (VS2010 Ultimate).
    Did you choose the correct filetype in the fileproperties of VS?
    It should be “IDL File”.

    Have you used the VS Command Prompt as you tried to compile it manually?
    (The VS Command Prompt will set all necessary environment variables)

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.