Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

View File

@@ -0,0 +1,255 @@
//------------------------------------------------------------------------------
// File: CPPVideoControl.cpp
//
// Desc: Implementation of WinMain
// for the Windows XP MSVidCtl C++ sample
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f CPPVideoControlps.mk in the project directory.
#include "stdafx.h"
#include "resource.h"
#include <commctrl.h>
#include "CPPVideoControl.h"
#include "CPPVideoControl_i.c"
#include "CompositeControl.h"
// Constants
const DWORD dwTimeOut = 5000; // time for EXE to be idle before shutting down
const DWORD dwPause = 2000; // time to wait for threads to finish up
// Local prototypes
BOOL CheckVersion(void);
// Passed to CreateThread to monitor the shutdown event
static DWORD WINAPI MonitorProc(void* pv)
{
CExeModule* p = (CExeModule*)pv;
p->MonitorShutdown();
return 0;
}
LONG CExeModule::Unlock()
{
LONG lock = CComModule::Unlock();
if (lock == 0)
{
bActivity = true;
SetEvent(hEventShutdown); // tell monitor that we transitioned to zero
}
return lock;
}
//Monitors the shutdown event
void CExeModule::MonitorShutdown()
{
DWORD dwWait=0;
while (1)
{
WaitForSingleObject(hEventShutdown, INFINITE);
do
{
bActivity = false;
dwWait = WaitForSingleObject(hEventShutdown, dwTimeOut);
} while (dwWait == WAIT_OBJECT_0);
// timed out
if (!bActivity && m_nLockCnt == 0) // if no activity let's really quit
{
#if _WIN32_WINNT >= 0x0400 && defined(_ATL_FREE_THREADED)
CoSuspendClassObjects();
if (!bActivity && m_nLockCnt == 0)
#endif
break;
}
}
CloseHandle(hEventShutdown);
PostThreadMessage(dwThreadID, WM_QUIT, 0, 0);
}
bool CExeModule::StartMonitor()
{
hEventShutdown = CreateEvent(NULL, false, false, NULL);
if (hEventShutdown == NULL)
return false;
DWORD dwThreadID;
HANDLE h = CreateThread(NULL, 0, MonitorProc, this, 0, &dwThreadID);
return (h != NULL);
}
CExeModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_CompositeControl, CCompositeControl)
END_OBJECT_MAP()
LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2)
{
while (p1 != NULL && *p1 != NULL)
{
LPCTSTR p = p2;
while (p != NULL && *p != NULL)
{
if (*p1 == *p)
return CharNext(p1);
p = CharNext(p);
}
p1 = CharNext(p1);
}
return NULL;
}
/////////////////////////////////////////////////////////////////////////////
//
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance,
HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/)
{
// This sample requires Windows XP. If running on a downlevel system,
// exit gracefully.
if (!CheckVersion())
return FALSE;
lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT
#if _WIN32_WINNT >= 0x0400 && defined(_ATL_FREE_THREADED)
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
#else
HRESULT hRes = CoInitialize(NULL);
#endif
_ASSERTE(SUCCEEDED(hRes));
_Module.Init(ObjectMap, hInstance, &LIBID_CPPVIDEOCONTROLLib);
_Module.dwThreadID = GetCurrentThreadId();
TCHAR szTokens[] = _T("-/");
int nRet = 0;
BOOL bRun = TRUE;
LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens);
while (lpszToken != NULL)
{
if (lstrcmpi(lpszToken, _T("UnregServer"))==0)
{
_Module.UpdateRegistryFromResource(IDR_CPPVideoControl, FALSE);
nRet = _Module.UnregisterServer(TRUE);
bRun = FALSE;
break;
}
if (lstrcmpi(lpszToken, _T("RegServer"))==0)
{
_Module.UpdateRegistryFromResource(IDR_CPPVideoControl, TRUE);
nRet = _Module.RegisterServer(TRUE);
bRun = FALSE;
break;
}
lpszToken = FindOneOf(lpszToken, szTokens);
}
if (bRun)
{
_Module.StartMonitor();
#if _WIN32_WINNT >= 0x0400 && defined(_ATL_FREE_THREADED)
hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED);
_ASSERTE(SUCCEEDED(hRes));
hRes = CoResumeClassObjects();
#else
hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE);
#endif
_ASSERTE(SUCCEEDED(hRes));
//Create the window and have our composite control (with msvidctl) appear
AtlAxWinInit();
InitCommonControls();
HWND hWnd = ::CreateWindow(TEXT("AtlAxWin"),
TEXT("CPPVideoControl.CompositeControl"),
NULL,
CW_USEDEFAULT, CW_USEDEFAULT, // x,y
300, 350, // width, height
NULL, NULL, // parent, menu
::GetModuleHandle(NULL),
NULL);
_ASSERTE(hWnd != NULL);
hWnd = hWnd; // Prevent C4189 (variable initialized but not used)
MSG msg;
while (GetMessage(&msg, 0, 0, 0))
{
TranslateMessage( &msg );
DispatchMessage(&msg);
}
_Module.RevokeClassObjects();
Sleep(dwPause); //wait for any threads to finish
}
_Module.Term();
CoUninitialize();
return nRet;
}
//
// called on a WM_CLOSE & WM_SYSCOMMAND (SC_CLOSE) message. If appropriate, save settings
// and then destroy the window
//
LRESULT CCompositeControl::OnExit(WORD /*wNotifyCode*/, WORD /* wID */, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
SAFE_RELEASE(m_pATSCTuningSpace);
SAFE_RELEASE(m_pTuningSpaceContainer);
SAFE_RELEASE(m_pATSCLocator);
SAFE_RELEASE(m_pMSVidCtl);
DestroyWindow();
PostQuitMessage(0);
return 0;
}
//
// the user clicks on the system menu
//
LRESULT CCompositeControl::OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
bHandled = FALSE; // always do default processing
if (wParam == SC_CLOSE)
OnExit(NULL, NULL, NULL, bHandled);
return 0;
}
BOOL CheckVersion( void )
{
OSVERSIONINFO osverinfo={0};
osverinfo.dwOSVersionInfoSize = sizeof(osverinfo);
if(GetVersionEx(&osverinfo)) {
// Windows XP's major version is 5 and its' minor version is 1.
if((osverinfo.dwMajorVersion > 5) ||
( (osverinfo.dwMajorVersion == 5) && (osverinfo.dwMinorVersion >= 1) )) {
return TRUE;
}
}
MessageBox(NULL,
TEXT("This application requires the Microsoft Video Control,\r\n")
TEXT("which is present only on Windows XP.\r\n\r\n")
TEXT("This sample will now exit."),
TEXT("Microsoft Video Control is required"), MB_OK);
return FALSE;
}

View File

@@ -0,0 +1,348 @@
# Microsoft Developer Studio Project File - Name="CPPVideoControl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=CPPVideoControl - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "CPPVideoControl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "CPPVideoControl.mak" CFG="CPPVideoControl - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "CPPVideoControl - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "CPPVideoControl - Win32 Unicode Debug" (based on "Win32 (x86) Application")
!MESSAGE "CPPVideoControl - Win32 Release MinSize" (based on "Win32 (x86) Application")
!MESSAGE "CPPVideoControl - Win32 Release MinDependency" (based on "Win32 (x86) Application")
!MESSAGE "CPPVideoControl - Win32 Unicode Release MinSize" (based on "Win32 (x86) Application")
!MESSAGE "CPPVideoControl - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "CPPVideoControl - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W4 /Gm /ZI /Od /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D WINVER=0x501 /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\Debug
TargetPath=.\Debug\CPPVideoControl.exe
InputPath=.\Debug\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
# End Custom Build
!ELSEIF "$(CFG)" == "CPPVideoControl - Win32 Unicode Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugU"
# PROP BASE Intermediate_Dir "DebugU"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugU"
# PROP Intermediate_Dir "DebugU"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /ZI /Od /D "_DEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D WINVER=0x501 /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\DebugU
TargetPath=.\DebugU\CPPVideoControl.exe
InputPath=.\DebugU\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
goto end
:NOTNT
echo Warning : Cannot register Unicode EXE on Windows 95
:end
# End Custom Build
!ELSEIF "$(CFG)" == "CPPVideoControl - Win32 Release MinSize"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseMinSize"
# PROP BASE Intermediate_Dir "ReleaseMinSize"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinSize"
# PROP Intermediate_Dir "ReleaseMinSize"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /O1 /D "NDEBUG" /D "_MBCS" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /D "WIN32" /D "_WINDOWS" /D WINVER=0x501 /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\ReleaseMinSize
TargetPath=.\ReleaseMinSize\CPPVideoControl.exe
InputPath=.\ReleaseMinSize\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
# End Custom Build
!ELSEIF "$(CFG)" == "CPPVideoControl - Win32 Release MinDependency"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseMinDependency"
# PROP BASE Intermediate_Dir "ReleaseMinDependency"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseMinDependency"
# PROP Intermediate_Dir "ReleaseMinDependency"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /O1 /D "NDEBUG" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /D "WIN32" /D "_WINDOWS" /D WINVER=0x501 /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\ReleaseMinDependency
TargetPath=.\ReleaseMinDependency\CPPVideoControl.exe
InputPath=.\ReleaseMinDependency\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
# End Custom Build
!ELSEIF "$(CFG)" == "CPPVideoControl - Win32 Unicode Release MinSize"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseUMinSize"
# PROP BASE Intermediate_Dir "ReleaseUMinSize"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseUMinSize"
# PROP Intermediate_Dir "ReleaseUMinSize"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /O1 /D "NDEBUG" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /D "WIN32" /D "_WINDOWS" /D WINVER=0x501 /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\ReleaseUMinSize
TargetPath=.\ReleaseUMinSize\CPPVideoControl.exe
InputPath=.\ReleaseUMinSize\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
goto end
:NOTNT
echo Warning : Cannot register Unicode EXE on Windows 95
:end
# End Custom Build
!ELSEIF "$(CFG)" == "CPPVideoControl - Win32 Unicode Release MinDependency"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseUMinDependency"
# PROP BASE Intermediate_Dir "ReleaseUMinDependency"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseUMinDependency"
# PROP Intermediate_Dir "ReleaseUMinDependency"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /O1 /D "NDEBUG" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /D WINVER=0x501 /D "WIN32" /D "_WINDOWS" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 atl.lib strmiids.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\nt\public\sdk\lib\i386"
# Begin Custom Build - Performing registration
OutDir=.\ReleaseUMinDependency
TargetPath=.\ReleaseUMinDependency\CPPVideoControl.exe
InputPath=.\ReleaseUMinDependency\CPPVideoControl.exe
SOURCE="$(InputPath)"
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
"$(TargetPath)" /RegServer
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
echo Server registration done!
goto end
:NOTNT
echo Warning : Cannot register Unicode EXE on Windows 95
:end
# End Custom Build
!ENDIF
# Begin Target
# Name "CPPVideoControl - Win32 Debug"
# Name "CPPVideoControl - Win32 Unicode Debug"
# Name "CPPVideoControl - Win32 Release MinSize"
# Name "CPPVideoControl - Win32 Release MinDependency"
# Name "CPPVideoControl - Win32 Unicode Release MinSize"
# Name "CPPVideoControl - Win32 Unicode Release MinDependency"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\CompositeControl.cpp
# End Source File
# Begin Source File
SOURCE=.\CPPVideoControl.cpp
# End Source File
# Begin Source File
SOURCE=.\CPPVideoControl.idl
# ADD MTL /tlb ".\CPPVideoControl.tlb" /h "CPPVideoControl.h" /iid "CPPVideoControl_i.c" /Oicf
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\CompositeControl.h
# End Source File
# Begin Source File
SOURCE=.\CPPVideoControl.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\bda.ico
# End Source File
# Begin Source File
SOURCE=.\CompositeControl.rgs
# End Source File
# Begin Source File
SOURCE=.\CPPVideoControl.rc
# End Source File
# Begin Source File
SOURCE=.\CPPVideoControl.rgs
# End Source File
# End Group
# End Target
# End Project
# Section CPPVideoControl : {00000000-0000-0000-0000-800000800000}
# 1:20:IDR_COMPOSITECONTROL:102
# 1:20:IDB_COMPOSITECONTROL:101
# 1:20:IDD_COMPOSITECONTROL:103
# End Section

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "CPPVideoControl"=.\CPPVideoControl.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,202 @@
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Jul 23 18:31:14 2001
*/
/* Compiler settings for D:\DXSDK\samples\Multimedia\DirectShowXP\VideoControl\CPPVideoControl\CPPVideoControl.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 440
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __CPPVideoControl_h__
#define __CPPVideoControl_h__
#ifdef __cplusplus
extern "C"{
#endif
/* Forward Declarations */
#ifndef __ICompositeControl_FWD_DEFINED__
#define __ICompositeControl_FWD_DEFINED__
typedef interface ICompositeControl ICompositeControl;
#endif /* __ICompositeControl_FWD_DEFINED__ */
#ifndef __CompositeControl_FWD_DEFINED__
#define __CompositeControl_FWD_DEFINED__
#ifdef __cplusplus
typedef class CompositeControl CompositeControl;
#else
typedef struct CompositeControl CompositeControl;
#endif /* __cplusplus */
#endif /* __CompositeControl_FWD_DEFINED__ */
/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"
void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void __RPC_FAR * );
#ifndef __ICompositeControl_INTERFACE_DEFINED__
#define __ICompositeControl_INTERFACE_DEFINED__
/* interface ICompositeControl */
/* [unique][helpstring][dual][uuid][object] */
EXTERN_C const IID IID_ICompositeControl;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3E119535-D5AB-4520-B0E1-495B322E2A1A")
ICompositeControl : public IDispatch
{
public:
};
#else /* C style interface */
typedef struct ICompositeControlVtbl
{
BEGIN_INTERFACE
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )(
ICompositeControl __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )(
ICompositeControl __RPC_FAR * This);
ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )(
ICompositeControl __RPC_FAR * This);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )(
ICompositeControl __RPC_FAR * This,
/* [out] */ UINT __RPC_FAR *pctinfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )(
ICompositeControl __RPC_FAR * This,
/* [in] */ UINT iTInfo,
/* [in] */ LCID lcid,
/* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo);
HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )(
ICompositeControl __RPC_FAR * This,
/* [in] */ REFIID riid,
/* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
/* [in] */ UINT cNames,
/* [in] */ LCID lcid,
/* [size_is][out] */ DISPID __RPC_FAR *rgDispId);
/* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )(
ICompositeControl __RPC_FAR * This,
/* [in] */ DISPID dispIdMember,
/* [in] */ REFIID riid,
/* [in] */ LCID lcid,
/* [in] */ WORD wFlags,
/* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
/* [out] */ VARIANT __RPC_FAR *pVarResult,
/* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
/* [out] */ UINT __RPC_FAR *puArgErr);
END_INTERFACE
} ICompositeControlVtbl;
interface ICompositeControl
{
CONST_VTBL struct ICompositeControlVtbl __RPC_FAR *lpVtbl;
};
#ifdef COBJMACROS
#define ICompositeControl_QueryInterface(This,riid,ppvObject) \
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
#define ICompositeControl_AddRef(This) \
(This)->lpVtbl -> AddRef(This)
#define ICompositeControl_Release(This) \
(This)->lpVtbl -> Release(This)
#define ICompositeControl_GetTypeInfoCount(This,pctinfo) \
(This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
#define ICompositeControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \
(This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ICompositeControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \
(This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ICompositeControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \
(This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICompositeControl_INTERFACE_DEFINED__ */
#ifndef __CPPVIDEOCONTROLLib_LIBRARY_DEFINED__
#define __CPPVIDEOCONTROLLib_LIBRARY_DEFINED__
/* library CPPVIDEOCONTROLLib */
/* [helpstring][version][uuid] */
EXTERN_C const IID LIBID_CPPVIDEOCONTROLLib;
EXTERN_C const CLSID CLSID_CompositeControl;
#ifdef __cplusplus
class DECLSPEC_UUID("CDDFD429-EDFD-4C72-AE9C-B70FE6955051")
CompositeControl;
#endif
#endif /* __CPPVIDEOCONTROLLib_LIBRARY_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,47 @@
//------------------------------------------------------------------------------
// File: CPPVideoControl.idl
//
// Desc: IDL source for CPPVideoControl.dll
// for the Windows XP MSVidCtl C++ sample
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// This file will be processed by the MIDL tool to
// produce the type library (CPPVideoControl.tlb) and marshalling code.
import "oaidl.idl";
import "ocidl.idl";
#include "olectl.h"
[
object,
uuid(3E119535-D5AB-4520-B0E1-495B322E2A1A),
dual,
helpstring("ICompositeControl Interface"),
pointer_default(unique)
]
interface ICompositeControl : IDispatch
{
};
[
uuid(C03567A2-8044-40F0-8ABB-301A005F9FF1),
version(1.0),
helpstring("CPPVideoControl 1.0 Type Library")
]
library CPPVIDEOCONTROLLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(CDDFD429-EDFD-4C72-AE9C-B70FE6955051),
helpstring("CompositeControl Class")
]
coclass CompositeControl
{
[default] interface ICompositeControl;
};
};

View File

@@ -0,0 +1,190 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"1 TYPELIB ""CPPVideoControl.tlb""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 8,1,0,0
PRODUCTVERSION 8,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "This sample requires Windows XP or greater.\0"
VALUE "CompanyName", "Microsoft Corporation\0"
VALUE "FileDescription", "CPPVideoControl Module\0"
VALUE "FileVersion", "8.10\0"
VALUE "InternalName", "CPPVideoControl\0"
VALUE "LegalCopyright", "Copyright (C) 2001 Microsoft Corporation\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "CPPVideoControl.EXE\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "CPPVideoControl Module\0"
VALUE "ProductVersion", "8.1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_CPPVideoControl REGISTRY MOVEABLE PURE "CPPVideoControl.rgs"
IDR_COMPOSITECONTROL REGISTRY DISCARDABLE "CompositeControl.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_COMPOSITECONTROL DIALOGEX 0, 0, 191, 170
STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "MS Video Control - C++ Sample"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "",IDC_VIDEOCONTROL1,
"{B0EDF163-910A-11D2-B632-00C04F79498E}",WS_TABSTOP,13,
13,164,120
PUSHBUTTON "Channel &Down",IDC_CHANNELDOWN,13,136,57,25
PUSHBUTTON "Channel &Up",IDC_CHANNELUP,120,136,57,25
CTEXT "0",IDC_CHANNELID,74,147,42,11,SS_SUNKEN
CTEXT "Current:",IDC_STATIC,74,137,42,8
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//
IDD_COMPOSITECONTROL DLGINIT
BEGIN
IDC_VIDEOCONTROL1, 0x376, 34, 0
0x0000, 0x0000, 0x0300, 0x0000, 0x196d, 0x0000, 0x1427, 0x0000, 0x000b,
0x0000, 0x000b, 0xffff, 0x000b, 0xffff, 0x0013, 0x0000, 0x0000,
0
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_COMPOSITECONTROL, DIALOG
BEGIN
RIGHTMARGIN, 190
BOTTOMMARGIN, 169
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON DISCARDABLE "bda.ico"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_PROJNAME "CPPVideoControl"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB "CPPVideoControl.tlb"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,11 @@
HKCR
{
NoRemove AppID
{
{06751985-1ADD-416A-951E-2FEF4FAEFB2D} = s 'CPPVideoControl'
'CPPVideoControl.EXE'
{
val AppID = s {06751985-1ADD-416A-951E-2FEF4FAEFB2D}
}
}
}

View File

@@ -0,0 +1,50 @@
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Jul 23 18:31:14 2001
*/
/* Compiler settings for D:\DXSDK\samples\Multimedia\DirectShowXP\VideoControl\CPPVideoControl\CPPVideoControl.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID IID_ICompositeControl = {0x3E119535,0xD5AB,0x4520,{0xB0,0xE1,0x49,0x5B,0x32,0x2E,0x2A,0x1A}};
const IID LIBID_CPPVIDEOCONTROLLib = {0xC03567A2,0x8044,0x40F0,{0x8A,0xBB,0x30,0x1A,0x00,0x5F,0x9F,0xF1}};
const CLSID CLSID_CompositeControl = {0xCDDFD429,0xEDFD,0x4C72,{0xAE,0x9C,0xB7,0x0F,0xE6,0x95,0x50,0x51}};
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,207 @@
/* this ALWAYS GENERATED file contains the proxy stub code */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Jul 23 18:31:14 2001
*/
/* Compiler settings for D:\DXSDK\samples\Multimedia\DirectShowXP\VideoControl\CPPVideoControl\CPPVideoControl.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#define USE_STUBLESS_PROXY
/* verify that the <rpcproxy.h> version is high enough to compile this file*/
#ifndef __REDQ_RPCPROXY_H_VERSION__
#define __REQUIRED_RPCPROXY_H_VERSION__ 440
#endif
#include "rpcproxy.h"
#ifndef __RPCPROXY_H_VERSION__
#error this stub requires an updated version of <rpcproxy.h>
#endif // __RPCPROXY_H_VERSION__
#include "CPPVideoControl.h"
#define TYPE_FORMAT_STRING_SIZE 3
#define PROC_FORMAT_STRING_SIZE 1
typedef struct _MIDL_TYPE_FORMAT_STRING
{
short Pad;
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
} MIDL_TYPE_FORMAT_STRING;
typedef struct _MIDL_PROC_FORMAT_STRING
{
short Pad;
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
} MIDL_PROC_FORMAT_STRING;
extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
/* Object interface: IUnknown, ver. 0.0,
GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: IDispatch, ver. 0.0,
GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
/* Object interface: ICompositeControl, ver. 0.0,
GUID={0x3E119535,0xD5AB,0x4520,{0xB0,0xE1,0x49,0x5B,0x32,0x2E,0x2A,0x1A}} */
extern const MIDL_STUB_DESC Object_StubDesc;
#pragma code_seg(".orpc")
static const MIDL_STUB_DESC Object_StubDesc =
{
0,
NdrOleAllocate,
NdrOleFree,
0,
0,
0,
0,
0,
__MIDL_TypeFormatString.Format,
1, /* -error bounds_check flag */
0x20000, /* Ndr library version */
0,
0x50100a4, /* MIDL Version 5.1.164 */
0,
0,
0, /* notify & notify_flag routine table */
1, /* Flags */
0, /* Reserved3 */
0, /* Reserved4 */
0 /* Reserved5 */
};
CINTERFACE_PROXY_VTABLE(7) _ICompositeControlProxyVtbl =
{
0,
&IID_ICompositeControl,
IUnknown_QueryInterface_Proxy,
IUnknown_AddRef_Proxy,
IUnknown_Release_Proxy ,
0 /* (void *)-1 /* IDispatch::GetTypeInfoCount */ ,
0 /* (void *)-1 /* IDispatch::GetTypeInfo */ ,
0 /* (void *)-1 /* IDispatch::GetIDsOfNames */ ,
0 /* IDispatch_Invoke_Proxy */
};
static const PRPC_STUB_FUNCTION ICompositeControl_table[] =
{
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION,
STUB_FORWARDING_FUNCTION
};
CInterfaceStubVtbl _ICompositeControlStubVtbl =
{
&IID_ICompositeControl,
0,
7,
&ICompositeControl_table[-3],
CStdStubBuffer_DELEGATING_METHODS
};
#pragma data_seg(".rdata")
#if !defined(__RPC_WIN32__)
#error Invalid build platform for this stub.
#endif
#if !(TARGET_IS_NT40_OR_LATER)
#error You need a Windows NT 4.0 or later to run this stub because it uses these features:
#error -Oif or -Oicf, more than 32 methods in the interface.
#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
#error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
#endif
static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
{
0,
{
0x0
}
};
static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
{
0,
{
NdrFcShort( 0x0 ), /* 0 */
0x0
}
};
const CInterfaceProxyVtbl * _CPPVideoControl_ProxyVtblList[] =
{
( CInterfaceProxyVtbl *) &_ICompositeControlProxyVtbl,
0
};
const CInterfaceStubVtbl * _CPPVideoControl_StubVtblList[] =
{
( CInterfaceStubVtbl *) &_ICompositeControlStubVtbl,
0
};
PCInterfaceName const _CPPVideoControl_InterfaceNamesList[] =
{
"ICompositeControl",
0
};
const IID * _CPPVideoControl_BaseIIDList[] =
{
&IID_IDispatch,
0
};
#define _CPPVideoControl_CHECK_IID(n) IID_GENERIC_CHECK_IID( _CPPVideoControl, pIID, n)
int __stdcall _CPPVideoControl_IID_Lookup( const IID * pIID, int * pIndex )
{
if(!_CPPVideoControl_CHECK_IID(0))
{
*pIndex = 0;
return 1;
}
return 0;
}
const ExtendedProxyFileInfo CPPVideoControl_ProxyFileInfo =
{
(PCInterfaceProxyVtblList *) & _CPPVideoControl_ProxyVtblList,
(PCInterfaceStubVtblList *) & _CPPVideoControl_StubVtblList,
(const PCInterfaceName * ) & _CPPVideoControl_InterfaceNamesList,
(const IID ** ) & _CPPVideoControl_BaseIIDList,
& _CPPVideoControl_IID_Lookup,
1,
2,
0, /* table of [async_uuid] interfaces */
0, /* Filler1 */
0, /* Filler2 */
0 /* Filler3 */
};

View File

@@ -0,0 +1,11 @@
LIBRARY "CPPVideoControlPS"
DESCRIPTION 'Proxy/Stub DLL'
EXPORTS
DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
GetProxyDllInfo @3 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@@ -0,0 +1,260 @@
//------------------------------------------------------------------------------
// File: CompositeControl.cpp
//
// Desc: Implementation of the CCompositeControl
// for the Windows XP MSVidCtl C++ sample
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include "stdafx.h"
#include "CPPVideoControl.h"
#include "CompositeControl.h"
#include <atlbase.h>
#include <msvidctl.h>
#include <tuner.h>
#include <segment.h>
#define DEFAULT_CHANNEL 46
#define STR_VIEW_FAILURE TEXT("Failed IMSVidCtl::View. You may not have ") \
TEXT("properly installed your hardware. Your ATSC tuner card, ") \
TEXT("MPEG-2 decoder, or video card may be incompatible with ") \
TEXT("the MicrosoftTV Technologies architecture.")
/////////////////////////////////////////////////////////////////////////////
// CCompositeControl
LRESULT CCompositeControl::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HRESULT hr = S_OK;
ITuningSpace * pTuningSpace = NULL;
IEnumTuningSpaces * pEnumTuningSpaces = NULL;
ITuningSpace ** pTuningSpaceArray = NULL;
ULONG ulNumFetched = 0;
long lCount = 0;
ULONG i = 0;
CComBSTR bstrATSC = L"ATSC";
CComBSTR bstrTemp = L"";
// Get window handle of channel label (for later update)
m_hwndChannelID = GetDlgItem(IDC_CHANNELID);
// Get the tuning space collection
hr = CoCreateInstance(CLSID_SystemTuningSpaces, NULL,
CLSCTX_INPROC_SERVER, IID_ITuningSpaceContainer,
reinterpret_cast<void**>(&m_pTuningSpaceContainer));
if (FAILED(hr))
{
MessageBox(TEXT("Failed to create system tuning space."), TEXT("Error"), MB_OK);
return hr;
}
// Get the video control object
hr = GetDlgControl(IDC_VIDEOCONTROL1,IID_IMSVidCtl, reinterpret_cast<void **>(&m_pMSVidCtl));
if(m_pMSVidCtl == NULL)
{
MessageBox(TEXT("Failed to get Video Control on main dialog!"),TEXT("Error"),MB_OK);
return hr;
}
// Find the ATSC tuning space in the collection
hr = m_pTuningSpaceContainer->get_EnumTuningSpaces(&pEnumTuningSpaces);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to get tuning space enumerator."), TEXT("Error"), MB_OK);
return hr;
}
hr = m_pTuningSpaceContainer->get_Count(&lCount);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to enumerate tuning spaces."), TEXT("Error"), MB_OK);
return hr;
}
// Read tuning space info into allocated array
pTuningSpaceArray = new ITuningSpace*[lCount];
hr = pEnumTuningSpaces->Next(lCount, pTuningSpaceArray, &ulNumFetched);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to read tuning spaces."), TEXT("Error"), MB_OK);
return hr;
}
// Find the ATSC tuning space
for (i = 0;i < ulNumFetched; i++)
{
hr = pTuningSpaceArray[i]->get_UniqueName(&bstrTemp);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to read tuning space unique name."), TEXT("Error"), MB_OK);
return hr;
}
// Is this the ATSC tuning space?
if (bstrTemp == bstrATSC)
{
hr = pTuningSpaceArray[i]->Clone(&pTuningSpace);
break;
}
}
if (pTuningSpace == NULL)
{
MessageBox(TEXT("Could not find ATSC tuning space."), TEXT("Error"), MB_OK);
return hr;
}
// QI for IATSCTuningSpace
hr = pTuningSpace->QueryInterface(IID_IATSCTuningSpace, reinterpret_cast<void**>(&m_pATSCTuningSpace));
if (FAILED(hr))
{
MessageBox(TEXT("Failed to QI for IATSCTuningSpace."), TEXT("Error"), MB_OK);
return hr;
}
// Create ATSC Locator
hr = CoCreateInstance(CLSID_ATSCLocator, NULL,
CLSCTX_INPROC_SERVER, IID_IATSCLocator,
reinterpret_cast<void**>(&m_pATSCLocator));
if (FAILED(hr))
{
MessageBox(TEXT("Failed to create ATSC locator."), TEXT("Error"), MB_OK);
return hr;
}
hr = SetChannel(DEFAULT_CHANNEL);
if (FAILED(hr))
{
// SetChannel will give a message box indicating the error
return hr;
}
// Start viewing digital TV
hr = m_pMSVidCtl->Run();
if (FAILED(hr))
{
MessageBox(TEXT("Failed IMSVidCtl::Run. You may not have properly installed your hardware. Your ATSC tuner card, MPEG-2 decoder, or video card may be incompatible with the MicrosoftTV Technologies architecture."), TEXT("Error"), MB_OK);
return hr;
}
SAFE_RELEASE(pTuningSpace);
SAFE_RELEASE(pEnumTuningSpaces);
delete pTuningSpaceArray;
return hr;
};
LRESULT CCompositeControl::OnClickedChanneldown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
HRESULT hr = S_OK;
long lPhysicalChannel = 0;
// Get the current physical channel and decrement it
hr =m_pATSCLocator->get_PhysicalChannel(&lPhysicalChannel);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to read physical channel."), TEXT("Error"), MB_OK);
return hr;
}
lPhysicalChannel--;
hr = SetChannel(lPhysicalChannel);
return hr;
};
LRESULT CCompositeControl::OnClickedChannelup(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
HRESULT hr = S_OK;
long lPhysicalChannel = 0;
// Get the current physical channel and increment it
hr =m_pATSCLocator->get_PhysicalChannel(&lPhysicalChannel);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to read physical channel."), TEXT("Error"), MB_OK);
return hr;
}
lPhysicalChannel++;
hr = SetChannel(lPhysicalChannel);
return hr;
};
HRESULT CCompositeControl::SetChannel(long lPhysicalChannel)
{
HRESULT hr=S_OK;
IATSCChannelTuneRequest * pATSCTuneRequest = NULL;
ITuneRequest * pTuneRequest = NULL;
// Set the Physical Channel
hr =m_pATSCLocator->put_PhysicalChannel(lPhysicalChannel);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to set physical channel."), TEXT("Error"), MB_OK);
return hr;
}
// Create an ATSC tune request
hr = m_pATSCTuningSpace->CreateTuneRequest(&pTuneRequest);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to create tune request."), TEXT("Error"), MB_OK);
return hr;
}
hr = pTuneRequest->QueryInterface(IID_IATSCChannelTuneRequest, reinterpret_cast<void**>(&pATSCTuneRequest));
if (FAILED(hr))
{
MessageBox(TEXT("Failed to query for IATSCChannelTuneRequest."), TEXT("Error"), MB_OK);
return hr;
}
// Set the Channel and MinorChannel property on the tune request to -1
// These properties will get set by the network provider once tuned to a ATSC channel
hr = pATSCTuneRequest->put_Channel(-1);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to put channel property."), TEXT("Error"), MB_OK);
return hr;
}
hr = pATSCTuneRequest->put_MinorChannel(-1);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to put minor channel property."), TEXT("Error"), MB_OK);
return hr;
}
hr = pATSCTuneRequest->put_Locator(m_pATSCLocator);
if (FAILED(hr))
{
MessageBox(TEXT("Failed to put locator."), TEXT("Error"), MB_OK);
return hr;
}
// Now that the tune request is configured, pass it to the video control
CComVariant var = pATSCTuneRequest;
hr = m_pMSVidCtl->View(&var);
if (FAILED(hr))
{
MessageBox(STR_VIEW_FAILURE, TEXT("Error"), MB_OK);
return hr;
}
ShowChannelNumber(lPhysicalChannel);
// Release interfaces
pATSCTuneRequest->Release();
pTuneRequest->Release();
return hr;
}
void CCompositeControl::ShowChannelNumber(long lChannel)
{
TCHAR szChannelNumber[8];
wsprintf(szChannelNumber, TEXT("%d\0"), lChannel);
SetDlgItemText(IDC_CHANNELID, szChannelNumber);
}

View File

@@ -0,0 +1,137 @@
//------------------------------------------------------------------------------
// File: CompositeControl.h
//
// Desc: Declaration of the CCompositeControl
// for the Windows XP MSVidCtl C++ sample
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __COMPOSITECONTROL_H_
#define __COMPOSITECONTROL_H_
#include "resource.h" // main symbols
#include <atlctl.h>
#include <msvidctl.h>
#pragma warning(disable:4100) /* Disable 'unused parameter' warning */
#define SAFE_RELEASE(x) { if (x) { (x)->Release(); x=NULL; }}
/////////////////////////////////////////////////////////////////////////////
// CCompositeControl
class ATL_NO_VTABLE CCompositeControl :
public CComObjectRootEx<CComSingleThreadModel>,
public IDispatchImpl<ICompositeControl, &IID_ICompositeControl, &LIBID_CPPVIDEOCONTROLLib>,
public CComCompositeControl<CCompositeControl>,
public IPersistStreamInitImpl<CCompositeControl>,
public IOleControlImpl<CCompositeControl>,
public IOleObjectImpl<CCompositeControl>,
public IOleInPlaceActiveObjectImpl<CCompositeControl>,
public IViewObjectExImpl<CCompositeControl>,
public IOleInPlaceObjectWindowlessImpl<CCompositeControl>,
public IPersistStorageImpl<CCompositeControl>,
public ISpecifyPropertyPagesImpl<CCompositeControl>,
public IQuickActivateImpl<CCompositeControl>,
public IDataObjectImpl<CCompositeControl>,
public IProvideClassInfo2Impl<&CLSID_CompositeControl, NULL, &LIBID_CPPVIDEOCONTROLLib>,
public CComCoClass<CCompositeControl, &CLSID_CompositeControl>
{
public:
CCompositeControl()
{
m_bWindowOnly = TRUE;
CalcExtent(m_sizeExtent);
// Initialize internal data
m_pTuningSpaceContainer = NULL;
m_pATSCTuningSpace = NULL;
m_pATSCLocator = NULL;
m_pMSVidCtl = NULL;
m_hwndChannelID = NULL;
}
DECLARE_REGISTRY_RESOURCEID(IDR_COMPOSITECONTROL)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CCompositeControl)
COM_INTERFACE_ENTRY(ICompositeControl)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(IViewObjectEx)
COM_INTERFACE_ENTRY(IViewObject2)
COM_INTERFACE_ENTRY(IViewObject)
COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceObject)
COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
COM_INTERFACE_ENTRY(IOleControl)
COM_INTERFACE_ENTRY(IOleObject)
COM_INTERFACE_ENTRY(IPersistStreamInit)
COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
COM_INTERFACE_ENTRY(IQuickActivate)
COM_INTERFACE_ENTRY(IPersistStorage)
COM_INTERFACE_ENTRY(IDataObject)
COM_INTERFACE_ENTRY(IProvideClassInfo)
COM_INTERFACE_ENTRY(IProvideClassInfo2)
END_COM_MAP()
BEGIN_PROP_MAP(CCompositeControl)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
END_PROP_MAP()
BEGIN_MSG_MAP(CCompositeControl)
CHAIN_MSG_MAP(CComCompositeControl<CCompositeControl>)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_HANDLER(IDC_CHANNELDOWN, BN_CLICKED, OnClickedChanneldown)
COMMAND_HANDLER(IDC_CHANNELUP, BN_CLICKED, OnClickedChannelup)
COMMAND_ID_HANDLER(WM_CLOSE, OnExit)
MESSAGE_HANDLER(WM_SYSCOMMAND, OnSysCommand)
END_MSG_MAP()
// Handler prototypes:
LRESULT OnExit(WORD /*wNotifyCode*/, WORD /* wID */, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
BEGIN_SINK_MAP(CCompositeControl)
//Make sure the Event Handlers have __stdcall calling convention
END_SINK_MAP()
STDMETHOD(OnAmbientPropertyChange)(DISPID dispid)
{
if (dispid == DISPID_AMBIENT_BACKCOLOR)
{
SetBackgroundColorFromAmbient();
FireViewChange();
}
return IOleControlImpl<CCompositeControl>::OnAmbientPropertyChange(dispid);
}
// IViewObjectEx
DECLARE_VIEW_STATUS(0)
// ICompositeControl
public:
enum { IDD = IDD_COMPOSITECONTROL };
IMSVidCtl * m_pMSVidCtl;
ITuningSpaceContainer * m_pTuningSpaceContainer;
IATSCTuningSpace * m_pATSCTuningSpace;
IATSCLocator * m_pATSCLocator;
HWND m_hwndChannelID;
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnClickedChannelup(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnClickedChanneldown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
HRESULT SetChannel(long lChannel);
void ShowChannelNumber(long lChannel);
};
#endif //__COMPOSITECONTROL_H_

View File

@@ -0,0 +1,32 @@
HKCR
{
CPPVideoControl.CompositeControl.1 = s 'CompositeControl Class'
{
CLSID = s '{CDDFD429-EDFD-4C72-AE9C-B70FE6955051}'
}
CPPVideoControl.CompositeControl = s 'CompositeControl Class'
{
CLSID = s '{CDDFD429-EDFD-4C72-AE9C-B70FE6955051}'
CurVer = s 'CPPVideoControl.CompositeControl.1'
}
NoRemove CLSID
{
ForceRemove {CDDFD429-EDFD-4C72-AE9C-B70FE6955051} = s 'CompositeControl Class'
{
ProgID = s 'CPPVideoControl.CompositeControl.1'
VersionIndependentProgID = s 'CPPVideoControl.CompositeControl'
ForceRemove 'Programmable'
LocalServer32 = s '%MODULE%'
val AppID = s '{06751985-1ADD-416A-951E-2FEF4FAEFB2D}'
ForceRemove 'Control'
ForceRemove 'Insertable'
ForceRemove 'ToolboxBitmap32' = s '%MODULE%, 101'
'MiscStatus' = s '0'
{
'1' = s '131473'
}
'TypeLib' = s '{C03567A2-8044-40F0-8ABB-301A005F9FF1}'
'Version' = s '1.0'
}
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// File: stdafx.cpp
//
// Desc: Source file that includes just the standard includes
// stdafx.pch will be the pre-compiled header
// stdafx.obj will contain the precompiled type information
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// stdafx.cpp :
#include "stdafx.h"
#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
#include <statreg.cpp>
#endif
#include <atlimpl.cpp>
#include <atlctl.cpp>
#include <atlwin.cpp>

View File

@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// File: stdafx.h
//
// Desc: Include file for standard system include files
// or project specific include files that are used frequently
// but are changed infrequently
//
// Copyright (c) 2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#if !defined(AFX_STDAFX_H__CC50DE5B_97DF_4014_9C89_5E079D7AA958__INCLUDED_)
#define AFX_STDAFX_H__CC50DE5B_97DF_4014_9C89_5E079D7AA958__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED
#include <atlbase.h>
// Disable warning message for C4201 - use of nameless struct/union
// Otherwise, strmif.h will generate warnings for Win32 debug builds
#pragma warning( disable : 4201 )
// You may derive a class from CComModule and use it if you want to override
// something, but do not change the name of _Module
class CExeModule : public CComModule
{
public:
LONG Unlock();
DWORD dwThreadID;
HANDLE hEventShutdown;
void MonitorShutdown();
bool StartMonitor();
bool bActivity;
};
extern CExeModule _Module;
#include <atlcom.h>
#include <atlhost.h>
// Disable C4701: Variable may be used without having been initialized
// This warning is generated in atlctl.h, which is not in our control
#pragma warning( disable : 4701 )
#include <atlctl.h>
#pragma warning( default : 4701 )
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__CC50DE5B_97DF_4014_9C89_5E079D7AA958__INCLUDED)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,38 @@
/*********************************************************
DllData file -- generated by MIDL compiler
DO NOT ALTER THIS FILE
This file is regenerated by MIDL on every IDL file compile.
To completely reconstruct this file, delete it and rerun MIDL
on all the IDL files in this DLL, specifying this file for the
/dlldata command line option
*********************************************************/
#define PROXY_DELEGATION
#include <rpcproxy.h>
#ifdef __cplusplus
extern "C" {
#endif
EXTERN_PROXY_FILE( CPPVideoControl )
PROXYFILE_LIST_START
/* Start of list */
REFERENCE_PROXY_FILE( CPPVideoControl ),
/* End of list */
PROXYFILE_LIST_END
DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID )
#ifdef __cplusplus
} /*extern "C" */
#endif
/* end of generated dlldata file */

View File

@@ -0,0 +1,24 @@
Windows XP DirectShow Sample -- C++ VideoControl
------------------------------------------------
This sample demonstrates using the Microsoft Video Control to view
ATSC digital television in a window. This is a simple ATL application
that merely hosts the control and allows you to adjust the channel
up or down.
When CPPVideoControl launches, it will look for an ATSC Network
provider on your system. If a working tuner is found, CPPVideoControl
builds the digital television filter graph, tunes to channel 46,
and displays the broadcast signal. It may take several seconds to
completely build the digital television filter graph, so please be patient.
Requirements
------------
- Windows XP operating system
- BDA-compatible ATSC digital tuner card, such as the Broadlogic DTA-100 receiver.
- MPEG-2 decoder (for example, a software DVD decoder)

View File

@@ -0,0 +1,24 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by CPPVideoControl.rc
//
#define IDS_PROJNAME 100
#define IDR_CPPVideoControl 101
#define IDR_COMPOSITECONTROL 102
#define IDD_COMPOSITECONTROL 103
#define IDC_VIDEOCONTROL1 201
#define IDC_CHANNELUP 202
#define IDC_CHANNELDOWN 203
#define IDI_ICON 204
#define IDC_CHANNELID 205
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 205
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 206
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif