Listing 2: IDL (Interface Definition Language) file for COM object

// The IDL file for the IDIBToGif interface used in the DIBToGif
// coclass.
// Just one method here to keep the demo simple.

// 1.name of DIB file
// 2.name of GIF file to output
// 3.VB true/false if the GIF is to be 
//     interlacedinterface IDIBToGif : IDispatch
// 4.palette index of background color (usually 1){
// 5.palette index of the transparent color, or -1 if none
        
[id(1), helpstring("method OptimiseAndSaveAsGif")] 
        HRESULT OptimiseAndSaveAsGif(
                [in]BSTR dibfile,//1.                   
                [in] BSTR outgiffile,//2.               
                [in]VARIANT_BOOL interlace,//3. 
                [in]int backgroundIndex,//4.    
                [in]int transparentIndex);//5.  
};
//End of File