/////////////////////////////////////////////////////////////////////////////
//++
//
//  DllUnregisterCluAdminExtension
//
//  Description:
//      Unregister the extension with the cluster database.
//
//  Arguments:
//      hClusterIn      Handle to the cluster to modify.
//
//  Return Value:
//      S_OK            Extension unregistered successfully.
//      Win32 error code if another failure occurred.
//
//--
/////////////////////////////////////////////////////////////////////////////
STDAPI
DllUnregisterCluAdminExtension(
    HCLUSTER hClusterIn
    )
{
    DWORD       sc = ERROR_SUCCESS;
    DWORD       scTemp = ERROR_SUCCESS;
    LPCWSTR     pwszResTypes = g_wszResourceTypeNames;

    AFX_MANAGE_STATE( AfxGetStaticModuleState() );


    //
    // Unregister to extend our resource type(s).
    //

    while ( *pwszResTypes != L'\0' )
    {
        wprintf( L"  %s\n", pwszResTypes );
        scTemp = UnregisterCluAdminResourceTypeExtension(
                      hClusterIn
                    , pwszResTypes
                    , &CLSID_CoClipBookServerEx
                    );
        if ( scTemp != ERROR_SUCCESS )
        {
            sc = scTemp;
        } // if:  error unregistering the extension

        pwszResTypes += lstrlenW( pwszResTypes ) + 1;
    }  // while:  more resource types

    if ( sc != ERROR_SUCCESS )
    {
        goto Cleanup;
    } // if:

Cleanup:

    return HRESULT_FROM_WIN32( sc );

}  //*** DllUnregisterCluAdminExtension
Esempio n. 2
0
/////////////////////////////////////////////////////////////////////////////
//++
//
//	DllUnregisterCluAdminExtension
//
//	Routine Description:
//		Unregister the extension with the cluster database.
//
//	Arguments:
//		hCluster		[IN] Handle to the cluster to modify.
//
//	Return Value:
//		S_OK			Extension unregistered successfully.
//		Win32 error code if another failure occurred.
//
//--
/////////////////////////////////////////////////////////////////////////////
STDAPI DllUnregisterCluAdminExtension(IN HCLUSTER hCluster)
{
	HRESULT		hr;
	HRESULT		hrReturn = S_OK;
	LPCWSTR		pwszResTypes = g_wszResourceTypeNames;

	while (*pwszResTypes != L'\0')
	{
		wprintf(L"  %s\n", pwszResTypes);
		hr = UnregisterCluAdminResourceTypeExtension(
					hCluster,
					pwszResTypes,
					&CLSID_CoB2CServiceEx
					);
		if (hr != S_OK)
			hrReturn = hr;
		pwszResTypes += lstrlenW(pwszResTypes) + 1;
	}  // while:  more resource types

	return hrReturn;

}  //*** DllUnregisterCluAdminExtension()