Share via


단일 IDL 파일에서 프록시 DLL 및 형식 라이브러리 생성

단일 IDL 파일을 사용하여 코드를 마샬링하기 위한 프록시 스텁 및 헤더 파일과 형식 라이브러리를 모두 생성할 수 있습니다. 이 예제와 같이 라이브러리 블록 외부의 인터페이스를 정의한 다음 라이브러리 블록 내에서 해당 인터페이스를 참조하여 이 작업을 수행합니다.

//file: AllKnown.idl

[
    object, uuid(. . .), <other interface attributes>
]
interface IKnown : IUnknown 
{
    import "unknwn.idl";
    <declarations, etc. for IKnown interface go here>
};

[
    <library attributes>
]
library KnownLibrary 
{

    //reference interface IKnown:
    interface IKnown;

    //or create a new class:
    [
        <coclass attributes>
    ] 
    coclass KnowMore 
    {
       interface IKnown;
    };
};

자세한 내용은 OLE 데이터 형식 마샬링형식 라이브러리를 생성하는 데 필요한 추가 파일을 참조하세요.