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:
296
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.cpp
Normal file
296
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.cpp
Normal file
@@ -0,0 +1,296 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: ddenum.cpp
|
||||
//
|
||||
// Desc: This sample demonstrates how to enumerate all of the devices and show
|
||||
// the driver information about each.
|
||||
//
|
||||
//
|
||||
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
#include <ddraw.h>
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Defines, constants, and global variables
|
||||
//-----------------------------------------------------------------------------
|
||||
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
|
||||
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
|
||||
|
||||
#define MAX_DEVICES 32
|
||||
|
||||
struct DEVICEIDENT_STRUCT
|
||||
{
|
||||
DDDEVICEIDENTIFIER2 DeviceInfo;
|
||||
DDDEVICEIDENTIFIER2 DeviceInfoHost;
|
||||
};
|
||||
|
||||
DEVICEIDENT_STRUCT g_DeviceIdent[MAX_DEVICES];
|
||||
int g_iMaxDevices = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: UpdateInfoDlgText()
|
||||
// Desc: Update all of the text and buttons in the dialog
|
||||
//-----------------------------------------------------------------------------
|
||||
void UpdateInfoDlgText( HWND hDlg, int iCurrent, DWORD dwHost )
|
||||
{
|
||||
TCHAR strBuffer[128];
|
||||
GUID* pGUID;
|
||||
LPDDDEVICEIDENTIFIER2 pDI;
|
||||
|
||||
if( dwHost == DDGDI_GETHOSTIDENTIFIER )
|
||||
CheckRadioButton( hDlg, IDC_RADIO_DEVICE, IDC_RADIO_HOST, IDC_RADIO_HOST );
|
||||
else
|
||||
CheckRadioButton( hDlg, IDC_RADIO_DEVICE, IDC_RADIO_DEVICE, IDC_RADIO_DEVICE );
|
||||
|
||||
pDI = &g_DeviceIdent[iCurrent].DeviceInfo;
|
||||
if( dwHost == DDGDI_GETHOSTIDENTIFIER )
|
||||
pDI = &g_DeviceIdent[iCurrent].DeviceInfoHost;
|
||||
|
||||
wsprintf( strBuffer, "Device information for device %d of %d",
|
||||
iCurrent + 1, g_iMaxDevices );
|
||||
SetDlgItemText( hDlg, IDC_RADIO_DEVICE, strBuffer );
|
||||
|
||||
// Device ID stuff:
|
||||
wsprintf( strBuffer,"%08X",pDI->dwVendorId );
|
||||
SetDlgItemText( hDlg, IDC_DWVENDORID, strBuffer );
|
||||
|
||||
wsprintf( strBuffer,"%08X",pDI->dwDeviceId );
|
||||
SetDlgItemText( hDlg, IDC_DWDEVICEID, strBuffer );
|
||||
|
||||
wsprintf( strBuffer,"%08X",pDI->dwSubSysId );
|
||||
SetDlgItemText( hDlg, IDC_DWSUBSYS, strBuffer );
|
||||
|
||||
wsprintf( strBuffer,"%08X",pDI->dwRevision );
|
||||
SetDlgItemText( hDlg, IDC_DWREVISION, strBuffer );
|
||||
|
||||
// Driver version:
|
||||
wsprintf( strBuffer, "%d.%02d.%02d.%04d",
|
||||
HIWORD( pDI->liDriverVersion.u.HighPart ),
|
||||
LOWORD( pDI->liDriverVersion.u.HighPart ),
|
||||
HIWORD( pDI->liDriverVersion.u.LowPart ),
|
||||
LOWORD( pDI->liDriverVersion.u.LowPart ) );
|
||||
SetDlgItemText( hDlg, IDC_VERSION, strBuffer );
|
||||
|
||||
// Device description and HAL filename
|
||||
SetDlgItemText( hDlg, IDC_DESCRIPTION, pDI->szDescription );
|
||||
SetDlgItemText( hDlg, IDC_FILENAME, pDI->szDriver );
|
||||
|
||||
// Unique driver/device identifier:
|
||||
pGUID = &pDI->guidDeviceIdentifier;
|
||||
wsprintf( strBuffer, "%08X-%04X-%04X-%02X%02X%02X%02X%02X%02X%02X%02X",
|
||||
pGUID->Data1,
|
||||
pGUID->Data2,
|
||||
pGUID->Data3,
|
||||
pGUID->Data4[0], pGUID->Data4[1], pGUID->Data4[2], pGUID->Data4[3],
|
||||
pGUID->Data4[4], pGUID->Data4[5], pGUID->Data4[6], pGUID->Data4[7] );
|
||||
SetDlgItemText( hDlg, IDC_GUID, strBuffer );
|
||||
|
||||
// WHQL Level
|
||||
wsprintf( strBuffer,"%08x", pDI->dwWHQLLevel );
|
||||
SetDlgItemText( hDlg, IDC_STATIC_WHQLLEVEL, strBuffer );
|
||||
|
||||
// Change the state and style of the Prev and Next buttons if needed
|
||||
HWND hNext = GetDlgItem( hDlg, IDC_NEXT );
|
||||
HWND hPrev = GetDlgItem( hDlg, IDC_PREV );
|
||||
|
||||
if( 0 == iCurrent )
|
||||
{
|
||||
// The Prev button should be disabled
|
||||
SetFocus( GetDlgItem( hDlg, IDOK ) );
|
||||
SendDlgItemMessage( hDlg, IDC_PREV, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
|
||||
SendMessage( hDlg, DM_SETDEFID, IDOK, 0 );
|
||||
EnableWindow( hPrev, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsWindowEnabled( hPrev ) == FALSE )
|
||||
EnableWindow( hPrev, TRUE );
|
||||
}
|
||||
|
||||
if( iCurrent >= (g_iMaxDevices - 1) )
|
||||
{
|
||||
// The Next button should be disabled
|
||||
SetFocus( GetDlgItem( hDlg, IDOK ) );
|
||||
SendDlgItemMessage( hDlg, IDC_NEXT, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
|
||||
SendMessage(hDlg, DM_SETDEFID, IDOK, 0 );
|
||||
EnableWindow( hNext, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsWindowEnabled( hNext ) == FALSE)
|
||||
EnableWindow( hNext, TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: InfoDlgProc()
|
||||
// Desc: The dialog window proc
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL CALLBACK InfoDlgProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
static int iCurrent = 0;
|
||||
static DWORD dwHost = 0;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
// Setup the first devices text
|
||||
UpdateInfoDlgText( hDlg, iCurrent, dwHost );
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDOK:
|
||||
case IDCANCEL:
|
||||
EndDialog( hDlg, TRUE );
|
||||
break;
|
||||
|
||||
case IDC_PREV:
|
||||
// Show the previous device
|
||||
if( iCurrent )
|
||||
iCurrent--;
|
||||
|
||||
UpdateInfoDlgText( hDlg, iCurrent, dwHost );
|
||||
break;
|
||||
|
||||
case IDC_NEXT:
|
||||
// Show the next device
|
||||
if( iCurrent < g_iMaxDevices )
|
||||
iCurrent++;
|
||||
|
||||
UpdateInfoDlgText( hDlg, iCurrent, dwHost );
|
||||
break;
|
||||
|
||||
case IDC_RADIO_HOST:
|
||||
dwHost = DDGDI_GETHOSTIDENTIFIER;
|
||||
|
||||
UpdateInfoDlgText( hDlg, iCurrent, dwHost );
|
||||
break;
|
||||
|
||||
case IDC_RADIO_DEVICE:
|
||||
dwHost = 0;
|
||||
|
||||
UpdateInfoDlgText( hDlg, iCurrent, dwHost );
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE; // Message not handled
|
||||
}
|
||||
|
||||
default:
|
||||
return FALSE; // Message not handled
|
||||
}
|
||||
|
||||
return TRUE; // Message handled
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: DDEnumCallbackEx()
|
||||
// Desc: This callback gets the information for each device enumerated
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL WINAPI DDEnumCallbackEx( GUID *pGUID, LPSTR pDescription, LPSTR strName,
|
||||
LPVOID pContext, HMONITOR hm )
|
||||
{
|
||||
LPDIRECTDRAW7 pDD = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
// Create a DirectDraw object using the enumerated GUID
|
||||
if( FAILED( hr = DirectDrawCreateEx( pGUID, (VOID**)&pDD,
|
||||
IID_IDirectDraw7, NULL ) ) )
|
||||
return DDENUMRET_CANCEL;
|
||||
|
||||
// Get the device information and save it
|
||||
pDD->GetDeviceIdentifier( &g_DeviceIdent[g_iMaxDevices].DeviceInfo, 0 );
|
||||
pDD->GetDeviceIdentifier( &g_DeviceIdent[g_iMaxDevices].DeviceInfoHost,
|
||||
DDGDI_GETHOSTIDENTIFIER );
|
||||
|
||||
// Finished with the DirectDraw object, so release it
|
||||
SAFE_RELEASE( pDD );
|
||||
|
||||
// Bump to the next open slot or finish the callbacks if full
|
||||
if( g_iMaxDevices < MAX_DEVICES )
|
||||
g_iMaxDevices++;
|
||||
else
|
||||
return DDENUMRET_CANCEL;
|
||||
|
||||
return DDENUMRET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: DDEnumCallback()
|
||||
// Desc: Old style callback retained for backwards compatibility
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL WINAPI DDEnumCallback( GUID *pGUID, LPSTR pDescription,
|
||||
LPSTR strName, LPVOID pContext )
|
||||
{
|
||||
return ( DDEnumCallbackEx( pGUID, pDescription, strName, pContext, NULL ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: WinMain()
|
||||
// Desc: Entry point to the program. Initializes everything and calls
|
||||
// DirectDrawEnumerateEx() to get all of the device info.
|
||||
//-----------------------------------------------------------------------------
|
||||
int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pCmdLine, int nCmdShow )
|
||||
{
|
||||
LPDIRECTDRAWENUMERATEEX pDirectDrawEnumerateEx;
|
||||
HINSTANCE hDDrawDLL = NULL;
|
||||
|
||||
// Do a GetModuleHandle and GetProcAddress in order to get the
|
||||
// DirectDrawEnumerateEx function
|
||||
hDDrawDLL = GetModuleHandle("DDRAW");
|
||||
if( NULL == hDDrawDLL )
|
||||
{
|
||||
MessageBox( NULL, "LoadLibrary() FAILED",
|
||||
"DirectDraw Sample", MB_OK | MB_ICONERROR );
|
||||
return -1;
|
||||
}
|
||||
|
||||
pDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress( hDDrawDLL, "DirectDrawEnumerateExA" );
|
||||
if( pDirectDrawEnumerateEx )
|
||||
{
|
||||
pDirectDrawEnumerateEx( DDEnumCallbackEx, NULL,
|
||||
DDENUM_ATTACHEDSECONDARYDEVICES |
|
||||
DDENUM_DETACHEDSECONDARYDEVICES |
|
||||
DDENUM_NONDISPLAYDEVICES );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Old DirectDraw, so do it the old way
|
||||
DirectDrawEnumerate( DDEnumCallback, NULL );
|
||||
}
|
||||
|
||||
if( 0 == g_iMaxDevices )
|
||||
{
|
||||
MessageBox( NULL, "No devices to enumerate.",
|
||||
"DirectDraw Sample", MB_OK | MB_ICONERROR );
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Bring up the dialog to show all the devices
|
||||
DialogBox( hInst, MAKEINTRESOURCE(IDD_DRIVERINFO),
|
||||
GetDesktopWindow(), (DLGPROC)InfoDlgProc );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
119
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.dsp
Normal file
119
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.dsp
Normal file
@@ -0,0 +1,119 @@
|
||||
# Microsoft Developer Studio Project File - Name="DDEnum" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=DDEnum - Win32 Release
|
||||
!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 "ddenum.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 "ddenum.mak" CFG="DDEnum - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "DDEnum - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "DDEnum - Win32 Debug" (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)" == "DDEnum - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
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 /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ELSEIF "$(CFG)" == "DDEnum - 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 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
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 /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "DDEnum - Win32 Release"
|
||||
# Name "DDEnum - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ddenum.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ddenum.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DirectX.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
29
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.dsw
Normal file
29
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "DDEnum"=.\ddenum.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
201
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.mak
Normal file
201
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.mak
Normal file
@@ -0,0 +1,201 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on ddenum.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=DDEnum - Win32 Release
|
||||
!MESSAGE No configuration specified. Defaulting to DDEnum - Win32 Release.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "DDEnum - Win32 Release" && "$(CFG)" != "DDEnum - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!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 "ddenum.mak" CFG="DDEnum - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "DDEnum - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "DDEnum - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "DDEnum - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\ddenum.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\ddenum.obj"
|
||||
-@erase "$(INTDIR)\ddenum.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\ddenum.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\ddenum.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ddenum.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\ddenum.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ddenum.pdb" /machine:I386 /out:"$(OUTDIR)\ddenum.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\ddenum.obj" \
|
||||
"$(INTDIR)\ddenum.res"
|
||||
|
||||
"$(OUTDIR)\ddenum.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "DDEnum - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\ddenum.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\ddenum.obj"
|
||||
-@erase "$(INTDIR)\ddenum.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\ddenum.exe"
|
||||
-@erase "$(OUTDIR)\ddenum.ilk"
|
||||
-@erase "$(OUTDIR)\ddenum.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\ddenum.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ddenum.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\ddenum.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\ddenum.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ddenum.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\ddenum.obj" \
|
||||
"$(INTDIR)\ddenum.res"
|
||||
|
||||
"$(OUTDIR)\ddenum.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("ddenum.dep")
|
||||
!INCLUDE "ddenum.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "ddenum.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "DDEnum - Win32 Release" || "$(CFG)" == "DDEnum - Win32 Debug"
|
||||
SOURCE=.\ddenum.cpp
|
||||
|
||||
"$(INTDIR)\ddenum.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
SOURCE=.\ddenum.rc
|
||||
|
||||
"$(INTDIR)\ddenum.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
134
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.rc
Normal file
134
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/ddenum.rc
Normal file
@@ -0,0 +1,134 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include <windows.h>
|
||||
#include <afxres.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
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DRIVERINFO DIALOG DISCARDABLE 0, 0, 199, 188
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Device Information"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
PUSHBUTTON "<< &Prev",IDC_PREV,7,167,50,14
|
||||
DEFPUSHBUTTON "Close",IDOK,71,167,55,14
|
||||
PUSHBUTTON "&Next >>",IDC_NEXT,142,167,50,14
|
||||
RTEXT "Version:",IDC_STATIC,18,80,58,8
|
||||
RTEXT "Description:",IDC_STATIC,7,33,42,20
|
||||
RTEXT "File Name:",IDC_STATIC,10,90,66,8
|
||||
LTEXT "4.00.00.0000",IDC_VERSION,81,80,109,8
|
||||
LTEXT "This is a temp test driver id sttring that is very long and might go over two lines",
|
||||
IDC_DESCRIPTION,52,33,140,24
|
||||
LTEXT "Static",IDC_FILENAME,82,90,102,8
|
||||
RTEXT "GUID:",IDC_STATIC,7,59,24,8
|
||||
RTEXT "Vendor ID:",IDC_STATIC,10,115,49,8
|
||||
LTEXT "00000000",IDC_DWVENDORID,65,115,34,8
|
||||
GROUPBOX "Driver Properties",IDC_STATIC,7,70,185,33
|
||||
GROUPBOX "Device Identifiers",IDC_STATIC,7,104,185,34
|
||||
RTEXT "Device ID:",IDC_STATIC,10,125,49,8
|
||||
LTEXT "00000000",IDC_DWDEVICEID,65,125,34,8
|
||||
RTEXT "SubSys ID:",IDC_STATIC,105,115,40,8
|
||||
RTEXT "Revision:",IDC_STATIC,105,125,40,8
|
||||
LTEXT "00000000",IDC_DWSUBSYS,150,115,40,8
|
||||
LTEXT "00000000",IDC_DWREVISION,150,125,40,8
|
||||
LTEXT "00000000-0000-0000-00000000",IDC_GUID,36,59,156,8
|
||||
CONTROL "Device information for device %d of %d",
|
||||
IDC_RADIO_DEVICE,"Button",BS_AUTORADIOBUTTON,44,7,148,10
|
||||
CONTROL "Host",IDC_RADIO_HOST,"Button",BS_AUTORADIOBUTTON,44,16,
|
||||
78,10
|
||||
RTEXT "Show",IDC_STATIC,7,7,34,8
|
||||
GROUPBOX "WHQL Certification Level",IDC_STATIC,7,139,185,22
|
||||
LTEXT "Level:",IDC_STATIC,56,148,20,8
|
||||
LTEXT "00000000",IDC_STATIC_WHQLLEVEL,83,148,33,8
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_MAIN_ICON ICON DISCARDABLE "DirectX.ico"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include <windows.h>\r\n"
|
||||
"#include <afxres.h>\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DRIVERINFO, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 192
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 181
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
BIN
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/directx.ico
Normal file
BIN
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/directx.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
28
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/readme.txt
Normal file
28
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/readme.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Sample Name: DDEnum Sample
|
||||
//
|
||||
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Description
|
||||
===========
|
||||
This sample shows how to enumerate the current DirectDraw devices and how to
|
||||
get information using the IDirectDraw4::GetDeviceIdentifier method.
|
||||
|
||||
Path
|
||||
====
|
||||
Source: DXSDK\Samples\Multimedia\DDraw\DDEnum
|
||||
|
||||
Executable: DXSDK\Samples\Multimedia\DDraw\Bin
|
||||
|
||||
User's Guide
|
||||
============
|
||||
The user interface is a simple dialog box. Two buttons, Prev and Next,
|
||||
display information for the previous or next device that was enumerated.
|
||||
Click the Close button to exit the application.
|
||||
|
||||
|
||||
|
||||
33
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/resource.h
Normal file
33
Library/dxx8/samples/Multimedia/DirectDraw/DDEnum/resource.h
Normal file
@@ -0,0 +1,33 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by ddenum.rc
|
||||
//
|
||||
#define IDI_MAIN_ICON 101
|
||||
#define IDD_DRIVERINFO 102
|
||||
#define IDC_PREV 1001
|
||||
#define IDC_NEXT 1002
|
||||
#define IDC_DEVICEID 1003
|
||||
#define IDC_VERSION 1004
|
||||
#define IDC_DESCRIPTION 1005
|
||||
#define IDC_FILENAME 1006
|
||||
#define IDC_COUNT 1007
|
||||
#define IDC_GUID 1010
|
||||
#define IDC_DWVENDORID 1012
|
||||
#define IDC_DWDEVICEID 1014
|
||||
#define IDC_DWSUBSYS 1015
|
||||
#define IDC_DWREVISION 1016
|
||||
#define IDC_RADIO_DEVICE 1018
|
||||
#define IDC_RADIO_HOST 1019
|
||||
#define IDC_STATIC_WHQLLEVEL 1020
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1021
|
||||
#define _APS_NEXT_SYMED_VALUE 103
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user