📄 dllmain.cpp
字号:
// DVBTeletextSubtitles.cpp
/*
(C) Luke Paton 2004.
Copyright notice:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "stdafx.h"
#include "resource.h"
#include "DVBTeletextSubtitles.h"
#include "DVBSubtitlesFilter.h"
#include "DVBTeletextSubtitlesPropertiesPage1.h"
#include <ks.h>
#include <ksmedia.h>
#include <bdatypes.h>
#include <bdamedia.h>
//
// DllEntryPoint
//
extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
return DllEntryPoint(hInstance, dwReason, lpReserved);
}
CFactoryTemplate g_Templates[] =
{
{ L"DVBTeletextSubtitles", &CLSID_DVBTeletextSubtitles, CDVBTeletextSubtitles::CreateInstance, NULL, &sudDVBTeletextSubtitles },
{ L"DVBTeletext Subtitles Property Page", &CLSID_CDVBTeletextSubtitlesPropertiesPage1, CDVBTeletextSubtitlesPropertiesPage1::CreateInstance }
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
// registers object, typelib and all interfaces in typelib
HRESULT hr = S_OK;
if (SUCCEEDED(hr))
{
hr = AMovieDllRegisterServer2(TRUE);
}
return hr;
}
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
HRESULT hr = S_OK; // _AtlModule.DllUnregisterServer();
if (SUCCEEDED(hr))
{
hr = AMovieDllRegisterServer2( FALSE );
}
return hr;
}
const AMOVIESETUP_FILTER sudDVBTeletextSubtitles =
{
&CLSID_DVBTeletextSubtitles, // Filter CLSID
L"DVBTeletextSubtitles", // String name
MERIT_DO_NOT_USE, // Filter merit
0, // Number of pins
NULL // Pin details
};
CUnknown * WINAPI CDVBTeletextSubtitles::CreateInstance(LPUNKNOWN lpunk, HRESULT *phr)
{
ASSERT(phr);
CUnknown *punk = new CDVBTeletextSubtitles(lpunk, phr);
if (punk == NULL)
{
*phr = E_OUTOFMEMORY;
}
return punk;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -