CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    33

    How to automatically create .odl file

    I am starting a new thread because I guess my question is changing. I have an existing project. It does not have a .odl file created. Once I have a .ODL file, I can run mktyplib.exe on it to create a .tlb which is the end result I want. How do I tell the IDE (VC6) to create a .ODL file?

    thanx

  2. #2
    Join Date
    Apr 1999
    Posts
    3,585
    The fact you want to create an .odl file implies you have some sort of interface you'd like to expose. Just what exactly are you trying to do? If you've used the VC++ project wizards to create your project, you should have the necessary files. I don't believe you can "tell" the IDE to create a new .odl file.
    Gort...Klaatu, Barada Nikto!

  3. #3
    Further to Mike's comment, you cannot 'automatically' generate odl file, if you didnt' start with wizard.
    But, of course, it's possible to define one manually.
    For that ;

    1. You need to have a unique GUID/CLSID.
    2. You need to know the structure(syntax) of odl file.

    To achieve 1.
    Use GUIDGEN.exe and generate a unique id.

    To achieve 2.
    Create a simple atl COM project; odl will be automatically generated.

    Once the above are done, replace the CLSIDs of the generated odl file with the one you got from guidgen.

    Finally redefine the interfaces names.

    Add the odl file to your project.

    From the 'file view', right click on the odl file and select settings and specify the output files.

    Hope this helps,
    -satheeshnl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured