Sync with trunk (aka 'I want my virtualbox mouse integration too')

svn path=/branches/reactos-yarotows/; revision=46732
This commit is contained in:
Jérôme Gardou 2010-04-05 09:59:21 +00:00
commit 6638a5b899
170 changed files with 8792 additions and 2792 deletions

View file

@ -869,6 +869,7 @@ void TaskManager_OnTabWndSelChange(void)
HMENU hViewMenu; HMENU hViewMenu;
HMENU hSubMenu; HMENU hSubMenu;
WCHAR szTemp[256]; WCHAR szTemp[256];
SYSTEM_INFO sysInfo;
hMenu = GetMenu(hMainWnd); hMenu = GetMenu(hMainWnd);
hViewMenu = GetSubMenu(hMenu, 2); hViewMenu = GetSubMenu(hMenu, 2);
@ -947,6 +948,12 @@ void TaskManager_OnTabWndSelChange(void)
DeleteMenu(hMenu, 3, MF_BYPOSITION); DeleteMenu(hMenu, 3, MF_BYPOSITION);
DrawMenuBar(hMainWnd); DrawMenuBar(hMainWnd);
} }
GetSystemInfo(&sysInfo);
/* Hide CPU graph options on single CPU systems */
if (sysInfo.dwNumberOfProcessors > 1)
{
hSubMenu = CreatePopupMenu(); hSubMenu = CreatePopupMenu();
LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256); LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
@ -958,6 +965,12 @@ void TaskManager_OnTabWndSelChange(void)
LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256); LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp); AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
if (TaskManagerSettings.CPUHistory_OneGraphPerCPU)
CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, MF_BYCOMMAND);
else
CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHALL, MF_BYCOMMAND);
}
LoadStringW(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256); LoadStringW(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256);
AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp); AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
@ -965,10 +978,7 @@ void TaskManager_OnTabWndSelChange(void)
CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED); CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED);
else else
CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_UNCHECKED); CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_UNCHECKED);
if (TaskManagerSettings.CPUHistory_OneGraphPerCPU)
CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, MF_BYCOMMAND);
else
CheckMenuRadioItem(hSubMenu, ID_VIEW_CPUHISTORY_ONEGRAPHALL, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, ID_VIEW_CPUHISTORY_ONEGRAPHALL, MF_BYCOMMAND);
/* /*
* Give the tab control focus * Give the tab control focus
*/ */

View file

@ -166,7 +166,7 @@ VOID ConOutChar (TCHAR c)
VOID ConPuts(LPTSTR szText, DWORD nStdHandle) VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
{ {
ConWrite(szText, _tcslen(szText), nStdHandle); ConWrite(szText, _tcslen(szText), nStdHandle);
ConWrite(_T("\n"), 1, nStdHandle); ConWrite(_T("\r\n"), 2, nStdHandle);
} }
VOID ConOutResPaging(BOOL NewPage, UINT resID) VOID ConOutResPaging(BOOL NewPage, UINT resID)

View file

@ -703,7 +703,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
LastSpace = i; LastSpace = i;
} }
/* insert the quoation and move things around */ /* insert the quotation and move things around */
if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1) if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
{ {
memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) ); memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) );
@ -715,11 +715,14 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
szPrefix[LastSpace + 1] = _T('\"'); szPrefix[LastSpace + 1] = _T('\"');
} }
else if(LastSpace == -1) else if(LastSpace == -1)
{
/* Add quotation only if none exists already */
if (szPrefix[0] != _T('\"'))
{ {
_tcscpy(szBaseWord,_T("\"")); _tcscpy(szBaseWord,_T("\""));
_tcscat(szBaseWord,szPrefix); _tcscat(szBaseWord,szPrefix);
_tcscpy(szPrefix,szBaseWord); _tcscpy(szPrefix,szBaseWord);
}
} }
} }

View file

@ -363,6 +363,12 @@ _tmain(int argc, TCHAR *argv[])
PrintWin32Error( szMsg, GetLastError()); PrintWin32Error( szMsg, GetLastError());
return -1; return -1;
} }
else if ( driveType == 1 )
{
LoadString( GetModuleHandle(NULL), STRING_NO_VOLUME, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
PrintWin32Error( szMsg, GetLastError());
return -1;
}
if( driveType != DRIVE_FIXED ) { if( driveType != DRIVE_FIXED ) {
LoadString( GetModuleHandle(NULL), STRING_INSERT_DISK, (LPTSTR) szMsg,RC_STRING_MAX_SIZE); LoadString( GetModuleHandle(NULL), STRING_INSERT_DISK, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);

View file

@ -487,11 +487,13 @@ drivers\base\beep\beep.sys 2
drivers\base\null\null.sys 2 drivers\base\null\null.sys 2
drivers\base\nmidebug\nmidebug.sys 2 drivers\base\nmidebug\nmidebug.sys 2
drivers\battery\cmbatt\cmbatt.sys 2
drivers\battery\battc\battc.sys 2 drivers\battery\battc\battc.sys 2
drivers\bus\isapnp\isapnp.sys 2 drivers\bus\isapnp\isapnp.sys 2
drivers\bus\acpi\cmbatt\cmbatt.sys 2
drivers\bus\acpi\compbatt\compbatt.sys 2
drivers\directx\dxapi\dxapi.sys 2 drivers\directx\dxapi\dxapi.sys 2
drivers\directx\dxg\dxg.sys 2 drivers\directx\dxg\dxg.sys 2
drivers\directx\dxgthk\dxgthk.sys 2 drivers\directx\dxgthk\dxgthk.sys 2

View file

@ -76,7 +76,7 @@ hal.dll=,,,,,,,,,,,,2
[Files.pci_mp] [Files.pci_mp]
ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2 ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2
halmp.dll=,,,,,,,,,,hal.dll,,2 halmps.dll=,,,,,,,,,,hal.dll,,2
[Display] [Display]
;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp> ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>

View file

@ -1419,10 +1419,10 @@ DetectSerialPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
/* Set Interrupt */ /* Set Interrupt */
PartialDescriptor = &PartialResourceList->PartialDescriptors[1]; PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
PartialDescriptor->Type = CmResourceTypeInterrupt; PartialDescriptor->Type = CmResourceTypeInterrupt;
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; PartialDescriptor->ShareDisposition = CmResourceShareShared;
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED; PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialDescriptor->u.Interrupt.Level = Irq[i]; PartialDescriptor->u.Interrupt.Level = Irq[i];
PartialDescriptor->u.Interrupt.Vector = 0; PartialDescriptor->u.Interrupt.Vector = Irq[i];
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF; PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
/* Set serial data (device specific) */ /* Set serial data (device specific) */
@ -1529,7 +1529,7 @@ DetectParallelPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED; PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialDescriptor->u.Interrupt.Level = Irq[i]; PartialDescriptor->u.Interrupt.Level = Irq[i];
PartialDescriptor->u.Interrupt.Vector = 0; PartialDescriptor->u.Interrupt.Vector = Irq[i];
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF; PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
} }
@ -1715,7 +1715,7 @@ DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED; PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialDescriptor->u.Interrupt.Level = 1; PartialDescriptor->u.Interrupt.Level = 1;
PartialDescriptor->u.Interrupt.Vector = 0; PartialDescriptor->u.Interrupt.Vector = 1;
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF; PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
/* Set IO Port 0x60 */ /* Set IO Port 0x60 */
@ -1887,7 +1887,7 @@ DetectPS2Mouse(PCONFIGURATION_COMPONENT_DATA BusKey)
PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareUndetermined; PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareUndetermined;
PartialResourceList.PartialDescriptors[0].Flags = CM_RESOURCE_INTERRUPT_LATCHED; PartialResourceList.PartialDescriptors[0].Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialResourceList.PartialDescriptors[0].u.Interrupt.Level = 12; PartialResourceList.PartialDescriptors[0].u.Interrupt.Level = 12;
PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 0; PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 12;
PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF; PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF;
/* Create controller key */ /* Create controller key */

View file

@ -48,6 +48,7 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "mmddk.h" #include "mmddk.h"
#include <regstr.h>
WINE_DEFAULT_DEBUG_CHANNEL(devenum); WINE_DEFAULT_DEBUG_CHANNEL(devenum);
@ -124,6 +125,7 @@ HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
WCHAR wszRegKey[MAX_PATH]; WCHAR wszRegKey[MAX_PATH];
HKEY hkey; HKEY hkey;
HKEY hbasekey; HKEY hbasekey;
BOOL bInterface = FALSE;
CreateDevEnumImpl *This = (CreateDevEnumImpl *)iface; CreateDevEnumImpl *This = (CreateDevEnumImpl *)iface;
TRACE("(%p)->(%s, %p, %lx)\n\tDeviceClass:\t%s\n", This, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags, debugstr_guid(clsidDeviceClass)); TRACE("(%p)->(%s, %p, %lx)\n\tDeviceClass:\t%s\n", This, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags, debugstr_guid(clsidDeviceClass));
@ -173,13 +175,24 @@ HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
} }
} }
else else
{
wcscpy(wszRegKey, REGSTR_PATH_DEVICE_CLASSES);
wcscat(wszRegKey, L"\\");
if (!StringFromGUID2(clsidDeviceClass, wszRegKey + wcslen(wszRegKey), MAX_PATH - CLSID_STR_LEN))
return E_OUTOFMEMORY;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRegKey, 0, KEY_READ, &hkey) != ERROR_SUCCESS)
{ {
FIXME("Category %s not found\n", debugstr_guid(clsidDeviceClass)); FIXME("Category %s not found\n", debugstr_guid(clsidDeviceClass));
return S_FALSE; return S_FALSE;
} }
bInterface = TRUE;
}
} }
return DEVENUM_IEnumMoniker_Construct(hkey, ppEnumMoniker); return DEVENUM_IEnumMoniker_Construct(hkey, ppEnumMoniker, bInterface);
} }
/********************************************************************** /**********************************************************************

View file

@ -71,6 +71,7 @@ typedef struct
LONG ref; LONG ref;
DWORD index; DWORD index;
HKEY hkey; HKEY hkey;
BOOL bInterface;
} EnumMonikerImpl; } EnumMonikerImpl;
typedef struct typedef struct
@ -79,10 +80,11 @@ typedef struct
LONG ref; LONG ref;
HKEY hkey; HKEY hkey;
BOOL bInterface;
} MediaCatMoniker; } MediaCatMoniker;
MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void); MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void);
HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker); HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker, BOOL bInterface);
HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator( HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
ICreateDevEnum * iface, ICreateDevEnum * iface,
REFCLSID clsidDeviceClass, REFCLSID clsidDeviceClass,

View file

@ -42,6 +42,7 @@ typedef struct
IPropertyBagVtbl *lpVtbl; IPropertyBagVtbl *lpVtbl;
LONG ref; LONG ref;
HKEY hkey; HKEY hkey;
BOOL bInterface;
} RegPropBagImpl; } RegPropBagImpl;
@ -108,13 +109,31 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
RegPropBagImpl *This = (RegPropBagImpl *)iface; RegPropBagImpl *This = (RegPropBagImpl *)iface;
HRESULT res = S_OK; HRESULT res = S_OK;
LONG reswin32; LONG reswin32;
WCHAR buffer[MAX_PATH];
HKEY hkey;
LPCOLESTR pszName;
TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog); TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog);
if (!pszPropName || !pVar) if (!pszPropName || !pVar)
return E_POINTER; return E_POINTER;
reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, NULL, NULL, &received); hkey = This->hkey;
pszName = pszPropName;
if (This->bInterface)
{
buffer[0] = 0;
received = sizeof(buffer)/sizeof(WCHAR);
reswin32 = RegEnumKeyEx(This->hkey, 0, buffer, &received, NULL, NULL, NULL, NULL);
reswin32 = RegOpenKeyExW(This->hkey, buffer, 0, KEY_READ, &hkey);
if (!wcsicmp(pszPropName, L"DevicePath"))
pszName = L"SymbolicLink";
}
reswin32 = RegQueryValueExW(hkey, pszName, NULL, NULL, NULL, &received);
res = HRESULT_FROM_WIN32(reswin32); res = HRESULT_FROM_WIN32(reswin32);
if (SUCCEEDED(res)) if (SUCCEEDED(res))
@ -122,7 +141,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
pData = HeapAlloc(GetProcessHeap(), 0, received); pData = HeapAlloc(GetProcessHeap(), 0, received);
/* work around a GCC bug that occurs here unless we use the reswin32 variable as well */ /* work around a GCC bug that occurs here unless we use the reswin32 variable as well */
reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, pData, &received); reswin32 = RegQueryValueExW(hkey, pszName, NULL, &type, pData, &received);
res = HRESULT_FROM_WIN32(reswin32); res = HRESULT_FROM_WIN32(reswin32);
} }
@ -201,6 +220,9 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
if (pData) if (pData)
HeapFree(GetProcessHeap(), 0, pData); HeapFree(GetProcessHeap(), 0, pData);
if (This->bInterface)
RegCloseKey(hkey);
TRACE("<- %lx\n", res); TRACE("<- %lx\n", res);
return res; return res;
} }
@ -270,7 +292,7 @@ static IPropertyBagVtbl IPropertyBag_Vtbl =
DEVENUM_IPropertyBag_Write DEVENUM_IPropertyBag_Write
}; };
static HRESULT DEVENUM_IPropertyBag_Construct(HANDLE hkey, IPropertyBag **ppBag) static HRESULT DEVENUM_IPropertyBag_Construct(HANDLE hkey, IPropertyBag **ppBag, BOOL bInterface)
{ {
RegPropBagImpl * rpb = CoTaskMemAlloc(sizeof(RegPropBagImpl)); RegPropBagImpl * rpb = CoTaskMemAlloc(sizeof(RegPropBagImpl));
if (!rpb) if (!rpb)
@ -278,6 +300,8 @@ static HRESULT DEVENUM_IPropertyBag_Construct(HANDLE hkey, IPropertyBag **ppBag)
rpb->lpVtbl = &IPropertyBag_Vtbl; rpb->lpVtbl = &IPropertyBag_Vtbl;
rpb->ref = 1; rpb->ref = 1;
rpb->hkey = hkey; rpb->hkey = hkey;
rpb->bInterface = bInterface;
*ppBag = (IPropertyBag*)rpb; *ppBag = (IPropertyBag*)rpb;
DEVENUM_LockModule(); DEVENUM_LockModule();
return S_OK; return S_OK;
@ -393,6 +417,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
{ {
IUnknown * pObj = NULL; IUnknown * pObj = NULL;
IPropertyBag * pProp = NULL; IPropertyBag * pProp = NULL;
IPersistPropertyBag * pBag;
CLSID clsID; CLSID clsID;
VARIANT var; VARIANT var;
HRESULT res = E_FAIL; HRESULT res = E_FAIL;
@ -430,6 +455,15 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
if (pObj!=NULL) if (pObj!=NULL)
{ {
if (This->bInterface)
{
res = IUnknown_QueryInterface(pObj, &IID_IPersistPropertyBag, (void**)&pBag);
if (SUCCEEDED(res))
{
res = IPersistPropertyBag_Load(pBag, pProp, NULL); /* FIXME */
IPersistPropertyBag_Release(pBag);
}
}
/* get the requested interface from the loaded class */ /* get the requested interface from the loaded class */
res= IUnknown_QueryInterface(pObj,riidResult,ppvResult); res= IUnknown_QueryInterface(pObj,riidResult,ppvResult);
} }
@ -463,7 +497,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage(
{ {
HANDLE hkey; HANDLE hkey;
DuplicateHandle(GetCurrentProcess(), This->hkey, GetCurrentProcess(), &hkey, 0, 0, DUPLICATE_SAME_ACCESS); DuplicateHandle(GetCurrentProcess(), This->hkey, GetCurrentProcess(), &hkey, 0, 0, DUPLICATE_SAME_ACCESS);
return DEVENUM_IPropertyBag_Construct(hkey, (IPropertyBag**)ppvObj); return DEVENUM_IPropertyBag_Construct(hkey, (IPropertyBag**)ppvObj, This->bInterface);
} }
return MK_E_NOSTORAGE; return MK_E_NOSTORAGE;
@ -679,6 +713,7 @@ MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct()
pMoniker->lpVtbl = &IMoniker_Vtbl; pMoniker->lpVtbl = &IMoniker_Vtbl;
pMoniker->ref = 0; pMoniker->ref = 0;
pMoniker->hkey = NULL; pMoniker->hkey = NULL;
pMoniker->bInterface = FALSE;
DEVENUM_IMediaCatMoniker_AddRef((LPMONIKER)pMoniker); DEVENUM_IMediaCatMoniker_AddRef((LPMONIKER)pMoniker);
@ -764,6 +799,7 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(LPENUMMONIKER iface, ULONG celt,
if (!pMoniker) if (!pMoniker)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
pMoniker->bInterface = This->bInterface;
if (RegOpenKeyW(This->hkey, buffer, &pMoniker->hkey) != ERROR_SUCCESS) if (RegOpenKeyW(This->hkey, buffer, &pMoniker->hkey) != ERROR_SUCCESS)
{ {
DEVENUM_IMediaCatMoniker_Release((LPMONIKER)pMoniker); DEVENUM_IMediaCatMoniker_Release((LPMONIKER)pMoniker);
@ -829,7 +865,7 @@ static IEnumMonikerVtbl IEnumMoniker_Vtbl =
DEVENUM_IEnumMoniker_Clone DEVENUM_IEnumMoniker_Clone
}; };
HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker, BOOL bInterface)
{ {
EnumMonikerImpl * pEnumMoniker = CoTaskMemAlloc(sizeof(EnumMonikerImpl)); EnumMonikerImpl * pEnumMoniker = CoTaskMemAlloc(sizeof(EnumMonikerImpl));
if (!pEnumMoniker) if (!pEnumMoniker)
@ -839,6 +875,7 @@ HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker)
pEnumMoniker->ref = 1; pEnumMoniker->ref = 1;
pEnumMoniker->index = 0; pEnumMoniker->index = 0;
pEnumMoniker->hkey = hkey; pEnumMoniker->hkey = hkey;
pEnumMoniker->bInterface = bInterface;
*ppEnumMoniker = (IEnumMoniker *)pEnumMoniker; *ppEnumMoniker = (IEnumMoniker *)pEnumMoniker;

View file

@ -71,7 +71,6 @@ CEnumPins::QueryInterface(
OutputDebugStringW(Buffer); OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr); CoTaskMemFree(lpstr);
DebugBreak();
return E_NOINTERFACE; return E_NOINTERFACE;
} }

View file

@ -700,7 +700,6 @@ CInputPin::Receive(IMediaSample *pSample)
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::Receive NotImplemented\n"); OutputDebugStringW(L"CInputPin::Receive NotImplemented\n");
DebugBreak();
#endif #endif
return E_NOTIMPL; return E_NOTIMPL;
@ -712,7 +711,6 @@ CInputPin::ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSample
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n"); OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n");
DebugBreak();
#endif #endif
return E_NOTIMPL; return E_NOTIMPL;
@ -724,7 +722,6 @@ CInputPin::ReceiveCanBlock( void)
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n"); OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n");
DebugBreak();
#endif #endif
return S_FALSE; return S_FALSE;
@ -923,7 +920,6 @@ CInputPin::KsQualityNotify(
OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n"); OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n");
#endif #endif
DebugBreak();
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1114,7 +1110,6 @@ CInputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::Connect NotImplemented\n"); OutputDebugStringW(L"CInputPin::Connect NotImplemented\n");
DebugBreak();
#endif #endif
return NOERROR; return NOERROR;
} }
@ -1199,7 +1194,6 @@ CInputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n"); OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n");
DebugBreak();
#endif #endif
return E_NOTIMPL; return E_NOTIMPL;
@ -1496,7 +1490,6 @@ CInputPin::CreatePin(
WCHAR Buffer[100]; WCHAR Buffer[100];
swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
OutputDebugStringW(Buffer); OutputDebugStringW(Buffer);
DebugBreak();
#endif #endif
hr = E_FAIL; hr = E_FAIL;
} }
@ -1629,7 +1622,6 @@ CInputPin::CreatePinHandle(
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n"); OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
DebugBreak();
#endif #endif
return hr; return hr;
} }
@ -1640,7 +1632,6 @@ CInputPin::CreatePinHandle(
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n"); OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
DebugBreak();
#endif #endif
return hr; return hr;
} }
@ -1783,7 +1774,6 @@ CInputPin::LoadProxyPlugins(
{ {
// store plugin // store plugin
m_Plugins.push_back(pUnknown); m_Plugins.push_back(pUnknown);
DebugBreak();
} }
// close key // close key
RegCloseKey(hSubKey); RegCloseKey(hSubKey);

View file

@ -21,7 +21,6 @@ public:
STDMETHODIMP_(ULONG) Release() STDMETHODIMP_(ULONG) Release()
{ {
InterlockedDecrement(&m_Ref); InterlockedDecrement(&m_Ref);
DebugBreak();
if (!m_Ref) if (!m_Ref)
{ {
if (m_Allocator) if (m_Allocator)
@ -280,7 +279,6 @@ STDMETHODCALLTYPE
CMediaSample::SetMediaType(AM_MEDIA_TYPE *pMediaType) CMediaSample::SetMediaType(AM_MEDIA_TYPE *pMediaType)
{ {
OutputDebugStringW(L"CMediaSample::SetMediaType NotImplemented\n"); OutputDebugStringW(L"CMediaSample::SetMediaType NotImplemented\n");
DebugBreak();
return E_NOTIMPL; return E_NOTIMPL;
} }

View file

@ -1548,7 +1548,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n"); OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n");
#endif #endif
DebugBreak();
return hr; return hr;
} }
@ -1946,13 +1945,26 @@ COutputPin::CreatePin(
// query for pin medium // query for pin medium
hr = KsQueryMediums(&MediumList); hr = KsQueryMediums(&MediumList);
if (FAILED(hr)) if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr; return hr;
}
// query for pin interface // query for pin interface
hr = KsQueryInterfaces(&InterfaceList); hr = KsQueryInterfaces(&InterfaceList);
if (FAILED(hr)) if (FAILED(hr))
{ {
// failed // failed
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
CoTaskMemFree(MediumList); CoTaskMemFree(MediumList);
return hr; return hr;
} }
@ -2003,6 +2015,12 @@ COutputPin::CreatePin(
CoTaskMemFree(MediumList); CoTaskMemFree(MediumList);
CoTaskMemFree(InterfaceList); CoTaskMemFree(InterfaceList);
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin failed to create interface handler %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr; return hr;
} }
@ -2010,7 +2028,12 @@ COutputPin::CreatePin(
hr = InterfaceHandler->KsSetPin((IKsPin*)this); hr = InterfaceHandler->KsSetPin((IKsPin*)this);
if (FAILED(hr)) if (FAILED(hr))
{ {
// failed to load interface handler plugin // failed to initialize interface handler plugin
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
InterfaceHandler->Release(); InterfaceHandler->Release();
CoTaskMemFree(MediumList); CoTaskMemFree(MediumList);
CoTaskMemFree(InterfaceList); CoTaskMemFree(InterfaceList);
@ -2027,7 +2050,6 @@ COutputPin::CreatePin(
WCHAR Buffer[100]; WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName); swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
OutputDebugStringW(Buffer); OutputDebugStringW(Buffer);
DebugBreak();
#endif #endif
hr = E_FAIL; hr = E_FAIL;
@ -2037,6 +2059,12 @@ COutputPin::CreatePin(
CoTaskMemFree(MediumList); CoTaskMemFree(MediumList);
CoTaskMemFree(InterfaceList); CoTaskMemFree(InterfaceList);
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
return hr; return hr;
} }
@ -2058,6 +2086,8 @@ COutputPin::CreatePinHandle(
//KSPROPERTY Property; //KSPROPERTY Property;
//ULONG BytesReturned; //ULONG BytesReturned;
OutputDebugStringW(L"COutputPin::CreatePinHandle\n");
if (m_hPin != INVALID_HANDLE_VALUE) if (m_hPin != INVALID_HANDLE_VALUE)
{ {
// pin already exists // pin already exists
@ -2173,7 +2203,6 @@ COutputPin::CreatePinHandle(
if (FAILED(InitializeIOThread())) if (FAILED(InitializeIOThread()))
{ {
OutputDebugStringW(L"COutputPin::CreatePinHandle failed to initialize i/o thread\n"); OutputDebugStringW(L"COutputPin::CreatePinHandle failed to initialize i/o thread\n");
DebugBreak();
} }
LPGUID pGuid; LPGUID pGuid;
@ -2184,8 +2213,7 @@ COutputPin::CreatePinHandle(
if (FAILED(hr)) if (FAILED(hr))
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n"); OutputDebugStringW(L"COutputPin::CreatePinHandle GetSupportedSets failed\n");
DebugBreak();
#endif #endif
return hr; return hr;
} }
@ -2195,8 +2223,7 @@ COutputPin::CreatePinHandle(
if (FAILED(hr)) if (FAILED(hr))
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n"); OutputDebugStringW(L"COutputPin::CreatePinHandle LoadProxyPlugins failed\n");
DebugBreak();
#endif #endif
return hr; return hr;
} }
@ -2338,7 +2365,6 @@ COutputPin::LoadProxyPlugins(
{ {
// store plugin // store plugin
m_Plugins.push_back(pUnknown); m_Plugins.push_back(pUnknown);
DebugBreak();
} }
// close key // close key
RegCloseKey(hSubKey); RegCloseKey(hSubKey);

View file

@ -3,7 +3,7 @@
#define _FORCENAMELESSUNION #define _FORCENAMELESSUNION
#define BUILDING_KS #define BUILDING_KS
#define _KSDDK_ #define _KSDDK_
//#define KSPROXY_TRACE #define KSPROXY_TRACE
#include <dshow.h> #include <dshow.h>
//#include <streams.h> //#include <streams.h>
#include <ks.h> #include <ks.h>

View file

@ -1954,7 +1954,6 @@ CKsProxy::IsDirty()
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n"); OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
DebugBreak();
#endif #endif
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -2035,7 +2034,6 @@ CKsProxy::Load(
}while(Length > 0); }while(Length > 0);
DebugBreak();
return S_OK; return S_OK;
} }
@ -2059,7 +2057,6 @@ CKsProxy::GetSizeMax(
{ {
#ifdef KSPROXY_TRACE #ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n"); OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
DebugBreak();
#endif #endif
return E_NOTIMPL; return E_NOTIMPL;
@ -2480,23 +2477,50 @@ CKsProxy::CreatePins()
// query current instance count // query current instance count
hr = GetPinInstanceCount(Index, &Instances); hr = GetPinInstanceCount(Index, &Instances);
if (FAILED(hr)) if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue; continue;
}
// query pin communication; // query pin communication;
hr = GetPinCommunication(Index, &Communication); hr = GetPinCommunication(Index, &Communication);
if (FAILED(hr)) if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue; continue;
}
if (Instances.CurrentCount == Instances.PossibleCount) if (Instances.CurrentCount == Instances.PossibleCount)
{ {
// already maximum reached for this pin // already maximum reached for this pin
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins Instances.CurrentCount == Instances.PossibleCount\n");
OutputDebugStringW(Buffer);
#endif
continue; continue;
} }
// get direction of pin // get direction of pin
hr = GetPinDataflow(Index, &DataFlow); hr = GetPinDataflow(Index, &DataFlow);
if (FAILED(hr)) if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue; continue;
}
if (DataFlow == KSPIN_DATAFLOW_IN) if (DataFlow == KSPIN_DATAFLOW_IN)
hr = GetPinName(Index, DataFlow, InputPin, &PinName); hr = GetPinName(Index, DataFlow, InputPin, &PinName);
@ -2504,7 +2528,14 @@ CKsProxy::CreatePins()
hr = GetPinName(Index, DataFlow, OutputPin, &PinName); hr = GetPinName(Index, DataFlow, OutputPin, &PinName);
if (FAILED(hr)) if (FAILED(hr))
{
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
continue; continue;
}
// construct the pins // construct the pins
if (DataFlow == KSPIN_DATAFLOW_IN) if (DataFlow == KSPIN_DATAFLOW_IN)
@ -2512,6 +2543,11 @@ CKsProxy::CreatePins()
hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin); hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin);
if (FAILED(hr)) if (FAILED(hr))
{ {
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins CInputPin_Constructor failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
CoTaskMemFree(PinName); CoTaskMemFree(PinName);
continue; continue;
} }
@ -2522,6 +2558,11 @@ CKsProxy::CreatePins()
hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin); hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin);
if (FAILED(hr)) if (FAILED(hr))
{ {
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"CKsProxy::CreatePins COutputPin_Constructor failed with %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
CoTaskMemFree(PinName); CoTaskMemFree(PinName);
continue; continue;
} }
@ -2627,9 +2668,12 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
hr = LoadProxyPlugins(pGuid, NumGuids); hr = LoadProxyPlugins(pGuid, NumGuids);
if (FAILED(hr)) if (FAILED(hr))
{ {
#if 0 //HACK
CloseHandle(m_hDevice); CloseHandle(m_hDevice);
m_hDevice = NULL; m_hDevice = NULL;
return hr; return hr;
#endif
OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed!\n");
} }
// free sets // free sets
@ -2638,6 +2682,14 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
// now create the input / output pins // now create the input / output pins
hr = CreatePins(); hr = CreatePins();
#ifdef KSPROXY_TRACE
swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
//HACK
hr = S_OK;
return hr; return hr;
} }
@ -2986,10 +3038,6 @@ STDMETHODCALLTYPE
CKsProxy::EnumPins( CKsProxy::EnumPins(
IEnumPins **ppEnum) IEnumPins **ppEnum)
{ {
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::EnumPins\n");
#endif
return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum); return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum);
} }

View file

@ -155,14 +155,6 @@ CEnumPins_fnConstructor(
{ {
CEnumPins * handler = new CEnumPins(NumPins, pins); CEnumPins * handler = new CEnumPins(NumPins, pins);
#ifdef MSDVBNP_TRACE
WCHAR Buffer[MAX_PATH];
LPOLESTR lpstr;
StringFromCLSID(riid, &lpstr);
swprintf(Buffer, L"CEnumPins_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown);
OutputDebugStringW(Buffer);
#endif
if (!handler) if (!handler)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;

View file

@ -201,7 +201,6 @@ CNetworkProvider::QueryInterface(
swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr); swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr);
OutputDebugStringW(Buffer); OutputDebugStringW(Buffer);
CoTaskMemFree(lpstr); CoTaskMemFree(lpstr);
DebugBreak();
return E_NOINTERFACE; return E_NOINTERFACE;
} }

View file

@ -51,7 +51,7 @@ public:
HRESULT STDMETHODCALLTYPE EndFlush(); HRESULT STDMETHODCALLTYPE EndFlush();
HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
CPin(IBaseFilter * ParentFilter) : m_Ref(0), m_ParentFilter(ParentFilter){}; CPin(IBaseFilter * ParentFilter);
virtual ~CPin(){}; virtual ~CPin(){};
static LPCWSTR PIN_ID; static LPCWSTR PIN_ID;
@ -59,11 +59,31 @@ public:
protected: protected:
LONG m_Ref; LONG m_Ref;
IBaseFilter * m_ParentFilter; IBaseFilter * m_ParentFilter;
AM_MEDIA_TYPE m_MediaType;
IPin * m_Pin;
}; };
LPCWSTR CPin::PIN_ID = L"Antenna Out"; LPCWSTR CPin::PIN_ID = L"Antenna Out";
CPin::CPin(
IBaseFilter * ParentFilter) : m_Ref(0),
m_ParentFilter(ParentFilter),
m_Pin(0)
{
m_MediaType.majortype = KSDATAFORMAT_TYPE_BDA_ANTENNA;
m_MediaType.subtype = MEDIASUBTYPE_None;
m_MediaType.formattype = FORMAT_None;
m_MediaType.bFixedSizeSamples = true;
m_MediaType.bTemporalCompression = false;
m_MediaType.lSampleSize = sizeof(CHAR);
m_MediaType.pUnk = NULL;
m_MediaType.cbFormat = 0;
m_MediaType.pbFormat = NULL;
}
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::QueryInterface( CPin::QueryInterface(
@ -100,36 +120,97 @@ HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) CPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
HRESULT hr;
OutputDebugStringW(L"CPin::Connect called\n"); OutputDebugStringW(L"CPin::Connect called\n");
return E_NOTIMPL;
if (pmt)
{
hr = pReceivePin->QueryAccept(pmt);
if (FAILED(hr))
{
OutputDebugStringW(L"CPin::Connect QueryAccept failed\n");
return hr;
}
}
else
{
// query accept
hr = pReceivePin->QueryAccept(&m_MediaType);
if (FAILED(hr))
{
OutputDebugStringW(L"CPin::Connect QueryAccept pmt default failed\n");
return hr;
}
pmt = &m_MediaType;
}
// receive connection;
hr = pReceivePin->ReceiveConnection((IPin*)this, pmt);
if (SUCCEEDED(hr))
{
// increment reference count
pReceivePin->AddRef();
m_Pin = pReceivePin;
OutputDebugStringW(L"CPin::Connect success\n");
}
return hr;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt) CPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
{ {
OutputDebugStringW(L"CPin::ReceiveConnection called\n"); return E_UNEXPECTED;
return E_NOTIMPL;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::Disconnect( void) CPin::Disconnect( void)
{ {
OutputDebugStringW(L"CPin::Disconnect called\n"); #ifdef MSDVBNP_TRACE
return E_NOTIMPL; OutputDebugStringW(L"CPin::Disconnect\n");
#endif
if (!m_Pin)
{
// pin was not connected
return S_FALSE;
}
m_Pin->Release();
m_Pin = NULL;
return S_OK;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::ConnectedTo(IPin **pPin) CPin::ConnectedTo(IPin **pPin)
{ {
OutputDebugStringW(L"CPin::ConnectedTo called\n"); #ifdef MSDVBNP_TRACE
OutputDebugStringW(L"CPin::ConnectedTo\n");
#endif
if (!pPin)
return E_POINTER;
if (m_Pin)
{
// increment reference count
m_Pin->AddRef();
*pPin = m_Pin;
return S_OK;
}
*pPin = NULL;
return VFW_E_NOT_CONNECTED; return VFW_E_NOT_CONNECTED;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt) CPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
{ {
OutputDebugStringW(L"CPin::ConnectionMediaType called\n"); OutputDebugStringW(L"CPin::ConnectionMediaType NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
@ -170,7 +251,7 @@ HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::QueryAccept(const AM_MEDIA_TYPE *pmt) CPin::QueryAccept(const AM_MEDIA_TYPE *pmt)
{ {
OutputDebugStringW(L"CPin::QueryAccept called\n"); OutputDebugStringW(L"CPin::QueryAccept NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
@ -200,35 +281,35 @@ HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::QueryInternalConnections(IPin **apPin, ULONG *nPin) CPin::QueryInternalConnections(IPin **apPin, ULONG *nPin)
{ {
OutputDebugStringW(L"CPin::QueryInternalConnections called\n"); OutputDebugStringW(L"CPin::QueryInternalConnections NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::EndOfStream( void) CPin::EndOfStream( void)
{ {
OutputDebugStringW(L"CPin::EndOfStream called\n"); OutputDebugStringW(L"CPin::EndOfStream NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::BeginFlush( void) CPin::BeginFlush( void)
{ {
OutputDebugStringW(L"CPin::BeginFlush called\n"); OutputDebugStringW(L"CPin::BeginFlush NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::EndFlush( void) CPin::EndFlush( void)
{ {
OutputDebugStringW(L"CPin::EndFlush called\n"); OutputDebugStringW(L"CPin::EndFlush NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }
HRESULT HRESULT
STDMETHODCALLTYPE STDMETHODCALLTYPE
CPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) CPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{ {
OutputDebugStringW(L"CPin::NewSegment called\n"); OutputDebugStringW(L"CPin::NewSegment NotImplemented\n");
return E_NOTIMPL; return E_NOTIMPL;
} }

View file

@ -104,7 +104,6 @@ BOOL
FASTCALL FASTCALL
DeleteRegion( HRGN hRgn ) DeleteRegion( HRGN hRgn )
{ {
//#if 0
PRGN_ATTR Rgn_Attr; PRGN_ATTR Rgn_Attr;
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) && if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
@ -128,7 +127,6 @@ DeleteRegion( HRGN hRgn )
} }
} }
} }
//#endif
return NtGdiDeleteObjectApp((HGDIOBJ) hRgn); return NtGdiDeleteObjectApp((HGDIOBJ) hRgn);
} }
@ -581,8 +579,110 @@ INT
WINAPI WINAPI
ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode) ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
{ {
/* FIXME some part need be done on user mode size */ INT Ret;
return NtGdiExtSelectClipRgn(hdc,hrgn, iMode); HRGN NewRgn = NULL;
#if 0
// Handle something other than a normal dc object.
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
return MFDRV_ExtSelectClipRgn( hdc, );
else
{
PLDC pLDC = GdiGetLDC(hdc);
if ( pLDC )
{
if (pLDC->iType != LDC_EMFLDC || EMFDRV_ExtSelectClipRgn( hdc, ))
return NtGdiExtSelectClipRgn(hdc, );
}
else
SetLastError(ERROR_INVALID_HANDLE);
return ERROR;
}
}
#endif
#if 0
if ( hrgn )
{
if ( GetLayout(hdc) & LAYOUT_RTL )
{
if ( MirrorRgnDC(hdc, hrgn, &NewRgn) )
{
if ( NewRgn ) hrgn = NewRgn;
}
}
}
#endif
/* Batch handles RGN_COPY only! */
if (iMode == RGN_COPY)
{
#if 0
PDC_ATTR pDc_Attr;
PRGN_ATTR pRgn_Attr = NULL;
/* hrgn can be NULL unless the RGN_COPY mode is specified. */
if (hrgn)
GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr);
if ( GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &pDc_Attr) &&
pDc_Attr )
{
PGDI_TABLE_ENTRY pEntry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hdc);
PTEB pTeb = NtCurrentTeb();
if ( pTeb->Win32ThreadInfo != NULL &&
pTeb->GdiTebBatch.HDC == hdc &&
!(pDc_Attr->ulDirty_ & DC_DIBSECTION) &&
!(pEntry->Flags & GDI_ENTRY_VALIDATE_VIS) )
{
if (!hrgn ||
(hrgn && pRgn_Attr && pRgn_Attr->Flags <= SIMPLEREGION) )
{
if ((pTeb->GdiTebBatch.Offset + sizeof(GDIBSEXTSELCLPRGN)) <= GDIBATCHBUFSIZE)
{
PGDIBSEXTSELCLPRGN pgO = (PGDIBSEXTSELCLPRGN)(&pTeb->GdiTebBatch.Buffer[0] +
pTeb->GdiTebBatch.Offset);
pgO->gbHdr.Cmd = GdiBCExtSelClipRgn;
pgO->gbHdr.Size = sizeof(GDIBSEXTSELCLPRGN);
pgO->fnMode = iMode;
if ( hrgn && pRgn_Attr )
{
Ret = pRgn_Attr->Flags;
if ( pDc_Attr->VisRectRegion.Rect.left >= pRgn_Attr->Rect.right ||
pDc_Attr->VisRectRegion.Rect.top >= pRgn_Attr->Rect.bottom ||
pDc_Attr->VisRectRegion.Rect.right <= pRgn_Attr->Rect.left ||
pDc_Attr->VisRectRegion.Rect.bottom <= pRgn_Attr->Rect.top )
Ret = NULLREGION;
pgO->left = pRgn_Attr->Rect.left;
pgO->top = pRgn_Attr->Rect.top;
pgO->right = pRgn_Attr->Rect.right;
pgO->bottom = pRgn_Attr->Rect.bottom;
}
else
{
Ret = pDc_Attr->VisRectRegion.Flags;
pgO->fnMode |= 0x80000000; // Set no hrgn mode.
}
pTeb->GdiTebBatch.Offset += sizeof(GDIBSEXTSELCLPRGN);
pTeb->GdiBatchCount++;
if (pTeb->GdiBatchCount >= GDI_BatchLimit) NtGdiFlush();
if ( NewRgn ) DeleteObject(NewRgn);
return Ret;
}
}
}
}
#endif
}
Ret = NtGdiExtSelectClipRgn(hdc, hrgn, iMode);
if ( NewRgn ) DeleteObject(NewRgn);
return Ret;
} }
/* /*

View file

@ -612,8 +612,10 @@ int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, D
int WINAPI LogoffWindowsDialog(HWND hWndOwner) int WINAPI LogoffWindowsDialog(HWND hWndOwner)
{ {
UNIMPLEMENTED; if (ConfirmDialog(hWndOwner, IDS_LOGOFF_PROMPT, IDS_LOGOFF_TITLE))
{
ExitWindowsEx(EWX_LOGOFF, 0); ExitWindowsEx(EWX_LOGOFF, 0);
}
return 0; return 0;
} }

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Искате ли да презапуснете системата?" IDS_RESTART_PROMPT "Искате ли да презапуснете системата?"
IDS_SHUTDOWN_TITLE "Изключване" IDS_SHUTDOWN_TITLE "Изключване"
IDS_SHUTDOWN_PROMPT "Искате ли да изключите компютъра?" IDS_SHUTDOWN_PROMPT "Искате ли да изключите компютъра?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
// shell folder path default values // shell folder path default values
IDS_PROGRAMS "Пусков изборник\\Приложения" IDS_PROGRAMS "Пусков изборник\\Приложения"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Opravdu chcete restartovat systém?" IDS_RESTART_PROMPT "Opravdu chcete restartovat systém?"
IDS_SHUTDOWN_TITLE "Vypnout" IDS_SHUTDOWN_TITLE "Vypnout"
IDS_SHUTDOWN_PROMPT "Opravdu chcete vypnout poèítaè?" IDS_SHUTDOWN_PROMPT "Opravdu chcete vypnout poèítaè?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Nabídka Start\\Programy" IDS_PROGRAMS "Nabídka Start\\Programy"

View file

@ -654,6 +654,8 @@ BEGIN
IDS_RESTART_PROMPT "Ønsker du at Genstarte Systemet?" IDS_RESTART_PROMPT "Ønsker du at Genstarte Systemet?"
IDS_SHUTDOWN_TITLE "Luk Ned" IDS_SHUTDOWN_TITLE "Luk Ned"
IDS_SHUTDOWN_PROMPT "Ønsker du at Lukke Ned?" IDS_SHUTDOWN_PROMPT "Ønsker du at Lukke Ned?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programmer" IDS_PROGRAMS "Start Menu\\Programmer"

View file

@ -669,6 +669,8 @@ BEGIN
IDS_RESTART_PROMPT "Möchten Sie das System neu starten?" IDS_RESTART_PROMPT "Möchten Sie das System neu starten?"
IDS_SHUTDOWN_TITLE "Herunterfahren" IDS_SHUTDOWN_TITLE "Herunterfahren"
IDS_SHUTDOWN_PROMPT "Möchten Sie das System herunterfahren?" IDS_SHUTDOWN_PROMPT "Möchten Sie das System herunterfahren?"
IDS_LOGOFF_TITLE "Ausloggen"
IDS_LOGOFF_PROMPT "Möchten Sie sich ausloggen?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Startmenü\\Programme" IDS_PROGRAMS "Startmenü\\Programme"

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Åßóôå óßãïõñïé üôé èÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò;" IDS_RESTART_PROMPT "Åßóôå óßãïõñïé üôé èÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò;"
IDS_SHUTDOWN_TITLE "Áðåíåñãïðïßçóç" IDS_SHUTDOWN_TITLE "Áðåíåñãïðïßçóç"
IDS_SHUTDOWN_PROMPT "Åßóôå óßãïõñïé üôé èÝëåôå íá áðåíåñãïðïéÞóåôå ôïí õðïëïãéóôÞ óáò;" IDS_SHUTDOWN_PROMPT "Åßóôå óßãïõñïé üôé èÝëåôå íá áðåíåñãïðïéÞóåôå ôïí õðïëïãéóôÞ óáò;"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -668,6 +668,8 @@ BEGIN
IDS_RESTART_PROMPT "¿Desea reiniciar el equipo?" IDS_RESTART_PROMPT "¿Desea reiniciar el equipo?"
IDS_SHUTDOWN_TITLE "Apagar" IDS_SHUTDOWN_TITLE "Apagar"
IDS_SHUTDOWN_PROMPT "¿Desea apagar el equipo?" IDS_SHUTDOWN_PROMPT "¿Desea apagar el equipo?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menú Inicio\\Programas" IDS_PROGRAMS "Menú Inicio\\Programas"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Haluatko simuloida Windows:n uudelleenkäynnistämistä?" IDS_RESTART_PROMPT "Haluatko simuloida Windows:n uudelleenkäynnistämistä?"
IDS_SHUTDOWN_TITLE "Sammuta" IDS_SHUTDOWN_TITLE "Sammuta"
IDS_SHUTDOWN_PROMPT "Haluatko lopettaa Wine:n istunnon?" IDS_SHUTDOWN_PROMPT "Haluatko lopettaa Wine:n istunnon?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Käynnistä\\Ohjelmat" IDS_PROGRAMS "Käynnistä\\Ohjelmat"

View file

@ -669,6 +669,8 @@ BEGIN
IDS_RESTART_PROMPT "Voulez-vous redémarrer votre ordinateur ?" IDS_RESTART_PROMPT "Voulez-vous redémarrer votre ordinateur ?"
IDS_SHUTDOWN_TITLE "Arrêter" IDS_SHUTDOWN_TITLE "Arrêter"
IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS ?" IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS ?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menu Démarrer\\Programmes" IDS_PROGRAMS "Menu Démarrer\\Programmes"

View file

@ -668,6 +668,8 @@ BEGIN
IDS_RESTART_PROMPT "Újra szeretnéd indítani a rendszert?" IDS_RESTART_PROMPT "Újra szeretnéd indítani a rendszert?"
IDS_SHUTDOWN_TITLE "Kikapcsolás" IDS_SHUTDOWN_TITLE "Kikapcsolás"
IDS_SHUTDOWN_PROMPT "Kiakarod kapcsolni számítógépét?" IDS_SHUTDOWN_PROMPT "Kiakarod kapcsolni számítógépét?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Volete riavviare il sistema?" IDS_RESTART_PROMPT "Volete riavviare il sistema?"
IDS_SHUTDOWN_TITLE "Termina sessione" IDS_SHUTDOWN_TITLE "Termina sessione"
IDS_SHUTDOWN_PROMPT "Volete terminare la sessione di ReactOS?" IDS_SHUTDOWN_PROMPT "Volete terminare la sessione di ReactOS?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menu Avvio\\Programmi" IDS_PROGRAMS "Menu Avvio\\Programmi"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "システムを再起動しますか?" IDS_RESTART_PROMPT "システムを再起動しますか?"
IDS_SHUTDOWN_TITLE "シャットダウン" IDS_SHUTDOWN_TITLE "シャットダウン"
IDS_SHUTDOWN_PROMPT "シャットダウンしますか?" IDS_SHUTDOWN_PROMPT "シャットダウンしますか?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "スタート メニュー\\プログラム" IDS_PROGRAMS "スタート メニュー\\プログラム"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -668,6 +668,8 @@ BEGIN
IDS_RESTART_PROMPT "Vil du starte datamaskinen på nytt?" IDS_RESTART_PROMPT "Vil du starte datamaskinen på nytt?"
IDS_SHUTDOWN_TITLE "Avslutt" IDS_SHUTDOWN_TITLE "Avslutt"
IDS_SHUTDOWN_PROMPT "Vil du slå av datamaskinen?" IDS_SHUTDOWN_PROMPT "Vil du slå av datamaskinen?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start-meny\\Programmer" IDS_PROGRAMS "Start-meny\\Programmer"

View file

@ -672,6 +672,8 @@ BEGIN
IDS_RESTART_PROMPT "Czy chcesz zrestartować system?" IDS_RESTART_PROMPT "Czy chcesz zrestartować system?"
IDS_SHUTDOWN_TITLE "Wyłšcz" IDS_SHUTDOWN_TITLE "Wyłšcz"
IDS_SHUTDOWN_PROMPT "Czy chcesz wyłšczyć system?" IDS_SHUTDOWN_PROMPT "Czy chcesz wyłšczyć system?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menu Start\\Programy" IDS_PROGRAMS "Menu Start\\Programy"

View file

@ -667,6 +667,8 @@ BEGIN
IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?" IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?"
IDS_SHUTDOWN_TITLE "Desligar" IDS_SHUTDOWN_TITLE "Desligar"
IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no Wine?" IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no Wine?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menu Iniciar\\Programas" IDS_PROGRAMS "Menu Iniciar\\Programas"

View file

@ -667,6 +667,8 @@ BEGIN
IDS_RESTART_PROMPT "Deseja simular a reinicialização do Windows?" IDS_RESTART_PROMPT "Deseja simular a reinicialização do Windows?"
IDS_SHUTDOWN_TITLE "Desligar" IDS_SHUTDOWN_TITLE "Desligar"
IDS_SHUTDOWN_PROMPT "Deseja finalizar esta sessão do Wine?" IDS_SHUTDOWN_PROMPT "Deseja finalizar esta sessão do Wine?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Menu Iniciar\\Programas" IDS_PROGRAMS "Menu Iniciar\\Programas"

View file

@ -668,6 +668,8 @@ BEGIN
IDS_RESTART_PROMPT "Vreți să reporniți sistemul?" IDS_RESTART_PROMPT "Vreți să reporniți sistemul?"
IDS_SHUTDOWN_TITLE "Închidere" IDS_SHUTDOWN_TITLE "Închidere"
IDS_SHUTDOWN_PROMPT "Vreți să închideți computerul?" IDS_SHUTDOWN_PROMPT "Vreți să închideți computerul?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Meniu Start\\Programe" IDS_PROGRAMS "Meniu Start\\Programe"

View file

@ -664,6 +664,8 @@ BEGIN
IDS_RESTART_PROMPT "Âû äåéñòâèòåëüíî õîòèòå ïåðåçàãðóçèòü ReactOS?" IDS_RESTART_PROMPT "Âû äåéñòâèòåëüíî õîòèòå ïåðåçàãðóçèòü ReactOS?"
IDS_SHUTDOWN_TITLE "Âûêëþ÷èòü ïèòàíèå" IDS_SHUTDOWN_TITLE "Âûêëþ÷èòü ïèòàíèå"
IDS_SHUTDOWN_PROMPT "Çàêîí÷èòü ðàáîòó ñ ReactOS?" IDS_SHUTDOWN_PROMPT "Çàêîí÷èòü ðàáîòó ñ ReactOS?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Ãëàâíîå ìåíþ\\Ïðîãðàììû" IDS_PROGRAMS "Ãëàâíîå ìåíþ\\Ïðîãðàììû"

View file

@ -671,6 +671,8 @@ BEGIN
IDS_RESTART_PROMPT "Naozaj chcete reštartovať systém?" IDS_RESTART_PROMPT "Naozaj chcete reštartovať systém?"
IDS_SHUTDOWN_TITLE "Vypnúť" IDS_SHUTDOWN_TITLE "Vypnúť"
IDS_SHUTDOWN_PROMPT "Naozaj chcete vypnúť počítač?" IDS_SHUTDOWN_PROMPT "Naozaj chcete vypnúť počítač?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Ponuka Štart\\Programy" IDS_PROGRAMS "Ponuka Štart\\Programy"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -665,6 +665,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Oturumu Kapat" IDS_SHUTDOWN_TITLE "Oturumu Kapat"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programlar" IDS_PROGRAMS "Start Menu\\Programlar"

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Âè õî÷åòå ïåðåçàâàíòàæèòè ñèñòåìó?" IDS_RESTART_PROMPT "Âè õî÷åòå ïåðåçàâàíòàæèòè ñèñòåìó?"
IDS_SHUTDOWN_TITLE "Âèìêíóòè" IDS_SHUTDOWN_TITLE "Âèìêíóòè"
IDS_SHUTDOWN_PROMPT "Âè õî÷åòå âèìêíóòè êîìï'þòåð?" IDS_SHUTDOWN_PROMPT "Âè õî÷åòå âèìêíóòè êîìï'þòåð?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -654,6 +654,8 @@ BEGIN
IDS_RESTART_PROMPT "是否重新启动系统?" IDS_RESTART_PROMPT "是否重新启动系统?"
IDS_SHUTDOWN_TITLE "关机" IDS_SHUTDOWN_TITLE "关机"
IDS_SHUTDOWN_PROMPT "是否关闭系统?" IDS_SHUTDOWN_PROMPT "是否关闭系统?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -666,6 +666,8 @@ BEGIN
IDS_RESTART_PROMPT "Do you want to restart the system?" IDS_RESTART_PROMPT "Do you want to restart the system?"
IDS_SHUTDOWN_TITLE "Shutdown" IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" IDS_SHUTDOWN_PROMPT "Do you want to shutdown?"
IDS_LOGOFF_TITLE "Log Off"
IDS_LOGOFF_PROMPT "Do you want to log off?"
/* shell folder path default values */ /* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs" IDS_PROGRAMS "Start Menu\\Programs"

View file

@ -90,6 +90,9 @@
#define IDS_FONTS 76 #define IDS_FONTS 76
#define IDS_PRINTERS 77 #define IDS_PRINTERS 77
#define IDS_LOGOFF_TITLE 78
#define IDS_LOGOFF_PROMPT 79
#define IDS_CREATEFOLDER_DENIED 128 #define IDS_CREATEFOLDER_DENIED 128
#define IDS_CREATEFOLDER_CAPTION 129 #define IDS_CREATEFOLDER_CAPTION 129
#define IDS_DELETEITEM_CAPTION 130 #define IDS_DELETEITEM_CAPTION 130

View file

@ -1,188 +0,0 @@
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/battery/cmbatt/cmbatt.c
* PURPOSE: Control Method Battery Miniclass Driver
* PROGRAMMERS: Cameron Gutman (cameron.gutman@reactos.org)
*/
#include <cmbatt.h>
#define NDEBUG
#include <debug.h>
LIST_ENTRY BatteryList;
KSPIN_LOCK BatteryListLock;
VOID
NTAPI
CmBattUnload(PDRIVER_OBJECT DriverObject)
{
DPRINT("Control method battery miniclass driver unloaded\n");
}
NTSTATUS
NTAPI
CmBattDeviceControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PCMBATT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
NTSTATUS Status;
Status = BatteryClassIoctl(DeviceExtension->BattClassHandle,
Irp);
if (Status == STATUS_NOT_SUPPORTED)
{
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
return Status;
}
NTSTATUS
NTAPI
CmBattPnP(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PCMBATT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
UNIMPLEMENTED
IoSkipCurrentIrpStackLocation(Irp);
return IoCallDriver(DeviceExtension->Ldo, Irp);
}
NTSTATUS
NTAPI
CmBattSystemControl(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
UNIMPLEMENTED
Irp->IoStatus.Status = STATUS_WMI_GUID_NOT_FOUND;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_WMI_GUID_NOT_FOUND;
}
NTSTATUS
NTAPI
CmBattPower(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PCMBATT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
UNIMPLEMENTED
IoSkipCurrentIrpStackLocation(Irp);
PoStartNextPowerIrp(Irp);
return PoCallDriver(DeviceExtension->Ldo, Irp);
}
NTSTATUS
NTAPI
CmBattCreateClose(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
CmBattAddDevice(PDRIVER_OBJECT DriverObject,
PDEVICE_OBJECT PhysicalDeviceObject)
{
NTSTATUS Status;
PDEVICE_OBJECT DeviceObject;
PCMBATT_DEVICE_EXTENSION DeviceExtension;
BATTERY_MINIPORT_INFO BattInfo;
Status = IoCreateDevice(DriverObject,
sizeof(CMBATT_DEVICE_EXTENSION),
NULL,
FILE_DEVICE_BATTERY,
0,
FALSE,
&DeviceObject);
if (!NT_SUCCESS(Status))
return Status;
DeviceExtension = DeviceObject->DeviceExtension;
DeviceExtension->Pdo = PhysicalDeviceObject;
DeviceExtension->Fdo = DeviceObject;
DeviceExtension->Ldo = IoAttachDeviceToDeviceStack(DeviceObject,
PhysicalDeviceObject);
DeviceObject->Flags |= DO_BUFFERED_IO | DO_POWER_PAGABLE;
/* We require an extra stack entry */
DeviceObject->StackSize = PhysicalDeviceObject->StackSize + 2;
BattInfo.MajorVersion = BATTERY_CLASS_MAJOR_VERSION;
BattInfo.MinorVersion = BATTERY_CLASS_MINOR_VERSION;
BattInfo.Context = DeviceExtension;
BattInfo.QueryTag = CmBattQueryTag;
BattInfo.QueryInformation = CmBattQueryInformation;
BattInfo.SetInformation = CmBattSetInformation;
BattInfo.QueryStatus = CmBattQueryStatus;
BattInfo.SetStatusNotify = CmBattSetStatusNotify;
BattInfo.DisableStatusNotify = CmBattDisableStatusNotify;
BattInfo.Pdo = PhysicalDeviceObject;
BattInfo.DeviceName = NULL;
Status = BatteryClassInitializeDevice(&BattInfo,
&DeviceExtension->BattClassHandle);
if (!NT_SUCCESS(Status))
{
IoDetachDevice(DeviceExtension->Ldo);
IoDeleteDevice(DeviceObject);
return Status;
}
ExInterlockedInsertTailList(&BatteryList,
&DeviceExtension->ListEntry,
&BatteryListLock);
DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
DPRINT("Successfully registered battery with battc (0x%x)\n", DeviceExtension->BattClassHandle);
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
DriverEntry(PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath)
{
DPRINT("Control method battery miniclass driver initialized\n");
DriverObject->DriverUnload = CmBattUnload;
DriverObject->DriverExtension->AddDevice = CmBattAddDevice;
DriverObject->MajorFunction[IRP_MJ_POWER] = CmBattPower;
DriverObject->MajorFunction[IRP_MJ_PNP] = CmBattPnP;
DriverObject->MajorFunction[IRP_MJ_CREATE] = CmBattCreateClose;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = CmBattCreateClose;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = CmBattDeviceControl;
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = CmBattSystemControl;
KeInitializeSpinLock(&BatteryListLock);
InitializeListHead(&BatteryList);
return STATUS_SUCCESS;
}

View file

@ -1,58 +0,0 @@
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/battery/cmbatt/cmbatt.h
* PURPOSE: Control Method Battery Miniclass Driver
* PROGRAMMERS: Cameron Gutman (cameron.gutman@reactos.org)
*/
#pragma once
#include <ntddk.h>
#include <batclass.h>
typedef struct _CMBATT_DEVICE_EXTENSION {
PDEVICE_OBJECT Pdo;
PDEVICE_OBJECT Ldo;
PDEVICE_OBJECT Fdo;
PVOID BattClassHandle;
LIST_ENTRY ListEntry;
} CMBATT_DEVICE_EXTENSION, *PCMBATT_DEVICE_EXTENSION;
NTSTATUS
NTAPI
CmBattQueryTag(PVOID Context,
PULONG BatteryTag);
NTSTATUS
NTAPI
CmBattDisableStatusNotify(PVOID Context);
NTSTATUS
NTAPI
CmBattSetStatusNotify(PVOID Context,
ULONG BatteryTag,
PBATTERY_NOTIFY BatteryNotify);
NTSTATUS
NTAPI
CmBattQueryInformation(PVOID Context,
ULONG BatteryTag,
BATTERY_QUERY_INFORMATION_LEVEL Level,
OPTIONAL LONG AtRate,
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnedLength);
NTSTATUS
NTAPI
CmBattQueryStatus(PVOID Context,
ULONG BatteryTag,
PBATTERY_STATUS BatteryStatus);
NTSTATUS
NTAPI
CmBattSetInformation(PVOID Context,
ULONG BatteryTag,
BATTERY_SET_INFORMATION_LEVEL Level,
OPTIONAL PVOID Buffer);

View file

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="cmbatt" type="kernelmodedriver" installbase="system32/drivers" installname="cmbatt.sys">
<library>ntoskrnl</library>
<library>hal</library>
<library>battc</library>
<include base="cmbatt">.</include>
<file>cmbatt.c</file>
<file>miniclass.c</file>
<file>cmbatt.rc</file>
</module>

View file

@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "Control Method Battery Miniclass Driver\0"
#define REACTOS_STR_INTERNAL_NAME "cmbatt\0"
#define REACTOS_STR_ORIGINAL_FILENAME "cmbatt.sys\0"
#include <reactos/version.rc>

View file

@ -1,82 +0,0 @@
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: drivers/battery/cmbatt/miniclass.c
* PURPOSE: Control Method Battery Miniclass Driver
* PROGRAMMERS: Cameron Gutman (cameron.gutman@reactos.org)
*/
#include <cmbatt.h>
#define NDEBUG
#include <debug.h>
NTSTATUS
NTAPI
CmBattQueryTag(PVOID Context,
PULONG BatteryTag)
{
UNIMPLEMENTED
*BatteryTag = 0;
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
CmBattDisableStatusNotify(PVOID Context)
{
UNIMPLEMENTED
return STATUS_NOT_SUPPORTED;
}
NTSTATUS
NTAPI
CmBattSetStatusNotify(PVOID Context,
ULONG BatteryTag,
PBATTERY_NOTIFY BatteryNotify)
{
UNIMPLEMENTED
return STATUS_NOT_SUPPORTED;
}
NTSTATUS
NTAPI
CmBattQueryInformation(PVOID Context,
ULONG BatteryTag,
BATTERY_QUERY_INFORMATION_LEVEL Level,
OPTIONAL LONG AtRate,
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnedLength)
{
UNIMPLEMENTED
return STATUS_NOT_SUPPORTED;
}
NTSTATUS
NTAPI
CmBattQueryStatus(PVOID Context,
ULONG BatteryTag,
PBATTERY_STATUS BatteryStatus)
{
UNIMPLEMENTED
return STATUS_NOT_SUPPORTED;
}
NTSTATUS
NTAPI
CmBattSetInformation(PVOID Context,
ULONG BatteryTag,
BATTERY_SET_INFORMATION_LEVEL Level,
OPTIONAL PVOID Buffer)
{
UNIMPLEMENTED
return STATUS_NOT_SUPPORTED;
}

View file

@ -4,7 +4,4 @@
<directory name="battc"> <directory name="battc">
<xi:include href="battc/battc.rbuild" /> <xi:include href="battc/battc.rbuild" />
</directory> </directory>
<directory name="cmbatt">
<xi:include href="cmbatt/cmbatt.rbuild" />
</directory>
</group> </group>

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="cmbattx" type="kernelmodedriver" installbase="system32/drivers" installname="cmbattx.sys"> <module name="cmbatt" type="kernelmodedriver" installbase="system32/drivers" installname="cmbatt.sys">
<library>ntoskrnl</library> <library>ntoskrnl</library>
<library>hal</library> <library>hal</library>
<library>battc</library> <library>battc</library>

View file

@ -10,4 +10,7 @@
<directory name="pci"> <directory name="pci">
<xi:include href="pci/pci.rbuild" /> <xi:include href="pci/pci.rbuild" />
</directory> </directory>
<directory name="pcix">
<xi:include href="pcix/pcix.rbuild" />
</directory>
</group> </group>

View file

@ -775,7 +775,7 @@ PdoQueryResources(
Descriptor->ShareDisposition = CmResourceShareShared; Descriptor->ShareDisposition = CmResourceShareShared;
Descriptor->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE; Descriptor->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE;
Descriptor->u.Interrupt.Level = PciConfig.u.type0.InterruptLine; Descriptor->u.Interrupt.Level = PciConfig.u.type0.InterruptLine;
Descriptor->u.Interrupt.Vector = 0; Descriptor->u.Interrupt.Vector = PciConfig.u.type0.InterruptLine;
Descriptor->u.Interrupt.Affinity = 0xFFFFFFFF; Descriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
} }
} }
@ -1186,6 +1186,49 @@ PdoQueryInterface(
return Status; return Status;
} }
static NTSTATUS
PdoStartDevice(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
PCM_RESOURCE_LIST RawResList = IrpSp->Parameters.StartDevice.AllocatedResources;
PCM_FULL_RESOURCE_DESCRIPTOR RawFullDesc;
PCM_PARTIAL_RESOURCE_DESCRIPTOR RawPartialDesc;
ULONG i, ii;
PPDO_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
UCHAR Irq;
/* TODO: Assign the other resources we get to the card */
for (i = 0; i < RawResList->Count; i++)
{
RawFullDesc = &RawResList->List[i];
for (ii = 0; ii < RawFullDesc->PartialResourceList.Count; ii++)
{
RawPartialDesc = &RawFullDesc->PartialResourceList.PartialDescriptors[ii];
if (RawPartialDesc->Type == CmResourceTypeInterrupt)
{
DPRINT1("Assigning IRQ %x to PCI device (%x, %x)\n",
RawPartialDesc->u.Interrupt.Vector,
DeviceExtension->PciDevice->SlotNumber.u.AsULONG,
DeviceExtension->PciDevice->BusNumber);
Irq = (UCHAR)RawPartialDesc->u.Interrupt.Vector;
HalSetBusDataByOffset(PCIConfiguration,
DeviceExtension->PciDevice->BusNumber,
DeviceExtension->PciDevice->SlotNumber.u.AsULONG,
&Irq,
0x3c /* PCI_INTERRUPT_LINE */,
sizeof(UCHAR));
}
}
}
return STATUS_SUCCESS;
}
static NTSTATUS static NTSTATUS
PdoReadConfig( PdoReadConfig(
@ -1247,6 +1290,33 @@ PdoWriteConfig(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static NTSTATUS
PdoQueryDeviceRelations(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
PDEVICE_RELATIONS DeviceRelations;
/* We only support TargetDeviceRelation for child PDOs */
if (IrpSp->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation)
return Irp->IoStatus.Status;
/* We can do this because we only return 1 PDO for TargetDeviceRelation */
DeviceRelations = ExAllocatePool(PagedPool, sizeof(*DeviceRelations));
if (!DeviceRelations)
return STATUS_INSUFFICIENT_RESOURCES;
DeviceRelations->Count = 1;
DeviceRelations->Objects[0] = DeviceObject;
/* The PnP manager will remove this when it is done with the PDO */
ObReferenceObject(DeviceObject);
Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations;
return STATUS_SUCCESS;
}
static NTSTATUS static NTSTATUS
PdoSetPower( PdoSetPower(
@ -1319,8 +1389,7 @@ PdoPnpControl(
break; break;
case IRP_MN_QUERY_DEVICE_RELATIONS: case IRP_MN_QUERY_DEVICE_RELATIONS:
/* FIXME: Possibly handle for RemovalRelations */ Status = PdoQueryDeviceRelations(DeviceObject, Irp, IrpSp);
DPRINT("Unimplemented IRP_MN_QUERY_DEVICE_RELATIONS received\n");
break; break;
case IRP_MN_QUERY_DEVICE_TEXT: case IRP_MN_QUERY_DEVICE_TEXT:
@ -1352,6 +1421,9 @@ PdoPnpControl(
break; break;
case IRP_MN_START_DEVICE: case IRP_MN_START_DEVICE:
Status = PdoStartDevice(DeviceObject, Irp, IrpSp);
break;
case IRP_MN_QUERY_STOP_DEVICE: case IRP_MN_QUERY_STOP_DEVICE:
case IRP_MN_CANCEL_STOP_DEVICE: case IRP_MN_CANCEL_STOP_DEVICE:
case IRP_MN_STOP_DEVICE: case IRP_MN_STOP_DEVICE:

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/arb/ar_busno.c
* PURPOSE: Bus Number Arbitration
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/arb/ar_memiono.c
* PURPOSE: Memory and I/O Port Resource Arbitration
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/arb/arb_comn.c
* PURPOSE: Common Arbitration Code
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/arb/tr_irq.c
* PURPOSE: IRQ Resource Translation
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/debug.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/debug.c
* PURPOSE: Debug Helpers
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/device.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/device.c
* PURPOSE: Device Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/dispatch.c
* PURPOSE: WDM Dispatch Routines
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/enum.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/enum.c
* PURPOSE: PCI Bus/Device Enumeration
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/fdo.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/fdo.c
* PURPOSE: FDO Device Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/guid.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/guid.c
* PURPOSE: GUID Data
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/hookhal.c
* PURPOSE: HAL Bus Handler Dispatch Routine Support
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

30
drivers/bus/pcix/init.c Normal file
View file

@ -0,0 +1,30 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/init.c
* PURPOSE: Driver Initialization
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
NTSTATUS
NTAPI
DriverEntry(IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
DPRINT1("PCI: DriverEntry!\n");
/* FIXME: TODO */
return STATUS_NOT_SUPPORTED;
}
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/agpintrf.c
* PURPOSE: AGP Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/busintrf.c
* PURPOSE: Bus Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/cardbus.c
* PURPOSE: CardBus Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/ideintrf.c
* PURPOSE: IDE Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/intrface.c
* PURPOSE: Common Interface Support Routines
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/lddintrf.c
* PURPOSE: Legacy Device Detection Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/locintrf.c
* PURPOSE: Location Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/pmeintf.c
* PURPOSE: Power Management Event# Signal Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/routinf.c
* PURPOSE: Routing Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

11
drivers/bus/pcix/pci.h Normal file
View file

@ -0,0 +1,11 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci.h
* PURPOSE: Main Header File
* PROGRAMMERS: ReactOS Portable Systems Group
*/
#include <ntddk.h>
/* EOF */

5
drivers/bus/pcix/pci.rc Normal file
View file

@ -0,0 +1,5 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "PCI Bus Driver\0"
#define REACTOS_STR_INTERNAL_NAME "pci\0"
#define REACTOS_STR_ORIGINAL_FILENAME "pci.sys\0"
#include <reactos/version.rc>

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/busno.c
* PURPOSE: Bus Number Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/config.c
* PURPOSE: PCI Configuration Space Routines
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/devhere.c
* PURPOSE: PCI Device Detection and Location
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/pci/id.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/id.c
* PURPOSE: PCI Device Identification
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/ppbridge.c
* PURPOSE: PCI-to-PCI Bridge Support
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/romimage.c
* PURPOSE: PCI ROM Image Support
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pci/state.c
* PURPOSE: Bus/Device State Support
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pcivrify.c
* PURPOSE: PCI Driver Verifier Support
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="pcix" type="kernelmodedriver" installbase="system32/drivers" installname="pcix.sys">
<bootstrap installbase="$(CDOUTPUT)" />
<include base="pcix">.</include>
<library>ntoskrnl</library>
<library>hal</library>
<directory name="arb">
<file>ar_busno.c</file>
<file>ar_memio.c</file>
<file>arb_comn.c</file>
<file>tr_irq.c</file>
</directory>
<directory name="intrface">
<file>agpintrf.c</file>
<file>busintrf.c</file>
<file>cardbus.c</file>
<file>ideintrf.c</file>
<file>intrface.c</file>
<file>lddintrf.c</file>
<file>locintrf.c</file>
<file>pmeintf.c</file>
<file>routintf.c</file>
</directory>
<directory name="pci">
<file>busno.c</file>
<file>config.c</file>
<file>devhere.c</file>
<file>id.c</file>
<file>ppbridge.c</file>
<file>romimage.c</file>
<file>state.c</file>
</directory>
<file>debug.c</file>
<file>device.c</file>
<file>dispatch.c</file>
<file>enum.c</file>
<file>fdo.c</file>
<file>guid.c</file>
<file>hookhal.c</file>
<file>init.c</file>
<file>pcivrify.c</file>
<file>pdo.c</file>
<file>power.c</file>
<file>usage.c</file>
<file>utils.c</file>
<file>pci.rc</file>
<pch>pci.h</pch>
</module>

19
drivers/bus/pcix/pdo.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/pdo.c
* PURPOSE: PDO Device Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/power.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/power.c
* PURPOSE: Bus/Device Power Management
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/usage.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/usage.c
* PURPOSE: Bus/Device Usage Reporting
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

19
drivers/bus/pcix/utils.c Normal file
View file

@ -0,0 +1,19 @@
/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/utils.c
* PURPOSE: Utility/Helper Support Code
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
/* FUNCTIONS ******************************************************************/
/* EOF */

View file

@ -94,6 +94,8 @@ KsReleaseDeviceSecurityLock(
{ {
PKSIDEVICE_HEADER Header = (PKSIDEVICE_HEADER)DevHeader; PKSIDEVICE_HEADER Header = (PKSIDEVICE_HEADER)DevHeader;
DPRINT("KsReleaseDevice\n");
ExReleaseResourceLite(&Header->SecurityLock); ExReleaseResourceLite(&Header->SecurityLock);
KeLeaveCriticalRegion(); KeLeaveCriticalRegion();
} }
@ -1589,7 +1591,7 @@ KsAcquireControl(
/* sanity check */ /* sanity check */
ASSERT(BasicHeader->Type == KsObjectTypeFilter || BasicHeader->Type == KsObjectTypePin); ASSERT(BasicHeader->Type == KsObjectTypeFilter || BasicHeader->Type == KsObjectTypePin);
KeWaitForSingleObject(&BasicHeader->ControlMutex, Executive, KernelMode, FALSE, NULL); KeWaitForSingleObject(BasicHeader->ControlMutex, Executive, KernelMode, FALSE, NULL);
} }
@ -1606,7 +1608,7 @@ KsReleaseControl(
/* sanity check */ /* sanity check */
ASSERT(BasicHeader->Type == KsObjectTypeFilter || BasicHeader->Type == KsObjectTypePin); ASSERT(BasicHeader->Type == KsObjectTypeFilter || BasicHeader->Type == KsObjectTypePin);
KeReleaseMutex(&BasicHeader->ControlMutex, FALSE); KeReleaseMutex(BasicHeader->ControlMutex, FALSE);
} }
@ -1621,7 +1623,10 @@ KsAcquireDevice(
IN PKSDEVICE Device) IN PKSDEVICE Device)
{ {
IKsDevice *KsDevice; IKsDevice *KsDevice;
PKSIDEVICE_HEADER DeviceHeader = (PKSIDEVICE_HEADER)CONTAINING_RECORD(Device, KSIDEVICE_HEADER, KsDevice); PKSIDEVICE_HEADER DeviceHeader;
DPRINT("KsAcquireDevice\n");
DeviceHeader = (PKSIDEVICE_HEADER)CONTAINING_RECORD(Device, KSIDEVICE_HEADER, KsDevice);
/* get device interface*/ /* get device interface*/
KsDevice = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice; KsDevice = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice;

View file

@ -89,6 +89,8 @@ KsAddItemToObjectBag(
PKSIOBJECT_BAG Bag; PKSIOBJECT_BAG Bag;
PKSIOBJECT_BAG_ENTRY BagEntry; PKSIOBJECT_BAG_ENTRY BagEntry;
DPRINT("KsAddItemToObjectBag\n");
/* get real object bag */ /* get real object bag */
Bag = (PKSIOBJECT_BAG)ObjectBag; Bag = (PKSIOBJECT_BAG)ObjectBag;
@ -363,6 +365,8 @@ _KsEdit(
PVOID Item; PVOID Item;
NTSTATUS Status; NTSTATUS Status;
DPRINT("_KsEdit\n");
/* get real object bag */ /* get real object bag */
Bag = (PKSIOBJECT_BAG)ObjectBag; Bag = (PKSIOBJECT_BAG)ObjectBag;

View file

@ -98,10 +98,10 @@ IKsClock_DispatchDeviceIoControl(
{ {
UNIMPLEMENTED UNIMPLEMENTED
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT); IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_NOT_IMPLEMENTED; return STATUS_SUCCESS;
} }
NTSTATUS NTSTATUS

View file

@ -392,34 +392,18 @@ KsPinPropertyHandler(
break; break;
} }
/* calculate size */ if (Descriptor[Pin->PinId].Interfaces)
Size = sizeof(KSMULTIPLE_ITEM);
Size += max(1, Descriptor[Pin->PinId].InterfacesCount) * sizeof(KSPIN_INTERFACE);
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size)
{ {
Irp->IoStatus.Information = Size; /* use mediums provided by driver */
Status = STATUS_MORE_ENTRIES; return KsHandleSizedListQuery(Irp, Descriptor[Pin->PinId].InterfacesCount, sizeof(KSPIN_MEDIUM), Descriptor[Pin->PinId].Interfaces);
break;
}
Item = (KSMULTIPLE_ITEM*)Buffer;
Item->Size = Size;
if (Descriptor[Pin->PinId].InterfacesCount)
{
Item->Count = Descriptor[Pin->PinId].InterfacesCount;
RtlMoveMemory((PVOID)(Item + 1), Descriptor[Pin->PinId].Interfaces, Descriptor[Pin->PinId].InterfacesCount * sizeof(KSPIN_INTERFACE));
} }
else else
{ {
Item->Count = 1; /* use standard medium */
RtlMoveMemory((PVOID)(Item + 1), &StandardPinInterface, sizeof(KSPIN_INTERFACE)); return KsHandleSizedListQuery(Irp, 1, sizeof(KSPIN_INTERFACE), &StandardPinInterface);
} }
Status = STATUS_SUCCESS;
Irp->IoStatus.Information = Size;
break; break;
case KSPROPERTY_PIN_MEDIUMS: case KSPROPERTY_PIN_MEDIUMS:
Pin = (KSP_PIN*)Property; Pin = (KSP_PIN*)Property;
if (Pin->PinId >= DescriptorsCount) if (Pin->PinId >= DescriptorsCount)

Some files were not shown because too many files have changed in this diff Show more