1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
-
-
-
-
-
-
-
-
- #include "stdafx.h"
- #include "resource.h"
- #include <initguid.h>
- #include "TtsEng.h"
- #include "TtsEng_i.c"
- #include "TtsEngObj.h"
-
-
-
- CComModule _Module;
-
- BEGIN_OBJECT_MAP(ObjectMap)
- OBJECT_ENTRY( CLSID_SampleTTSEngine , CTTSEngObj )
- END_OBJECT_MAP()
-
-
-
-
- #ifdef _WIN32_WCE
- extern "C" BOOL WINAPI DllMain(HANDLE hInstance, ULONG dwReason, LPVOID)
- #else
- extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID )
- #endif
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- _Module.Init(ObjectMap, (HINSTANCE)hInstance, &LIBID_SAMPLETTSENGLib);
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- _Module.Term();
- return TRUE;
- }
-
-
-
-
- STDAPI DllCanUnloadNow(void)
- {
- return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
- }
-
-
-
-
- STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
- {
- return _Module.GetClassObject(rclsid, riid, ppv);
- }
-
-
-
-
- STDAPI DllRegisterServer(void)
- {
-
- return _Module.RegisterServer(TRUE);
- }
-
-
-
-
- STDAPI DllUnregisterServer(void)
- {
- return _Module.UnregisterServer(TRUE);
- }
-
-
-
-
|