次の方法で共有


AfxOleUnregisterTypeLib

更新 : 2007 年 11 月

タイプ ライブラリのエントリを Windows 登録情報データベースから削除します。

BOOL AFXAPI AfxOleUnregisterTypeLib(
   REFGUID tlID 
);

パラメータ

  • tlID
    タイプ ライブラリの ID。

戻り値

タイプ ライブラリが正常に登録解除された場合は 0 以外を返します。それ以外の場合は 0 を返します。

使用例

// Type library GUID, corresponds to the uuid attribute of the library
// section in the .odl file.
const GUID CDECL BASED_CODE _tlid =
        { 0xA44774E8, 0xAE00, 0x451F, { 0x96, 0x1D, 0xC7, 0xD2, 0xD2, 0x58, 0xA0, 0x75 } };

// Type library major version number, number on the left of decimal
// point, in version attribute of the library section in .odl file.
const WORD _wVerMajor = 1;

// Type library minor version number, number on the right of decimal
// point, in version attribute of the library section in .odl file.
const WORD _wVerMinor = 0;

STDAPI DllUnregisterServer(void)
{
    AFX_MANAGE_STATE(_afxModuleAddrThis);

    if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
        return ResultFromScode(SELFREG_E_TYPELIB);

    if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
        return ResultFromScode(SELFREG_E_CLASS);

    return NOERROR;
}

必要条件

ヘッダー : afxdisp.h

参照

概念

MFC マクロとグローバル

参照

AfxOleUnregisterClass

AfxOleRegisterTypeLib