OLEEXIT.C
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:
Windows编程
开发平台:
Visual C++
- /*
- * OLEEXIT.C
- *
- * Functions for final OLE cleanup.
- *
- * Copyright(c) Microsoft Corp. 1992-1994 All Rights Reserved
- * Win32 version, January 1994
- */
- #ifdef MAKEOLESERVER
- #include <windows.h>
- #include <ole.h>
- #include "cosmo.h"
- #include "oleglobl.h"
- /*
- * FOLEExit
- *
- * Purpose:
- * Handles OLE-server specific shutdown
- * 1. Free the OLESERVER structure.
- * 2. Free the procedure instances the server's VTBLs.
- *
- * Parameters:
- * pOLE LPXOLEGLOBALS to OLE-specific global variable block.
- *
- * Return Value:
- * BOOL FALSE if an error occurred, otherwise TRUE.
- */
- BOOL WINAPI FOLEExit(LPXOLEGLOBALS pOLE)
- {
- /*
- * Dump the server. We depend on ServerRelease and DocRelease to
- * clean up documents and objects. Choosing File/Exit has already
- * revoked the server. This is simply final cleanup.
- */
- if (NULL!=pOLE)
- {
- if (NULL!=pOLE->pSvr)
- LocalFree(pOLE->pSvr->hMem);
- }
- OLEVtblFreeServer (&pOLE->vtblSvr);
- OLEVtblFreeDocument(&pOLE->vtblDoc);
- OLEVtblFreeObject (&pOLE->vtblObj);
- return TRUE;
- }
- #endif //MAKEOLESERVER