Click to See Complete Forum and Search --> : What is Interface Definition Language?


bidesh
July 12th, 2007, 08:36 AM
Hi all,

Could you tell me what is interface definition language and how it is written.

i can write my own interface in a .h file to build a dll but i require to write an .idl file which will generate the .h file for me.

this is becoming a difficult task for me now. please provide me with sample code which help me understand better.

a .cpp where the interface is implemented and .idl which will generate the .h

please let me know if problem is not understood.

thanks

bidesh

ahoodin
July 12th, 2007, 09:11 AM
IDL describes a COM object's interfaces to the program that uses it.
It is a C Like language, but it is not really C or C++. It is a language that was probably built with YACC / BISON.

Here are tutorials, you could check out Anand's simple COM tutorials or any of the others that are there.

http://www.codeguru.com/cpp/com-tech/atl/tutorials/article.php/c17/

The IDL file is used as follows:

You use MIDL.exe, the commandline IDL compiler to generate headers and c source files to use the COM object in your code.
HTH,