本文整理汇总了C++中ATLTRY函数的典型用法代码示例。如果您正苦于以下问题:C++ ATLTRY函数的具体用法?C++ ATLTRY怎么用?C++ ATLTRY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ATLTRY函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _ASSERTE
///////////////////////////////////////////////////////////////////////////////
// ein neues Objekt zum Baum hinzufügen
bool CSpatialTreeNode::AddTile(CPgrTile *pTile, int nMaxDepth)
{
// If there are subnodes, then consider wether this object
// will fit in them.
if (nMaxDepth > 1 && m_nSubNodes > 0) {
for (int i = 0; i < m_nSubNodes; ++i) {
_ASSERTE(NULL != m_apsSubNode[i]);
if (m_apsSubNode[i] -> CheckObjectContained(pTile))
return m_apsSubNode[i] -> AddTile(pTile, nMaxDepth - 1);
}
}
else if (nMaxDepth > 1 && 0 == m_nSubNodes) {
// Otherwise, consider creating four subnodes if could fit into
// them, and adding to the appropriate subnode.
double adfBoundsMinH1[SPATIALTREE_DIMENSION], adfBoundsMaxH1[SPATIALTREE_DIMENSION];
double adfBoundsMinH2[SPATIALTREE_DIMENSION], adfBoundsMaxH2[SPATIALTREE_DIMENSION];
double adfBoundsMin1[SPATIALTREE_DIMENSION], adfBoundsMax1[SPATIALTREE_DIMENSION];
double adfBoundsMin2[SPATIALTREE_DIMENSION], adfBoundsMax2[SPATIALTREE_DIMENSION];
double adfBoundsMin3[SPATIALTREE_DIMENSION], adfBoundsMax3[SPATIALTREE_DIMENSION];
double adfBoundsMin4[SPATIALTREE_DIMENSION], adfBoundsMax4[SPATIALTREE_DIMENSION];
SplitBounds(m_dBoundsMin, m_dBoundsMax, adfBoundsMinH1, adfBoundsMaxH1, adfBoundsMinH2, adfBoundsMaxH2);
SplitBounds(adfBoundsMinH1, adfBoundsMaxH1, adfBoundsMin1, adfBoundsMax1, adfBoundsMin2, adfBoundsMax2);
SplitBounds(adfBoundsMinH2, adfBoundsMaxH2, adfBoundsMin3, adfBoundsMax3, adfBoundsMin4, adfBoundsMax4);
if (CheckObjectContained(pTile, adfBoundsMin1, adfBoundsMax1) ||
CheckObjectContained(pTile, adfBoundsMin2, adfBoundsMax2) ||
CheckObjectContained(pTile, adfBoundsMin3, adfBoundsMax3) ||
CheckObjectContained(pTile, adfBoundsMin4, adfBoundsMax4))
{
m_nSubNodes = 4;
ATLTRY((
m_apsSubNode[0] = new CSpatialTreeNode(adfBoundsMin1, adfBoundsMax1),
m_apsSubNode[1] = new CSpatialTreeNode(adfBoundsMin2, adfBoundsMax2),
m_apsSubNode[2] = new CSpatialTreeNode(adfBoundsMin3, adfBoundsMax3),
m_apsSubNode[3] = new CSpatialTreeNode(adfBoundsMin4, adfBoundsMax4)
));
// recurse back on this node now that it has subnodes
return AddTile(pTile, nMaxDepth);
}
}
// If none of that worked, just add it to this nodes list.
++m_nFeatureCount;
CPgrTile * *pFeatureIds = SfRealloc(m_pFeatureIds, sizeof(CPgrTile *) * m_nFeatureCount);
if (NULL != pFeatureIds) {
m_pFeatureIds = pFeatureIds;
ATLTRY(m_pFeatureIds[m_nFeatureCount - 1] = new CPgrTile(*pTile));
return true;
}
return false;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:57,代码来源:SpatialTree.cpp
示例2: ATLTRY
///////////////////////////////////////////////////////////////////////////////
// Objektgeometrie besorgen
bool CObjGeometrie::FInit (bool fStatisticsOnly)
{
// Statistik anfordern
if (!DEX_GetObjStatistik (*this))
return false;
if (fStatisticsOnly)
return true;
// Felder anfordern
ATLTRY(pdblX = new double [lCnt]);
ATLTRY(pdblY = new double [lCnt]);
if (pdblX == NULL || pdblY == NULL)
return false;
if (iKCnt > 0) {
if (iObjTyp == OGFlaeche) {
ATLTRY(plCnt = new long [iKCnt]);
if (plCnt == NULL)
return false;
}
else if (iObjTyp == OGText) {
((TEXTGEOMETRIE &)*this).pText = new char [iKCnt+1];
if (((TEXTGEOMETRIE &)*this).pText == NULL)
return false;
}
}
// Geometrie holen
iFlags |= OGConverted;
if (!DEX_GetObjGeometrie (*this))
return false;
// bei Linien/Flächen vergleichbare Position herstellen
bool fResult = true;
if (OGFlaeche == iObjTyp)
{
fResult = AdjustAreaGeometry();
fResult &= AdjustIslands(); // Inseln sortieren
}
else if (OGLinie == iObjTyp)
fResult = AdjustLineGeometry();
// Hashwerte berechnen
if (1.0 == m_dKoeff) {
m_lXHash = HashKoords(&X(0), lCnt*sizeof(double));
m_lYHash = HashKoords(&Y(0), lCnt*sizeof(double));
}
else {
m_lXHash = HashKoordsTolerance(&X(0), lCnt, m_dKoeff);
m_lYHash = HashKoordsTolerance(&Y(0), lCnt, m_dKoeff);
}
return fResult;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:57,代码来源:GeoObj.cpp
示例3: ATLASSERT
void CComSafeArray::Create(VARTYPE vtSrc, DWORD dwDims, SAFEARRAYBOUND *rgsabound)
{
ATLASSERT(dwDims > 0);
ATLASSERT(rgsabound != NULL);
// Validate the VARTYPE for SafeArrayCreate call
ATLASSERT( !(vtSrc & VT_ARRAY) );
ATLASSERT( !(vtSrc & VT_BYREF) );
ATLASSERT( !(vtSrc & VT_VECTOR) );
ATLASSERT(vtSrc != VT_EMPTY);
ATLASSERT(vtSrc != VT_NULL);
// Free up old safe array if necessary
Clear();
ATLTRY( parray = ::SafeArrayCreate(vtSrc, dwDims, rgsabound) );
if (parray == NULL) {
ATLTRACE2(atlTraceDBProvider, 0, "CComSafeArray::Create Error : OOM\n");
return;
}
vt = unsigned short (vtSrc | VT_ARRAY);
m_dwDims = dwDims;
m_dwElementSize = GetElemSize();
}
开发者ID:plus7,项目名称:DonutG,代码行数:26,代码来源:MtlCom.cpp
示例4: IDataObject_Constructor
/**************************************************************************
* IDataObject_Constructor
*/
HRESULT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl, IDataObject **dataObject)
{
CComObject<IDataObjectImpl> *theDataObject;
CComPtr<IDataObject> result;
HRESULT hResult;
if (dataObject == NULL)
return E_POINTER;
*dataObject = NULL;
ATLTRY (theDataObject = new CComObject<IDataObjectImpl>);
if (theDataObject == NULL)
return E_OUTOFMEMORY;
hResult = theDataObject->QueryInterface (IID_IDataObject, (void **)&result);
if (FAILED (hResult))
{
delete theDataObject;
return hResult;
}
hResult = theDataObject->Initialize (hwndOwner, pMyPidl, apidl, cidl);
if (FAILED (hResult))
return hResult;
*dataObject = result.Detach ();
TRACE("(%p)->(apidl=%p cidl=%u)\n", *dataObject, apidl, cidl);
return S_OK;
}
开发者ID:RareHare,项目名称:reactos,代码行数:28,代码来源:dataobject.cpp
示例5: IEnumFORMATETC_Constructor
HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMATETC **enumerator)
{
CComObject<IEnumFORMATETCImpl> *theEnumerator;
CComPtr<IEnumFORMATETC> result;
HRESULT hResult;
if (enumerator == NULL)
return E_POINTER;
*enumerator = NULL;
ATLTRY (theEnumerator = new CComObject<IEnumFORMATETCImpl>);
if (theEnumerator == NULL)
return E_OUTOFMEMORY;
hResult = theEnumerator->QueryInterface (IID_IEnumFORMATETC, (void **)&result);
if (FAILED (hResult))
{
delete theEnumerator;
return hResult;
}
hResult = theEnumerator->Initialize (cfmt, afmt);
if (FAILED (hResult))
return hResult;
*enumerator = result.Detach ();
TRACE("(%p)->(%u,%p)\n", *enumerator, cfmt, afmt);
return S_OK;
}
开发者ID:RareHare,项目名称:reactos,代码行数:25,代码来源:dataobject.cpp
示例6: TRACE
/**************************************************************************
* CFontsFolder::EnumObjects
*/
HRESULT WINAPI CFontsFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
{
CComObject<CDesktopFolderEnumZ> *theEnumerator;
CComPtr<IEnumIDList> result;
HRESULT hResult;
TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList);
if (ppEnumIDList == NULL)
return E_POINTER;
*ppEnumIDList = NULL;
ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnumZ>);
if (theEnumerator == NULL)
return E_OUTOFMEMORY;
hResult = theEnumerator->QueryInterface(IID_PPV_ARG(IEnumIDList, &result));
if (FAILED (hResult))
{
delete theEnumerator;
return hResult;
}
hResult = theEnumerator->Initialize (dwFlags);
if (FAILED (hResult))
return hResult;
*ppEnumIDList = result.Detach ();
TRACE ("-- (%p)->(new ID List: %p)\n", this, *ppEnumIDList);
return S_OK;
}
开发者ID:hackbunny,项目名称:reactos,代码行数:32,代码来源:fonts.cpp
示例7: DELETE_OBJ
///////////////////////////////////////////////////////////////////////////////
// Geometriebaum (Quadtree)
BOOL CSpatialTree::Init (long lTileCnt, double *padfBoundsMin,
double *padfBoundsMax, int nMaxDepth)
{
DELETE_OBJ(m_psRoot);
_ASSERTE(NULL != padfBoundsMin && NULL != padfBoundsMax);
// If no max depth was defined, try to select a reasonable one
// that implies approximately 8 shapes per node.
if (0 == nMaxDepth) {
int nMaxNodeCount = 1;
while (4 * nMaxNodeCount < lTileCnt)
{
++nMaxDepth;
nMaxNodeCount = 2 * nMaxNodeCount;
}
}
m_nMaxDepth = nMaxDepth;
// Allocate the root node.
// Assign the bounds to the root node. If none are passed in,
// use the bounds of the provided file otherwise the create
// function will have already set the bounds.
ATLTRY(m_psRoot = new CSpatialTreeNode(padfBoundsMin, padfBoundsMax));
return (NULL != m_psRoot) ? TRUE : FALSE;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:30,代码来源:SpatialTree.cpp
示例8: _InsertItem
EShellTreeItem _InsertItem(IShellFolder* pFolder, LPCITEMIDLIST pidlPath, LPCITEMIDLIST pidlNode,
DWORD dwAttribs, EShellTreeItem tiParent)
{
ATLASSERT(pFolder);
ATLASSERT(pidlPath);
// Create PARAM data
PSHELLITEMINFO pItem;
ATLTRY(pItem = new SHELLITEMINFO);
ATLASSERT(pItem);
pItem->pidlFull.Copy( pidlPath );
pItem->pidlFull.Concatenate( pidlNode );
pItem->pidlNode.Copy( pidlNode );
pItem->spFolder = pFolder;
pItem->dwAttribs = dwAttribs;
SHFILEINFO sfi;
if( ::SHGetFileInfo((LPCTSTR)(LPCITEMIDLIST)pItem->pidlFull, 0, &sfi, sizeof(sfi),
SHGFI_PIDL | SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX
| SHGFI_SMALLICON | SHGFI_LINKOVERLAY) )
{
return AppendItem(tiParent, sfi.szDisplayName, sfi.iIcon, pItem);
}
return NULL;
}
开发者ID:Beifeng,项目名称:qui,代码行数:25,代码来源:behavior_shellctrl.cpp
示例9: m_ptszClass
CKeyClass::CKeyClass(
CHKey& hk)
: m_ptszClass(NULL),
m_lErr(ERROR_SUCCESS)
{
DWORD ctc = 0;
if (! hk.QueryInfoKey(NULL, &ctc, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL))
{
m_lErr = hk.Error();
}
else
{
ATLTRY(m_ptszClass = new TCHAR [++ctc]);
if (m_ptszClass == NULL)
{
m_lErr = ERROR_OUTOFMEMORY;
return;
}
*m_ptszClass = _T('\0');
if (! hk.QueryInfoKey(m_ptszClass, &ctc, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL))
{
delete [] m_ptszClass;
m_ptszClass= NULL;
m_lErr = hk.Error();
}
}
}
开发者ID:georgevreilly,项目名称:sample-ASP-components,代码行数:32,代码来源:hkey.cpp
示例10: if
bool CPEDebug::Initialize()
{
if (m_fIsInitialized)
return true; // nur einmal initialisieren
else if (m_fTriedToInitialize)
return false; // schon mal versucht, jedoch fehlgeschlagen
m_fTriedToInitialize = true;
// Since the largest symbol that the MS code generators can handle
// is 256 that is all that is needed.
ATLTRY(m_pSymbol = (IMAGEHLP_SYMBOL *)new BYTE [sizeof(IMAGEHLP_SYMBOL) + 256]);
if (NULL == m_pSymbol) return false;
// SymbolEngine initialisieren
if (m_SymEngine.SymInitialize (GetCurrentProcess(), NULL, TRUE)) {
// Set the symbol engine to load line information. This must be
// because the symbol engine does not load source-lines by default.
// I also turn on the OMAP lookups so that the super-special OMAP
// moved blocks will get looked at as well. Trust me, don't ask.
SymSetOptions (SymGetOptions() | SYMOPT_LOAD_LINES | SYMOPT_OMAP_FIND_NEAREST);
m_fIsInitialized = true;
return true;
}
return false;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:25,代码来源:ImageHelpDebug.cpp
示例11: m_pSystem
COledbDatabase::COledbDatabase() :
m_pSystem(NULL)
{
ATLTRY(m_pErrors = new COledbErrors);
#ifdef _DEBUG
m_nRecordsets = 0;
#endif
}
开发者ID:okigan,项目名称:dblib,代码行数:8,代码来源:DbOledb.cpp
示例12: _lcreat
bool CIdentsDBExtension::ExportDataSourceAsXml (LPUNKNOWN pIUnk, HPROJECT hPr, LPCSTR pFName, ULONG &rulCnt)
{
if (pIUnk) LPPROGRESSINDICATOR(pIUnk) -> ChangeText (PIFLAG_FILENAME, pFName);
// Datei bilden, wenn diese noch nicht existiert
int fh = _lcreat (pFName, 0);
if (fh < 0) return false;
bool fRet = false;
{
// hier geht's los
CXMLDocument Doc (fh); // <?xml ...?>
char cbBuffer[80]; // TRiAS Version, aktuelle Zeit
os_time_and_date now;
string resVersion (g_cbTRiAS);
ResString resTempl (IDS_SIGNONVERSION_MODAL, _MAX_PATH);
resVersion += ": ";
resVersion += resTempl;
ATLTRY(now = os_time_and_date::now());
strcpy (cbBuffer, resVersion.c_str());
strcat (cbBuffer, now.to_string(" %e. %B %Y, %T").c_str());
CXMLComment (fh, cbBuffer);
CXMLComment (fh, ResString (IDS_COPYRIGHT, 100)); // allgemeines Copyright
// DTD einfügen
CXMLRawData (fh, s_cbDTD);
// die eigentlichen Infos ausgeben
CXMLAttribute Attr ("Version", "1.0");
CXMLNode MainNode (fh, g_cbTRiASMetadata, Attr);
ENUMLONGKEY ELK;
EXPORTDATA ED;
ED.fh = fh;
ED.pIUnk = pIUnk;
ED.ulCnt = rulCnt;
ELK.eKey = 'i';
ELK.eFcn = (ENUMLONGKEYPROC)ExportIdentEntryAsXml;
ELK.ePtr = &ED;
fRet = DEX_EnumPBDDataEx (hPr, ELK);
rulCnt = ED.ulCnt;
}
// Datei wieder schließen
_lclose (fh); // Datei schließen
return fRet;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:55,代码来源:ExportAsXml.cpp
示例13: CreateInstance
CFindReplaceDlg *CFindReplaceDlg :: CreateInstance ()
{
CFindReplaceDlg *pCFindReplaceDlg = NULL;
ATLTRY(pCFindReplaceDlg = new CFindReplaceDlg());
if(pCFindReplaceDlg == NULL || !pCFindReplaceDlg -> FInit () ) {
if (pCFindReplaceDlg) delete pCFindReplaceDlg;
return NULL;
}
return pCFindReplaceDlg;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:11,代码来源:FNDRPLD.CPP
示例14: CSingleDocTemplate
CTRiASDocTemplate::CTRiASDocTemplate(UINT nIDResource,
CRuntimeClass* pDocClass, CRuntimeClass* pFrameClass,
CRuntimeClass* pViewClass)
: CSingleDocTemplate(nIDResource, pDocClass, pFrameClass, pViewClass)
{
// Zeichenketten korrigieren
if (m_strDocStrings.IsEmpty())
m_strDocStrings.LoadString(nIDResource);
ATLTRY(m_strDocStrings = FakeTRiASName (
m_strDocStrings, g_cbTRiAS, g_cbTRiAS, g_cbTRiAS,
g_cbRiw, g_cbRiw, g_cbTRiAS).c_str());
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:13,代码来源:TRiASDocTempl.cpp
示例15: RemoveChunk
void CSketcherDoc::SetSearchContent(const CString& value)
{
if (value.IsEmpty()) {
RemoveChunk(PKEY_Search_Contents.fmtid, PKEY_Search_Contents.pid);
} else {
CMFCFilterChunkValueImpl *pChunk = NULL;
ATLTRY(pChunk = new CMFCFilterChunkValueImpl);
if (pChunk != NULL) {
pChunk->SetTextValue(PKEY_Search_Contents, value, CHUNK_TEXT);
SetChunkValue(pChunk);
}
}
}
开发者ID:timkingh,项目名称:CPP_Learning,代码行数:13,代码来源:SketcherDoc.cpp
示例16: Pict
STDMETHODIMP CToolBarButton::GetImage (long *phBitmap, int *piCnt, int *piOffset)
{
if (NULL == phBitmap) return E_POINTER;
if (BUTTONSTYLE_SEPARATOR == m_tb.fsStyle)
return E_FAIL; // Separatoren haben keine Bitmap
CPicture Pict (m_PictDisp, false);
ATLTRY(*phBitmap = Pict.GetHandle());
if (NULL != piCnt) *piCnt = m_iCnt;
if (NULL != piOffset) *piOffset = m_iOffset;
return (NULL != *phBitmap) ? NOERROR : E_FAIL;
}
开发者ID:hkaiser,项目名称:TRiAS,代码行数:15,代码来源:ToolBarButton.cpp
示例17: CreateAddressBand
HRESULT CreateAddressBand(REFIID riid, void **ppv)
{
CComObject<CAddressBand> *theMenuBar;
HRESULT hResult;
if (ppv == NULL)
return E_POINTER;
*ppv = NULL;
ATLTRY (theMenuBar = new CComObject<CAddressBand>);
if (theMenuBar == NULL)
return E_OUTOFMEMORY;
hResult = theMenuBar->QueryInterface (riid, (void **)ppv);
if (FAILED (hResult))
{
delete theMenuBar;
return hResult;
}
return S_OK;
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:19,代码来源:addressband.cpp
示例18: FindURL
//Add a page to the array (if it's not already present) and
//increase its hitcount by ExtraHits.
UINT CPageArray::AddPage(const BSTR bstrURL, UINT ExtraHits)
{
int i = FindURL(bstrURL);
if (i >= 0)
{
// There are no duplicate URLs in this array; just adjust m_Hits
ASSERT(i < m_iMax);
m_aPages[i].m_Hits += ExtraHits;
}
else
{
// Not present, so append it
ASSERT(0 <= m_iMax && m_iMax <= m_cAlloc);
if (m_iMax == m_cAlloc)
{
// grow the array because it's full
CPage* pOldPages = m_aPages;
m_cAlloc += CHUNK_SIZE;
m_aPages = NULL;
ATLTRY(m_aPages = new CPage[m_cAlloc]);
if (m_aPages == NULL)
{
m_aPages = pOldPages;
return BAD_HITS;
}
for (i = 0; i < m_iMax; i++)
m_aPages[i] = pOldPages[i];
delete [] pOldPages;
}
i = m_iMax++;
m_aPages[i].m_URL = bstrURL;
m_aPages[i].m_Hits = ExtraHits;
}
return m_aPages[i].GetHits();
}
开发者ID:georgevreilly,项目名称:sample-ASP-components,代码行数:45,代码来源:page.cpp
示例19: _MtlCreateOneDimArray
/////////////////////////////////////////////////////////////////////////////
// Helper for iter to CComSafeArray
void _MtlCreateOneDimArray(VARIANT &varSrc, DWORD dwSize)
{
UINT nDim;
// Clear VARIANT and re-create SafeArray if necessary
if (varSrc.vt != (VT_UI1 | VT_ARRAY)
|| ( nDim = ::SafeArrayGetDim(varSrc.parray) ) != 1)
{
MTLVERIFY(::VariantClear(&varSrc) == NOERROR);
varSrc.vt = VT_UI1 | VT_ARRAY;
SAFEARRAYBOUND bound;
bound.cElements = dwSize;
bound.lLbound = 0;
ATLTRY( varSrc.parray = ::SafeArrayCreate(VT_UI1, 1, &bound) );
if (varSrc.parray == NULL)
ATLTRACE2(atlTraceDBProvider, 0, "MtlCheckError Error : OOM\n");
} else {
// Must redimension array if necessary
long lLower, lUpper;
MtlCheckError( ::SafeArrayGetLBound(varSrc.parray, 1, &lLower) );
MtlCheckError( ::SafeArrayGetUBound(varSrc.parray, 1, &lUpper) );
// Upper bound should always be greater than lower bound
long lSize = lUpper - lLower;
if (lSize < 0) {
ATLASSERT(FALSE);
lSize = 0;
}
if ( (DWORD) lSize != dwSize ) {
SAFEARRAYBOUND bound;
bound.cElements = dwSize;
bound.lLbound = lLower;
MtlCheckError( ::SafeArrayRedim(varSrc.parray, &bound) );
}
}
}
开发者ID:plus7,项目名称:DonutG,代码行数:42,代码来源:MtlCom.cpp
示例20: IDefClF_fnConstructor
HRESULT IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInst, IClassFactory **theFactory)
{
CComObject<IDefClFImpl> *theClassObject;
CComPtr<IClassFactory> result;
HRESULT hResult;
if (theFactory == NULL)
return E_POINTER;
*theFactory = NULL;
ATLTRY (theClassObject = new CComObject<IDefClFImpl>);
if (theClassObject == NULL)
return E_OUTOFMEMORY;
hResult = theClassObject->QueryInterface (IID_IClassFactory, (void **)&result);
if (FAILED (hResult))
{
delete theClassObject;
return hResult;
}
hResult = theClassObject->Initialize (lpfnCI, pcRefDll, riidInst);
if (FAILED (hResult))
return hResult;
*theFactory = result.Detach ();
return S_OK;
}
开发者ID:RareHare,项目名称:reactos,代码行数:24,代码来源:shellole.cpp
注:本文中的ATLTRY函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论