mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
610 B
33 lines
610 B
/*
|
|
* @(#)_reference.cxx 1.0 6/3/97
|
|
*
|
|
* Copyright (c) 1997 - 1999 Microsoft Corporation. All rights reserved. *
|
|
*/
|
|
#include "stdinc.h"
|
|
#include "core.hxx"
|
|
#pragma hdrstop
|
|
|
|
void _assign(IUnknown ** ppref, IUnknown * pref)
|
|
{
|
|
IUnknown *punkRef = *ppref;
|
|
|
|
#ifdef FUSION_USE_OLD_XML_PARSER_SOURCE
|
|
if (pref) ((Object *)pref)->AddRef();
|
|
(*ppref) = (Object *)pref;
|
|
#else // fusion xml parser
|
|
if (pref) pref->AddRef();
|
|
(*ppref) = pref;
|
|
|
|
#endif
|
|
|
|
if (punkRef) punkRef->Release();
|
|
}
|
|
|
|
void _release(IUnknown ** ppref)
|
|
{
|
|
if (*ppref)
|
|
{
|
|
(*ppref)->Release();
|
|
*ppref = NULL;
|
|
}
|
|
}
|