mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 01:21:00 +00:00
Revert the sync.
We only can safely sync up to r46941. svn path=/branches/header-work/; revision=47096
This commit is contained in:
parent
69b36d050f
commit
cd5c660bf9
|
@ -28,7 +28,6 @@
|
|||
<if property="OPTIMIZE" value="1">
|
||||
<compilerflag>-ftracer</compilerflag>
|
||||
</if>
|
||||
<compilerflag>-fms-extensions</compilerflag>
|
||||
<compilerflag>-Wno-attributes</compilerflag>
|
||||
<compilerflag>-U_UNICODE</compilerflag>
|
||||
<compilerflag>-UUNICODE</compilerflag>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<module name="reg" type="win32cui" installbase="system32" installname="reg.exe" unicode="true">
|
||||
<include base="reg">.</include>
|
||||
<redefine name="_WIN32_WINNT">0x600</redefine>
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group>
|
||||
<installfile installbase="system32">downloader.xml</installfile>
|
||||
<module name="downloader" type="win32gui" installbase="system32" installname="downloader.exe" unicode="yes">
|
||||
<include base="downloader">.</include>
|
||||
<include base="expat">.</include>
|
||||
<group xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<installfile installbase="system32">downloader.xml</installfile>
|
||||
<module name="downloader" type="win32gui" installbase="system32" installname="downloader.exe" unicode="yes">
|
||||
<include base="downloader">.</include>
|
||||
<include base="expat">.</include>
|
||||
|
||||
<library>advapi32</library>
|
||||
<library>ntdll</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
<library>shell32</library>
|
||||
<library>comctl32</library>
|
||||
<library>msimg32</library>
|
||||
<library>shlwapi</library>
|
||||
<library>urlmon</library>
|
||||
<library>uuid</library>
|
||||
<library>expat</library>
|
||||
<library>advapi32</library>
|
||||
<library>ntdll</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
<library>shell32</library>
|
||||
<library>comctl32</library>
|
||||
<library>msimg32</library>
|
||||
<library>shlwapi</library>
|
||||
<library>urlmon</library>
|
||||
<library>uuid</library>
|
||||
<library>expat</library>
|
||||
|
||||
<file>main.c</file>
|
||||
<file>xml.c</file>
|
||||
<file>download.c</file>
|
||||
<file>downloader.rc</file>
|
||||
</module>
|
||||
<file>main.c</file>
|
||||
<file>xml.c</file>
|
||||
<file>download.c</file>
|
||||
<file>downloader.rc</file>
|
||||
</module>
|
||||
</group>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="fontview" type="win32gui" installbase="system32" installname="fontview.exe">
|
||||
<include base="fontview">.</include>
|
||||
<library>gdi32</library>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<module name="kbswitch" type="win32gui" installbase="system32" installname="kbswitch.exe" unicode="yes">
|
||||
<include base="kbswitch">.</include>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<!DOCTYPE project SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="magnify" type="win32gui" installbase="system32" installname="magnify.exe">
|
||||
<include base="magnify">.</include>
|
||||
<library>user32</library>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="mplay32" type="win32gui" installbase="system32" installname="mplay32.exe" unicode="yes">
|
||||
<include base="mplay32">.</include>
|
||||
<library>advapi32</library>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<module name="eventvwr" type="win32gui" installbase="system32" installname="eventvwr.exe" unicode="yes">
|
||||
<include base="eventvwr">.</include>
|
||||
<library>user32</library>
|
||||
|
@ -8,3 +8,4 @@
|
|||
<file>eventvwr.c</file>
|
||||
<file>eventvwr.rc</file>
|
||||
</module>
|
||||
</rbuild>
|
||||
|
|
|
@ -630,9 +630,8 @@ int main(int argc, char* argv[])
|
|||
while ((NeverStop) || (Count < PingCount))
|
||||
{
|
||||
Ping();
|
||||
Sleep(Timeout);
|
||||
Count++;
|
||||
if((NeverStop) || (Count < PingCount))
|
||||
Sleep(Timeout);
|
||||
};
|
||||
|
||||
Cleanup();
|
||||
|
|
|
@ -147,15 +147,15 @@ void LoadSettings(void)
|
|||
if (dwPointSize != 0)
|
||||
Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
hFont = CreateFontIndirect(&Globals.lfFont);
|
||||
if (hFont)
|
||||
{
|
||||
if (Globals.hFont)
|
||||
DeleteObject(Globals.hFont);
|
||||
Globals.hFont = hFont;
|
||||
}
|
||||
|
||||
hFont = CreateFontIndirect(&Globals.lfFont);
|
||||
if (hFont)
|
||||
{
|
||||
if (Globals.hFont)
|
||||
DeleteObject(Globals.hFont);
|
||||
Globals.hFont = hFont;
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
|
|||
{
|
||||
DWORD dwSize;
|
||||
LPBYTE pBytes = NULL;
|
||||
LPWSTR pszText;
|
||||
LPCWSTR pszText;
|
||||
LPWSTR pszAllocText = NULL;
|
||||
DWORD dwPos, i;
|
||||
DWORD dwCharCount;
|
||||
|
@ -110,7 +110,7 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
|
|||
/* fall through */
|
||||
|
||||
case ENCODING_UNICODE:
|
||||
pszText = (LPWSTR) &pBytes[dwPos];
|
||||
pszText = (LPCWSTR) &pBytes[dwPos];
|
||||
dwCharCount = (dwSize - dwPos) / sizeof(WCHAR);
|
||||
break;
|
||||
|
||||
|
@ -174,10 +174,6 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
|
|||
else
|
||||
adwEolnCount[EOLN_LF]++;
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
pszText[i] = ' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ BEGIN
|
|||
MENUITEM "800%", IDM_VIEWZOOM800
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mostra griglia", IDM_VIEWSHOWGRID
|
||||
MENUITEM "Mostra miniature", IDM_VIEWSHOWMINIATURE
|
||||
MENUITEM "Show grid", IDM_VIEWSHOWGRID
|
||||
MENUITEM "Show miniature", IDM_VIEWSHOWMINIATURE
|
||||
END
|
||||
MENUITEM "Visualizza a schermo intero\tCtrl+F", IDM_VIEWFULLSCREEN
|
||||
END
|
||||
|
@ -201,5 +201,5 @@ BEGIN
|
|||
IDS_OPENFILTER, "Bitmap files (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1"
|
||||
IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1"
|
||||
IDS_FILESIZE, "%d bytes"
|
||||
IDS_PRINTRES, "%d x %d pixels per metro"
|
||||
IDS_PRINTRES, "%d x %d pixels per meter"
|
||||
END
|
||||
|
|
|
@ -143,7 +143,6 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
HBITMAP tempBm;
|
||||
int i;
|
||||
TCHAR tooltips[16][30];
|
||||
HDC hDC;
|
||||
|
||||
TCHAR *c;
|
||||
TCHAR sfnFilename[1000];
|
||||
|
@ -153,7 +152,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
TCHAR ofnFiletitle[256];
|
||||
TCHAR ofnFilter[1000];
|
||||
TCHAR miniaturetitle[100];
|
||||
static int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
|
||||
int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
|
||||
0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff
|
||||
};
|
||||
|
||||
|
@ -372,10 +371,8 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
CreateWindowEx(0, _T("Scrollbox"), _T(""), WS_CHILD | WS_VISIBLE, 3, 3, imgXRes, imgYRes, hScrlClient,
|
||||
NULL, hThisInstance, NULL);
|
||||
|
||||
hDC = GetDC(hImageArea);
|
||||
hDrawingDC = CreateCompatibleDC(hDC);
|
||||
hSelDC = CreateCompatibleDC(hDC);
|
||||
ReleaseDC(hImageArea, hDC);
|
||||
hDrawingDC = CreateCompatibleDC(GetDC(hImageArea));
|
||||
hSelDC = CreateCompatibleDC(GetDC(hImageArea));
|
||||
SelectObject(hDrawingDC, CreatePen(PS_SOLID, 0, fgColor));
|
||||
SelectObject(hDrawingDC, CreateSolidBrush(bgColor));
|
||||
|
||||
|
|
|
@ -25,34 +25,6 @@ placeSelWin()
|
|||
//SendMessage(hSelection, WM_PAINT, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
regularize(short x0, short y0, short *x1, short *y1)
|
||||
{
|
||||
if (abs(*x1 - x0) >= abs(*y1 - y0))
|
||||
*y1 = y0 + (*y1 > y0 ? abs(*x1 - x0) : -abs(*x1 - x0));
|
||||
else
|
||||
*x1 = x0 + (*x1 > x0 ? abs(*y1 - y0) : -abs(*y1 - y0));
|
||||
}
|
||||
|
||||
void
|
||||
roundTo8Directions(short x0, short y0, short *x1, short *y1)
|
||||
{
|
||||
if (abs(*x1 - x0) >= abs(*y1 - y0))
|
||||
{
|
||||
if (abs(*y1 - y0) * 5 < abs(*x1 - x0) * 2)
|
||||
*y1 = y0;
|
||||
else
|
||||
*y1 = y0 + (*y1 > y0 ? abs(*x1 - x0) : -abs(*x1 - x0));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (abs(*x1 - x0) * 5 < abs(*y1 - y0) * 2)
|
||||
*x1 = x0;
|
||||
else
|
||||
*x1 = x0 + (*x1 > x0 ? abs(*y1 - y0) : -abs(*y1 - y0));
|
||||
}
|
||||
}
|
||||
|
||||
POINT pointStack[256];
|
||||
short pointSP;
|
||||
POINT *ptStack = NULL;
|
||||
|
@ -175,8 +147,6 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 11:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
roundTo8Directions(startX, startY, &x, &y);
|
||||
Line(hdc, startX, startY, x, y, fg, lineWidth);
|
||||
break;
|
||||
case 12:
|
||||
|
@ -199,30 +169,21 @@ whilePaintingL(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 13:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 14:
|
||||
resetToU1();
|
||||
pointStack[pointSP].x = x;
|
||||
pointStack[pointSP].y = y;
|
||||
if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
|
||||
(short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
|
||||
if (pointSP + 1 >= 2)
|
||||
Poly(hdc, pointStack, pointSP + 1, fg, bg, lineWidth, shapeStyle, FALSE);
|
||||
break;
|
||||
case 15:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 16:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
}
|
||||
|
@ -315,8 +276,6 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 11:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
roundTo8Directions(startX, startY, &x, &y);
|
||||
Line(hdc, startX, startY, x, y, fg, lineWidth);
|
||||
break;
|
||||
case 12:
|
||||
|
@ -326,17 +285,12 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 13:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 14:
|
||||
resetToU1();
|
||||
pointStack[pointSP].x = x;
|
||||
pointStack[pointSP].y = y;
|
||||
if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
|
||||
(short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
|
||||
pointSP++;
|
||||
if (pointSP >= 2)
|
||||
{
|
||||
|
@ -356,14 +310,10 @@ endPaintingL(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 15:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 16:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle);
|
||||
break;
|
||||
}
|
||||
|
@ -448,8 +398,6 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 11:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
roundTo8Directions(startX, startY, &x, &y);
|
||||
Line(hdc, startX, startY, x, y, bg, lineWidth);
|
||||
break;
|
||||
case 12:
|
||||
|
@ -472,30 +420,21 @@ whilePaintingR(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 13:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 14:
|
||||
resetToU1();
|
||||
pointStack[pointSP].x = x;
|
||||
pointStack[pointSP].y = y;
|
||||
if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
|
||||
(short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
|
||||
if (pointSP + 1 >= 2)
|
||||
Poly(hdc, pointStack, pointSP + 1, bg, fg, lineWidth, shapeStyle, FALSE);
|
||||
break;
|
||||
case 15:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 16:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
}
|
||||
|
@ -518,8 +457,6 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 11:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
roundTo8Directions(startX, startY, &x, &y);
|
||||
Line(hdc, startX, startY, x, y, bg, lineWidth);
|
||||
break;
|
||||
case 12:
|
||||
|
@ -529,17 +466,12 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 13:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 14:
|
||||
resetToU1();
|
||||
pointStack[pointSP].x = x;
|
||||
pointStack[pointSP].y = y;
|
||||
if ((pointSP > 0) && (GetAsyncKeyState(VK_SHIFT) < 0))
|
||||
roundTo8Directions(pointStack[pointSP - 1].x, pointStack[pointSP - 1].y,
|
||||
(short *)&pointStack[pointSP].x, (short *)&pointStack[pointSP].y);
|
||||
pointSP++;
|
||||
if (pointSP >= 2)
|
||||
{
|
||||
|
@ -559,14 +491,10 @@ endPaintingR(HDC hdc, short x, short y, int fg, int bg)
|
|||
break;
|
||||
case 15:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
case 16:
|
||||
resetToU1();
|
||||
if (GetAsyncKeyState(VK_SHIFT) < 0)
|
||||
regularize(startX, startY, &x, &y);
|
||||
RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group>
|
||||
<module name="rapps" type="win32gui" installbase="system32" installname="rapps.exe" unicode="yes">
|
||||
<include base="ReactOS">include/reactos</include>
|
||||
|
|
|
@ -2,41 +2,41 @@
|
|||
|
||||
[Section]
|
||||
Name = Mozilla Firefox 3.0
|
||||
Version = 3.0.19
|
||||
Version = 3.0.18
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Web Browsers out there.
|
||||
Size = 7.2M
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla.com/en-US/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/en-US/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/en-US/Firefox%20Setup%203.0.18.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Webbrowser.
|
||||
Size = 7.0M
|
||||
URLSite = http://www.mozilla-europe.org/de/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/de/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/de/Firefox%20Setup%203.0.18.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores navegadores web gratuitos que hay.
|
||||
Size = 7.0M
|
||||
URLSite = http://www.mozilla-europe.org/es/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/es-ES/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/es-ES/Firefox%20Setup%203.0.18.exe
|
||||
|
||||
[Section.0414]
|
||||
Description = Mest populære og best også gratis nettleserene der ute.
|
||||
Size = 7.0M
|
||||
Size = 6.9M
|
||||
URLSite = http://www.mozilla-europe.org/no/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/nb-NO/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/nb-NO/Firefox%20Setup%203.0.18.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych.
|
||||
Size = 7.8M
|
||||
URLSite = http://www.mozilla-europe.org/pl/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/pl/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/pl/Firefox%20Setup%203.0.18.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных браузеров.
|
||||
Size = 7.4M
|
||||
URLSite = http://www.mozilla-europe.org/ru/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/ru/Firefox%20Setup%203.0.19.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/ru/Firefox%20Setup%203.0.18.exe
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = Miranda IM
|
||||
Version = 0.8.21
|
||||
Version = 0.8.18
|
||||
Licence = GPL
|
||||
Description = Open source multiprotocol instant messaging application - May not work completely.
|
||||
Size = 1.6MB
|
||||
Category = 5
|
||||
URLSite = http://www.miranda-im.org/
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.21-unicode.exe
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.18-unicode.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = OpenTTD
|
||||
Version = 1.0.0
|
||||
Version = 0.7.5
|
||||
Licence = GPL v2
|
||||
Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.
|
||||
Size = 3.5MB
|
||||
Size = 2.9MB
|
||||
Category = 4
|
||||
URLSite = http://www.openttd.org/
|
||||
URLDownload = http://binaries.openttd.org/releases/1.0.0/openttd-1.0.0-windows-win32.exe
|
||||
URLDownload = http://binaries.openttd.org/releases/0.7.5/openttd-0.7.5-windows-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = Opera
|
||||
Version = 10.52
|
||||
Version = 10.51
|
||||
Licence = Freeware
|
||||
Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.
|
||||
Size = 12.0M
|
||||
Size = 11.0M
|
||||
Category = 5
|
||||
URLSite = http://www.opera.com/
|
||||
URLDownload = http://get4.opera.com/pub/opera/win/1052/int/Opera_1052_int_Setup.exe
|
||||
URLDownload = http://get4.opera.com/pub/opera/win/1051/int/Opera_1051_int_Setup.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = SciTE
|
||||
Version = 2.11
|
||||
Version = 2.03
|
||||
Licence = Freeware
|
||||
Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.
|
||||
Size = 0.6M
|
||||
Category = 7
|
||||
URLSite = http://www.scintilla.org/
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc211.exe
|
||||
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc203.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = ScummVM
|
||||
Version = 1.1.0
|
||||
Version = 1.0.0
|
||||
Licence = GPL
|
||||
Description = Sam and Max, Day of the Tentacle, etc on ReactOS.
|
||||
Size = 3.4MB
|
||||
Size = 3.1MB
|
||||
Category = 4
|
||||
URLSite = http://scummvm.org/
|
||||
URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.1.0/scummvm-1.1.0-win32.exe
|
||||
URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.0.0/scummvm-1.0.0-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
|
||||
[Section]
|
||||
Name = Mozilla SeaMonkey
|
||||
Version = 2.0.4
|
||||
Version = 2.0.3
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.
|
||||
Size = 10.1MB
|
||||
Size = 10.0MB
|
||||
Category = 5
|
||||
URLSite = http://www.seamonkey-project.org/
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/en-US/SeaMonkey%20Setup%202.0.4.exe
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/en-US/SeaMonkey%20Setup%202.0.3.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen.
|
||||
Size = 10.0MB
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/de/SeaMonkey%20Setup%202.0.4.exe
|
||||
Size = 10.1MB
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/de/SeaMonkey%20Setup%202.0.3.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás.
|
||||
Size = 10.0MB
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/es-ES/SeaMonkey%20Setup%202.0.4.exe
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/es-ES/SeaMonkey%20Setup%202.0.3.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz.
|
||||
Size = 10.8MB
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/pl/SeaMonkey%20Setup%202.0.4.exe
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/pl/SeaMonkey%20Setup%202.0.3.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.
|
||||
Size = 10.4MB
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/ru/SeaMonkey%20Setup%202.0.4.exe
|
||||
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/ru/SeaMonkey%20Setup%202.0.3.exe
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
|
||||
[Section]
|
||||
Name = Mozilla Thunderbird
|
||||
Version = 3.0.4
|
||||
Version = 3.0.3
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Mail Clients out there.
|
||||
Size = 8.6M
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla-europe.org/en/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/en-US/Thunderbird%20Setup%203.0.4.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/en-US/Thunderbird%20Setup%203.0.3.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Mail-Clients.
|
||||
Size = 8.5M
|
||||
Size = 8.4M
|
||||
URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/de/Thunderbird%20Setup%203.0.4.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/de/Thunderbird%20Setup%203.0.3.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores clientes mail que hay.
|
||||
Size = 8.4M
|
||||
URLSite = http://www.mozilla-europe.org/es/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/es-ES/Thunderbird%20Setup%203.0.4.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/es-ES/Thunderbird%20Setup%203.0.3.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty.
|
||||
Size = 9.3M
|
||||
URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/pl/Thunderbird%20Setup%203.0.4.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/pl/Thunderbird%20Setup%203.0.3.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных почтовых клиентов.
|
||||
Size = 8.8M
|
||||
URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/ru/Thunderbird%20Setup%203.0.4.exe
|
||||
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/ru/Thunderbird%20Setup%203.0.3.exe
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
[Section]
|
||||
Name = µTorrent
|
||||
Version = 2.0.1
|
||||
Version = 2.0
|
||||
Licence = Freeware for non-commercial uses
|
||||
Description = Small and fast BitTorrent Client.
|
||||
Size = 314K
|
||||
Size = 312K
|
||||
Category = 5
|
||||
URLSite = http://www.utorrent.com/
|
||||
URLDownload = http://download.utorrent.com/2.0.1/utorrent.exe
|
||||
URLDownload = http://download.utorrent.com/2.0/utorrent.exe
|
||||
CDPath = none
|
||||
|
||||
|
||||
|
|
|
@ -228,6 +228,8 @@ static BOOL CheckCommDlgError(HWND hWnd)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#define MAX_CUSTOM_FILTER_SIZE 50
|
||||
TCHAR CustomFilterBuffer[MAX_CUSTOM_FILTER_SIZE];
|
||||
TCHAR FileNameBuffer[_MAX_PATH];
|
||||
TCHAR FileTitleBuffer[_MAX_PATH];
|
||||
|
||||
|
@ -273,11 +275,25 @@ static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME* pofn)
|
|||
BuildFilterStrings(Filter, FilterPairs, sizeof(FilterPairs) / sizeof(FILTERPAIR));
|
||||
|
||||
pofn->lpstrFilter = Filter;
|
||||
pofn->lpstrCustomFilter = CustomFilterBuffer;
|
||||
pofn->nMaxCustFilter = MAX_CUSTOM_FILTER_SIZE;
|
||||
pofn->nFilterIndex = 0;
|
||||
pofn->lpstrFile = FileNameBuffer;
|
||||
pofn->nMaxFile = _MAX_PATH;
|
||||
pofn->lpstrFileTitle = FileTitleBuffer;
|
||||
pofn->nMaxFileTitle = _MAX_PATH;
|
||||
/* pofn->lpstrInitialDir = _T("");*/
|
||||
/* pofn->lpstrTitle = _T("Import Registry File");*/
|
||||
/* pofn->Flags = OFN_ENABLETEMPLATE + OFN_EXPLORER + OFN_ENABLESIZING;*/
|
||||
pofn->Flags = OFN_HIDEREADONLY;
|
||||
/* pofn->nFileOffset = ;*/
|
||||
/* pofn->nFileExtension = ;*/
|
||||
/* pofn->lpstrDefExt = _T("");*/
|
||||
/* pofn->lCustData = ;*/
|
||||
/* pofn->lpfnHook = ImportRegistryFile_OFNHookProc;*/
|
||||
/* pofn->lpTemplateName = _T("ID_DLG_IMPORT_REGFILE");*/
|
||||
/* pofn->lpTemplateName = MAKEINTRESOURCE(IDD_DIALOG1);*/
|
||||
/* pofn->FlagsEx = ;*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -340,11 +356,11 @@ static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
|
|||
|
||||
hwndExportAll = GetDlgItem(hdlg, IDC_EXPORT_ALL);
|
||||
if (hwndExportAll)
|
||||
SendMessage(hwndExportAll, BM_SETCHECK, pszSelectedKey ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
SendMessage(hwndExportAll, BM_SETCHECK, pszSelectedKey[0] ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
|
||||
hwndExportBranch = GetDlgItem(hdlg, IDC_EXPORT_BRANCH);
|
||||
if (hwndExportBranch)
|
||||
SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey[0] ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
||||
hwndExportBranchText = GetDlgItem(hdlg, IDC_EXPORT_BRANCH_TEXT);
|
||||
if (hwndExportBranchText)
|
||||
|
@ -390,12 +406,7 @@ BOOL ExportRegistryFile(HWND hWnd)
|
|||
InitOpenFileName(hWnd, &ofn);
|
||||
LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
|
||||
ofn.lpstrTitle = Caption;
|
||||
|
||||
/* Only set the path if a key (not the root node) is selected */
|
||||
if (hKeyRoot != 0)
|
||||
{
|
||||
ofn.lCustData = (LPARAM) ExportKeyPath;
|
||||
}
|
||||
ofn.lCustData = (LPARAM) ExportKeyPath;
|
||||
ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK;
|
||||
ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
|
||||
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORTRANGE);
|
||||
|
|
|
@ -49,7 +49,7 @@ void ApplicationPageOnNotify(WPARAM wParam, LPARAM lParam);
|
|||
void ApplicationPageShowContextMenu1(void);
|
||||
void ApplicationPageShowContextMenu2(void);
|
||||
int CALLBACK ApplicationPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
|
||||
int ProcGetIndexByProcessId(DWORD dwProcessId);
|
||||
int PerfGetIndexByProcessId(DWORD dwProcessId);
|
||||
|
||||
#if 0
|
||||
void SwitchToThisWindow (
|
||||
|
@ -236,13 +236,6 @@ void UpdateApplicationListControlViewSetting(void)
|
|||
|
||||
DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
|
||||
{
|
||||
INT i;
|
||||
BOOL bItemRemoved = FALSE;
|
||||
LV_ITEM item;
|
||||
LPAPPLICATION_PAGE_LIST_ITEM pAPLI = NULL;
|
||||
HIMAGELIST hImageListLarge;
|
||||
HIMAGELIST hImageListSmall;
|
||||
|
||||
/* Create the event */
|
||||
hApplicationPageEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
|
||||
|
||||
|
@ -276,55 +269,6 @@ DWORD WINAPI ApplicationPageRefreshThread(void *lpParameter)
|
|||
EnumWindows(EnumWindowsProc, 0);
|
||||
if (noApps)
|
||||
(void)ListView_DeleteAllItems(hApplicationPageListCtrl);
|
||||
|
||||
/* Get the image lists */
|
||||
hImageListLarge = ListView_GetImageList(hApplicationPageListCtrl, LVSIL_NORMAL);
|
||||
hImageListSmall = ListView_GetImageList(hApplicationPageListCtrl, LVSIL_SMALL);
|
||||
|
||||
/* Check to see if we need to remove any items from the list */
|
||||
for (i=ListView_GetItemCount(hApplicationPageListCtrl)-1; i>=0; i--)
|
||||
{
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_IMAGE|LVIF_PARAM;
|
||||
item.iItem = i;
|
||||
(void)ListView_GetItem(hApplicationPageListCtrl, &item);
|
||||
|
||||
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
|
||||
if (!IsWindow(pAPLI->hWnd)||
|
||||
(wcslen(pAPLI->szTitle) <= 0) ||
|
||||
!IsWindowVisible(pAPLI->hWnd) ||
|
||||
(GetParent(pAPLI->hWnd) != NULL) ||
|
||||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
|
||||
(GetWindowLongPtr(pAPLI->hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
ImageList_Remove(hImageListLarge, item.iItem);
|
||||
ImageList_Remove(hImageListSmall, item.iItem);
|
||||
|
||||
(void)ListView_DeleteItem(hApplicationPageListCtrl, item.iItem);
|
||||
HeapFree(GetProcessHeap(), 0, pAPLI);
|
||||
bItemRemoved = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If an item was removed from the list then
|
||||
* we need to resync all the items with the
|
||||
* image list
|
||||
*/
|
||||
if (bItemRemoved)
|
||||
{
|
||||
for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++)
|
||||
{
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_IMAGE;
|
||||
item.iItem = i;
|
||||
item.iImage = i;
|
||||
(void)ListView_SetItem(hApplicationPageListCtrl, &item);
|
||||
}
|
||||
bItemRemoved = FALSE;
|
||||
}
|
||||
|
||||
ApplicationPageUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -389,12 +333,13 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
|
|||
|
||||
void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
|
||||
{
|
||||
LPAPPLICATION_PAGE_LIST_ITEM pAPLI = NULL;
|
||||
HIMAGELIST hImageListLarge;
|
||||
HIMAGELIST hImageListSmall;
|
||||
LV_ITEM item;
|
||||
int i;
|
||||
BOOL bAlreadyInList = FALSE;
|
||||
LPAPPLICATION_PAGE_LIST_ITEM pAPLI = NULL;
|
||||
HIMAGELIST hImageListLarge;
|
||||
HIMAGELIST hImageListSmall;
|
||||
LV_ITEM item;
|
||||
int i;
|
||||
BOOL bAlreadyInList = FALSE;
|
||||
BOOL bItemRemoved = FALSE;
|
||||
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
|
||||
|
@ -461,7 +406,51 @@ void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
|
|||
item.lParam = (LPARAM)pAPLI;
|
||||
(void)ListView_InsertItem(hApplicationPageListCtrl, &item);
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
/* Check to see if we need to remove any items from the list */
|
||||
for (i=ListView_GetItemCount(hApplicationPageListCtrl)-1; i>=0; i--)
|
||||
{
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_IMAGE|LVIF_PARAM;
|
||||
item.iItem = i;
|
||||
(void)ListView_GetItem(hApplicationPageListCtrl, &item);
|
||||
|
||||
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
|
||||
if (!IsWindow(pAPLI->hWnd)||
|
||||
(wcslen(pAPLI->szTitle) <= 0) ||
|
||||
!IsWindowVisible(pAPLI->hWnd) ||
|
||||
(GetParent(pAPLI->hWnd) != NULL) ||
|
||||
(GetWindow(pAPLI->hWnd, GW_OWNER) != NULL) ||
|
||||
(GetWindowLongPtrW(hWnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
ImageList_Remove(hImageListLarge, item.iItem);
|
||||
ImageList_Remove(hImageListSmall, item.iItem);
|
||||
|
||||
(void)ListView_DeleteItem(hApplicationPageListCtrl, item.iItem);
|
||||
HeapFree(GetProcessHeap(), 0, pAPLI);
|
||||
bItemRemoved = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If an item was removed from the list then
|
||||
* we need to resync all the items with the
|
||||
* image list
|
||||
*/
|
||||
if (bItemRemoved)
|
||||
{
|
||||
for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++)
|
||||
{
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_IMAGE;
|
||||
item.iItem = i;
|
||||
item.iImage = i;
|
||||
(void)ListView_SetItem(hApplicationPageListCtrl, &item);
|
||||
}
|
||||
}
|
||||
|
||||
ApplicationPageUpdate();
|
||||
}
|
||||
|
||||
void ApplicationPageUpdate(void)
|
||||
|
@ -889,6 +878,7 @@ void ApplicationPage_OnGotoProcess(void)
|
|||
LPAPPLICATION_PAGE_LIST_ITEM pAPLI = NULL;
|
||||
LV_ITEM item;
|
||||
int i;
|
||||
/* NMHDR nmhdr; */
|
||||
|
||||
for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++) {
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
|
@ -912,7 +902,7 @@ void ApplicationPage_OnGotoProcess(void)
|
|||
/*
|
||||
* Select the process item in the list
|
||||
*/
|
||||
i = ProcGetIndexByProcessId(dwProcessId);
|
||||
i = PerfGetIndexByProcessId(dwProcessId);
|
||||
if (i != -1)
|
||||
{
|
||||
ListView_SetItemState(hProcessPageListCtrl,
|
||||
|
|
|
@ -40,15 +40,6 @@ SYSTEM_HANDLE_INFORMATION SystemHandleInfo;
|
|||
PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorTimeInfo = NULL;
|
||||
PSID SystemUserSid = NULL;
|
||||
|
||||
typedef struct _SIDTOUSERNAME
|
||||
{
|
||||
LIST_ENTRY List;
|
||||
LPWSTR pszName;
|
||||
BYTE Data[0];
|
||||
} SIDTOUSERNAME, *PSIDTOUSERNAME;
|
||||
|
||||
static LIST_ENTRY SidToUserNameHead = {&SidToUserNameHead, &SidToUserNameHead};
|
||||
|
||||
BOOL PerfDataInitialize(void)
|
||||
{
|
||||
SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
|
||||
|
@ -72,8 +63,6 @@ BOOL PerfDataInitialize(void)
|
|||
|
||||
void PerfDataUninitialize(void)
|
||||
{
|
||||
PLIST_ENTRY pCur;
|
||||
PSIDTOUSERNAME pEntry;
|
||||
|
||||
if (pPerfData != NULL)
|
||||
HeapFree(GetProcessHeap(), 0, pPerfData);
|
||||
|
@ -85,15 +74,6 @@ void PerfDataUninitialize(void)
|
|||
FreeSid(SystemUserSid);
|
||||
SystemUserSid = NULL;
|
||||
}
|
||||
|
||||
/* Free user names cache list */
|
||||
pCur = SidToUserNameHead.Flink;
|
||||
while (pCur != &SidToUserNameHead)
|
||||
{
|
||||
pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List);
|
||||
pCur = pCur->Flink;
|
||||
HeapFree(GetProcessHeap(), 0, pEntry);
|
||||
}
|
||||
}
|
||||
|
||||
static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
|
||||
|
@ -106,56 +86,6 @@ static void SidToUserName(PSID Sid, LPWSTR szBuffer, DWORD BufferSize)
|
|||
LookupAccountSidW(NULL, Sid, szBuffer, &BufferSize, szDomainNameUnused, &DomainNameLen, &Use);
|
||||
}
|
||||
|
||||
VOID
|
||||
WINAPI
|
||||
CachedGetUserFromSid(
|
||||
PSID pSid,
|
||||
LPWSTR pUserName,
|
||||
PULONG pcwcUserName)
|
||||
{
|
||||
PLIST_ENTRY pCur;
|
||||
PSIDTOUSERNAME pEntry;
|
||||
ULONG cbSid, cwcUserName;
|
||||
|
||||
cwcUserName = *pcwcUserName;
|
||||
|
||||
/* Walk through the list */
|
||||
for(pCur = SidToUserNameHead.Flink;
|
||||
pCur != &SidToUserNameHead;
|
||||
pCur = pCur->Flink)
|
||||
{
|
||||
pEntry = CONTAINING_RECORD(pCur, SIDTOUSERNAME, List);
|
||||
if (EqualSid((PSID)&pEntry->Data, pSid))
|
||||
{
|
||||
wcsncpy(pUserName, pEntry->pszName, cwcUserName);
|
||||
*pcwcUserName = cwcUserName;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* We didn't find the SID in the list, get the name conventional */
|
||||
SidToUserName(pSid, pUserName, cwcUserName);
|
||||
|
||||
/* Allocate a new entry */
|
||||
*pcwcUserName = wcslen(pUserName);
|
||||
cwcUserName = *pcwcUserName + 1;
|
||||
cbSid = GetLengthSid(pSid);
|
||||
pEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(SIDTOUSERNAME) + cbSid + cwcUserName * sizeof(WCHAR));
|
||||
|
||||
/* Copy the Sid and name to our entry */
|
||||
CopySid(cbSid, (PSID)&pEntry->Data, pSid);
|
||||
pEntry->pszName = (LPWSTR)(pEntry->Data + cbSid);
|
||||
wcsncpy(pEntry->pszName, pUserName, cwcUserName);
|
||||
|
||||
/* Insert the new entry */
|
||||
pEntry->List.Flink = &SidToUserNameHead;
|
||||
pEntry->List.Blink = SidToUserNameHead.Blink;
|
||||
SidToUserNameHead.Blink->Flink = &pEntry->List;
|
||||
SidToUserNameHead.Blink = &pEntry->List;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void PerfDataRefresh(void)
|
||||
{
|
||||
ULONG ulSize;
|
||||
|
@ -176,7 +106,6 @@ void PerfDataRefresh(void)
|
|||
PSECURITY_DESCRIPTOR ProcessSD;
|
||||
PSID ProcessUser;
|
||||
ULONG Buffer[64]; /* must be 4 bytes aligned! */
|
||||
ULONG cwcUserName;
|
||||
|
||||
/* Get new system time */
|
||||
status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), 0);
|
||||
|
@ -412,8 +341,7 @@ ClearInfo:
|
|||
ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS));
|
||||
}
|
||||
|
||||
cwcUserName = sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]);
|
||||
CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName);
|
||||
SidToUserName(ProcessUser, pPerfData[Idx].UserName, sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]));
|
||||
|
||||
if (ProcessSD != NULL)
|
||||
{
|
||||
|
@ -428,29 +356,6 @@ ClearInfo:
|
|||
LeaveCriticalSection(&PerfDataCriticalSection);
|
||||
}
|
||||
|
||||
ULONG PerfDataGetProcessIndex(ULONG pid)
|
||||
{
|
||||
ULONG idx;
|
||||
|
||||
EnterCriticalSection(&PerfDataCriticalSection);
|
||||
|
||||
for (idx = 0; idx < ProcessCount; idx++)
|
||||
{
|
||||
if (PtrToUlong(pPerfData[idx].ProcessId) == pid)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&PerfDataCriticalSection);
|
||||
|
||||
if (idx == ProcessCount)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
ULONG PerfDataGetProcessCount(void)
|
||||
{
|
||||
return ProcessCount;
|
||||
|
@ -482,6 +387,27 @@ BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount)
|
|||
return bSuccessful;
|
||||
}
|
||||
|
||||
int PerfGetIndexByProcessId(DWORD dwProcessId)
|
||||
{
|
||||
int FoundIndex = -1;
|
||||
ULONG Index;
|
||||
|
||||
EnterCriticalSection(&PerfDataCriticalSection);
|
||||
|
||||
for (Index = 0; Index < ProcessCount; Index++)
|
||||
{
|
||||
if (PtrToUlong(pPerfData[Index].ProcessId) == dwProcessId)
|
||||
{
|
||||
FoundIndex = Index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&PerfDataCriticalSection);
|
||||
|
||||
return FoundIndex;
|
||||
}
|
||||
|
||||
ULONG PerfDataGetProcessId(ULONG Index)
|
||||
{
|
||||
ULONG ProcessId;
|
||||
|
|
|
@ -60,7 +60,6 @@ void PerfDataUninitialize(void);
|
|||
void PerfDataRefresh(void);
|
||||
|
||||
BOOL PerfDataGet(ULONG Index, PPERFDATA *lppData);
|
||||
ULONG PerfDataGetProcessIndex(ULONG pid);
|
||||
ULONG PerfDataGetProcessCount(void);
|
||||
ULONG PerfDataGetProcessorUsage(void);
|
||||
ULONG PerfDataGetProcessorSystemUsage(void);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
ULONG Index;
|
||||
ULONG ProcessId;
|
||||
} PROCESS_PAGE_LIST_ITEM, *LPPROCESS_PAGE_LIST_ITEM;
|
||||
|
||||
|
@ -53,27 +54,6 @@ BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCoun
|
|||
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter);
|
||||
int ProcessRunning(ULONG ProcessId);
|
||||
|
||||
int ProcGetIndexByProcessId(DWORD dwProcessId)
|
||||
{
|
||||
int i;
|
||||
LVITEM item;
|
||||
LPPROCESS_PAGE_LIST_ITEM pData;
|
||||
|
||||
for (i=0; i<ListView_GetItemCount(hProcessPageListCtrl); i++)
|
||||
{
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_PARAM;
|
||||
item.iItem = i;
|
||||
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
||||
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
||||
if (pData->ProcessId == dwProcessId)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD GetSelectedProcessId(void)
|
||||
{
|
||||
int Index;
|
||||
|
@ -91,7 +71,7 @@ DWORD GetSelectedProcessId(void)
|
|||
(void)ListView_GetItem(hProcessPageListCtrl, &lvitem);
|
||||
|
||||
if (lvitem.lParam)
|
||||
return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
|
||||
return PerfDataGetProcessId(((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->Index);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -239,7 +219,7 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
|
||||
Index = PerfDataGetProcessIndex(pData->ProcessId);
|
||||
Index = pData->Index;
|
||||
ColumnIndex = pnmdi->item.iSubItem;
|
||||
|
||||
PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, pnmdi->item.cchTextMax);
|
||||
|
@ -434,7 +414,7 @@ void UpdateProcesses()
|
|||
{
|
||||
int i;
|
||||
ULONG l;
|
||||
LV_ITEM item;
|
||||
LV_ITEM item;
|
||||
LPPROCESS_PAGE_LIST_ITEM pData;
|
||||
|
||||
/* Remove old processes */
|
||||
|
@ -451,17 +431,10 @@ void UpdateProcesses()
|
|||
HeapFree(GetProcessHeap(), 0, pData);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for difference in listview process and performance process counts */
|
||||
if (ListView_GetItemCount(hProcessPageListCtrl) != PerfDataGetProcessCount())
|
||||
for (l = 0; l < PerfDataGetProcessCount(); l++)
|
||||
{
|
||||
/* Add new processes by checking against the current items */
|
||||
for (l = 0; l < PerfDataGetProcessCount(); l++)
|
||||
{
|
||||
AddProcess(l);
|
||||
}
|
||||
AddProcess(l);
|
||||
}
|
||||
|
||||
if (TaskManagerSettings.SortColumn != -1)
|
||||
{
|
||||
(void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
|
||||
|
@ -509,7 +482,7 @@ void AddProcess(ULONG Index)
|
|||
item.iItem = i;
|
||||
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
||||
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
||||
if (pData->ProcessId == pid)
|
||||
if (PerfDataGetProcessId(pData->Index) == pid)
|
||||
{
|
||||
bAlreadyInList = TRUE;
|
||||
break;
|
||||
|
@ -518,6 +491,7 @@ void AddProcess(ULONG Index)
|
|||
if (!bAlreadyInList) /* Add */
|
||||
{
|
||||
pData = (LPPROCESS_PAGE_LIST_ITEM)HeapAlloc(GetProcessHeap(), 0, sizeof(PROCESS_PAGE_LIST_ITEM));
|
||||
pData->Index = Index;
|
||||
pData->ProcessId = pid;
|
||||
|
||||
/* Add the item to the list */
|
||||
|
@ -712,8 +686,6 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara
|
|||
int ret = 0;
|
||||
LPPROCESS_PAGE_LIST_ITEM Param1;
|
||||
LPPROCESS_PAGE_LIST_ITEM Param2;
|
||||
ULONG IndexParam1;
|
||||
ULONG IndexParam2;
|
||||
WCHAR text1[260];
|
||||
WCHAR text2[260];
|
||||
ULONG l1;
|
||||
|
@ -732,167 +704,165 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara
|
|||
Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
|
||||
Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
|
||||
}
|
||||
IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId);
|
||||
IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId);
|
||||
|
||||
if (TaskManagerSettings.SortColumn == COLUMN_IMAGENAME)
|
||||
{
|
||||
PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
|
||||
PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
|
||||
PerfDataGetImageName(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
|
||||
PerfDataGetImageName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
|
||||
ret = _wcsicmp(text1, text2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_PID)
|
||||
{
|
||||
l1 = Param1->ProcessId;
|
||||
l2 = Param2->ProcessId;
|
||||
l1 = PerfDataGetProcessId(Param1->Index);
|
||||
l2 = PerfDataGetProcessId(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_USERNAME)
|
||||
{
|
||||
PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
|
||||
PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
|
||||
PerfDataGetUserName(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
|
||||
PerfDataGetUserName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
|
||||
ret = _wcsicmp(text1, text2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID)
|
||||
{
|
||||
l1 = PerfDataGetSessionId(IndexParam1);
|
||||
l2 = PerfDataGetSessionId(IndexParam2);
|
||||
l1 = PerfDataGetSessionId(Param1->Index);
|
||||
l2 = PerfDataGetSessionId(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_CPUUSAGE)
|
||||
{
|
||||
l1 = PerfDataGetCPUUsage(IndexParam1);
|
||||
l2 = PerfDataGetCPUUsage(IndexParam2);
|
||||
l1 = PerfDataGetCPUUsage(Param1->Index);
|
||||
l2 = PerfDataGetCPUUsage(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_CPUTIME)
|
||||
{
|
||||
time1 = PerfDataGetCPUTime(IndexParam1);
|
||||
time2 = PerfDataGetCPUTime(IndexParam2);
|
||||
time1 = PerfDataGetCPUTime(Param1->Index);
|
||||
time2 = PerfDataGetCPUTime(Param2->Index);
|
||||
ret = largeintcmp(time1, time2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGE)
|
||||
{
|
||||
l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
|
||||
l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
|
||||
l1 = PerfDataGetWorkingSetSizeBytes(Param1->Index);
|
||||
l2 = PerfDataGetWorkingSetSizeBytes(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_PEAKMEMORYUSAGE)
|
||||
{
|
||||
l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
|
||||
l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
|
||||
l1 = PerfDataGetPeakWorkingSetSizeBytes(Param1->Index);
|
||||
l2 = PerfDataGetPeakWorkingSetSizeBytes(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGEDELTA)
|
||||
{
|
||||
l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
|
||||
l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
|
||||
l1 = PerfDataGetWorkingSetSizeDelta(Param1->Index);
|
||||
l2 = PerfDataGetWorkingSetSizeDelta(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTS)
|
||||
{
|
||||
l1 = PerfDataGetPageFaultCount(IndexParam1);
|
||||
l2 = PerfDataGetPageFaultCount(IndexParam2);
|
||||
l1 = PerfDataGetPageFaultCount(Param1->Index);
|
||||
l2 = PerfDataGetPageFaultCount(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTSDELTA)
|
||||
{
|
||||
l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
|
||||
l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
|
||||
l1 = PerfDataGetPageFaultCountDelta(Param1->Index);
|
||||
l2 = PerfDataGetPageFaultCountDelta(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_VIRTUALMEMORYSIZE)
|
||||
{
|
||||
l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
|
||||
l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
|
||||
l1 = PerfDataGetVirtualMemorySizeBytes(Param1->Index);
|
||||
l2 = PerfDataGetVirtualMemorySizeBytes(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEDPOOL)
|
||||
{
|
||||
l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
|
||||
l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
|
||||
l1 = PerfDataGetPagedPoolUsagePages(Param1->Index);
|
||||
l2 = PerfDataGetPagedPoolUsagePages(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_NONPAGEDPOOL)
|
||||
{
|
||||
l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
|
||||
l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
|
||||
l1 = PerfDataGetNonPagedPoolUsagePages(Param1->Index);
|
||||
l2 = PerfDataGetNonPagedPoolUsagePages(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_BASEPRIORITY)
|
||||
{
|
||||
l1 = PerfDataGetBasePriority(IndexParam1);
|
||||
l2 = PerfDataGetBasePriority(IndexParam2);
|
||||
l1 = PerfDataGetBasePriority(Param1->Index);
|
||||
l2 = PerfDataGetBasePriority(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_HANDLECOUNT)
|
||||
{
|
||||
l1 = PerfDataGetHandleCount(IndexParam1);
|
||||
l2 = PerfDataGetHandleCount(IndexParam2);
|
||||
l1 = PerfDataGetHandleCount(Param1->Index);
|
||||
l2 = PerfDataGetHandleCount(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_THREADCOUNT)
|
||||
{
|
||||
l1 = PerfDataGetThreadCount(IndexParam1);
|
||||
l2 = PerfDataGetThreadCount(IndexParam2);
|
||||
l1 = PerfDataGetThreadCount(Param1->Index);
|
||||
l2 = PerfDataGetThreadCount(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_USEROBJECTS)
|
||||
{
|
||||
l1 = PerfDataGetUSERObjectCount(IndexParam1);
|
||||
l2 = PerfDataGetUSERObjectCount(IndexParam2);
|
||||
l1 = PerfDataGetUSERObjectCount(Param1->Index);
|
||||
l2 = PerfDataGetUSERObjectCount(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_GDIOBJECTS)
|
||||
{
|
||||
l1 = PerfDataGetGDIObjectCount(IndexParam1);
|
||||
l2 = PerfDataGetGDIObjectCount(IndexParam2);
|
||||
l1 = PerfDataGetGDIObjectCount(Param1->Index);
|
||||
l2 = PerfDataGetGDIObjectCount(Param2->Index);
|
||||
ret = CMP(l1, l2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADS)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.ReadOperationCount;
|
||||
ull2 = iocounters2.ReadOperationCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITES)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.WriteOperationCount;
|
||||
ull2 = iocounters2.WriteOperationCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHER)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.OtherOperationCount;
|
||||
ull2 = iocounters2.OtherOperationCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADBYTES)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.ReadTransferCount;
|
||||
ull2 = iocounters2.ReadTransferCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITEBYTES)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.WriteTransferCount;
|
||||
ull2 = iocounters2.WriteTransferCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
}
|
||||
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHERBYTES)
|
||||
{
|
||||
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
||||
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
||||
PerfDataGetIOCounters(Param1->Index, &iocounters1);
|
||||
PerfDataGetIOCounters(Param2->Index, &iocounters2);
|
||||
ull1 = iocounters1.OtherTransferCount;
|
||||
ull2 = iocounters2.OtherTransferCount;
|
||||
ret = CMP(ull1, ull2);
|
||||
|
|
|
@ -869,7 +869,6 @@ void TaskManager_OnTabWndSelChange(void)
|
|||
HMENU hViewMenu;
|
||||
HMENU hSubMenu;
|
||||
WCHAR szTemp[256];
|
||||
SYSTEM_INFO sysInfo;
|
||||
|
||||
hMenu = GetMenu(hMainWnd);
|
||||
hViewMenu = GetSubMenu(hMenu, 2);
|
||||
|
@ -948,28 +947,16 @@ void TaskManager_OnTabWndSelChange(void)
|
|||
DeleteMenu(hMenu, 3, MF_BYPOSITION);
|
||||
DrawMenuBar(hMainWnd);
|
||||
}
|
||||
hSubMenu = CreatePopupMenu();
|
||||
|
||||
GetSystemInfo(&sysInfo);
|
||||
LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
|
||||
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
|
||||
|
||||
/* Hide CPU graph options on single CPU systems */
|
||||
if (sysInfo.dwNumberOfProcessors > 1)
|
||||
{
|
||||
hSubMenu = CreatePopupMenu();
|
||||
LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
|
||||
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
|
||||
|
||||
LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
|
||||
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
|
||||
|
||||
LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
|
||||
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
|
||||
|
||||
LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
|
||||
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_CPUHISTORY, szTemp, 256);
|
||||
AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, szTemp);
|
||||
|
||||
LoadStringW(hInst, IDS_MENU_SHOWKERNELTIMES, szTemp, 256);
|
||||
AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
|
||||
|
@ -978,7 +965,10 @@ void TaskManager_OnTabWndSelChange(void)
|
|||
CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED);
|
||||
else
|
||||
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
|
||||
*/
|
||||
|
|
|
@ -492,7 +492,7 @@ static int comp_FindSubFile(void *p, const void *key,
|
|||
int leaf, void** next)
|
||||
{
|
||||
*next = (char *)p+strlen(p)+(leaf?5:3);
|
||||
WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (const char *)key);
|
||||
WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (char *)key);
|
||||
return strcmp(p, key);
|
||||
}
|
||||
|
||||
|
@ -1601,7 +1601,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
|
|||
case 0xEE:
|
||||
case 0xEF:
|
||||
{
|
||||
const char* ptr = (const char*) format + 8;
|
||||
char* ptr = (char*) format + 8;
|
||||
BYTE type = format[3];
|
||||
int wnd = -1;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="winver" type="win32gui" installbase="system32" installname="winver.exe" unicode="yes">
|
||||
<include base="winver">.</include>
|
||||
<library>shell32</library>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group>
|
||||
<module name="rpcss" type="win32cui" installbase="system32" installname="rpcss.exe" unicode="yes">
|
||||
<include base="rpcss">.</include>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="telnetd" type="win32cui" installbase="system32" installname="telnetd.exe" unicode="no">
|
||||
<include base="reactos"></include>
|
||||
<include base="telnetd">..</include>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="tftpd" type="win32cui" installbase="system32" installname="tftpd.exe" allowwarnings="true" unicode="no">
|
||||
<include base="reactos"></include>
|
||||
<include base="telnetd">..</include>
|
||||
|
||||
<library>ntdll</library>
|
||||
<library>advapi32</library>
|
||||
<library>ws2_32</library>
|
||||
<library>wine</library>
|
||||
|
||||
<file>tftpd.cpp</file>
|
||||
</module>
|
||||
|
|
|
@ -428,7 +428,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
|
|||
/* ReactOS_KdSerial */
|
||||
CreateFreeLoaderEntry(IniCache, IniSection,
|
||||
L"ReactOS_KdSerial", L"\"ReactOS (RosDbg)\"",
|
||||
L"Windows2003", ArcPath,
|
||||
L"ReactOS", ArcPath,
|
||||
L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /KDSERIAL");
|
||||
|
||||
/* ReactOS_LogFile */
|
||||
|
|
|
@ -132,7 +132,6 @@ InfpOpenInfFileW(
|
|||
IN PCWSTR FileName,
|
||||
IN PCWSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine)
|
||||
{
|
||||
HINF hInf = NULL;
|
||||
|
@ -144,7 +143,6 @@ InfpOpenInfFileW(
|
|||
Status = InfOpenFile(
|
||||
&hInf,
|
||||
&FileNameU,
|
||||
LocaleId,
|
||||
&ErrorLineUL);
|
||||
*ErrorLine = (UINT)ErrorLineUL;
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -254,7 +252,6 @@ INF_OpenBufferedFileA(
|
|||
IN ULONG FileSize,
|
||||
IN PCSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine)
|
||||
{
|
||||
#ifdef __REACTOS__
|
||||
|
@ -266,7 +263,6 @@ INF_OpenBufferedFileA(
|
|||
&hInf,
|
||||
FileBuffer,
|
||||
FileSize,
|
||||
LocaleId,
|
||||
&ErrorLineUL);
|
||||
*ErrorLine = (UINT)ErrorLineUL;
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -110,7 +110,6 @@ InfpOpenInfFileW(
|
|||
IN PCWSTR FileName,
|
||||
IN PCWSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine);
|
||||
|
||||
#endif /* __REACTOS__ */
|
||||
|
@ -133,7 +132,6 @@ INF_OpenBufferedFileA(
|
|||
IN ULONG FileSize,
|
||||
IN PCSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine);
|
||||
|
||||
VOID INF_SetHeap(
|
||||
|
|
|
@ -79,8 +79,6 @@ static PGENERIC_LIST KeyboardList = NULL;
|
|||
static PGENERIC_LIST LayoutList = NULL;
|
||||
static PGENERIC_LIST LanguageList = NULL;
|
||||
|
||||
static LANGID LanguageId = 0;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
static VOID
|
||||
|
@ -424,7 +422,6 @@ CheckUnattendedSetup(VOID)
|
|||
UnattendInf = SetupOpenInfFileW(UnattendInfPath,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (UnattendInf == INVALID_HANDLE_VALUE)
|
||||
|
@ -681,8 +678,6 @@ LanguagePage(PINPUT_RECORD Ir)
|
|||
{
|
||||
SelectedLanguageId = (PWCHAR)GetListEntryUserData(GetCurrentListEntry(LanguageList));
|
||||
|
||||
LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
|
||||
|
||||
if (wcscmp(SelectedLanguageId, DefaultLanguage))
|
||||
{
|
||||
UpdateKBLayout();
|
||||
|
@ -770,7 +765,6 @@ SetupStartPage(PINPUT_RECORD Ir)
|
|||
SetupInf = SetupOpenInfFileW(FileNameBuffer,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (SetupInf == INVALID_HANDLE_VALUE)
|
||||
|
@ -3051,7 +3045,6 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
|||
InfFileSize,
|
||||
(const CHAR*) NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||
|
@ -3266,8 +3259,6 @@ RegistryPage(PINPUT_RECORD Ir)
|
|||
|
||||
DPRINT("Action: %S File: %S Section %S\n", Action, File, Section);
|
||||
|
||||
if (Action == NULL) break; // Hackfix
|
||||
|
||||
if (!_wcsicmp (Action, L"AddReg"))
|
||||
{
|
||||
Delete = FALSE;
|
||||
|
@ -3283,7 +3274,7 @@ RegistryPage(PINPUT_RECORD Ir)
|
|||
|
||||
CONSOLE_SetStatusText(MUIGetString(STRING_IMPORTFILE), File);
|
||||
|
||||
if (!ImportRegistryFile(File, Section, LanguageId, Delete))
|
||||
if (!ImportRegistryFile(File, Section, Delete))
|
||||
{
|
||||
DPRINT("Importing %S failed\n", File);
|
||||
|
||||
|
|
|
@ -617,7 +617,6 @@ registry_callback (HINF hInf, PCWSTR Section, BOOLEAN Delete)
|
|||
BOOLEAN
|
||||
ImportRegistryFile(PWSTR Filename,
|
||||
PWSTR Section,
|
||||
LCID LocaleId,
|
||||
BOOLEAN Delete)
|
||||
{
|
||||
WCHAR FileNameBuffer[MAX_PATH];
|
||||
|
@ -633,7 +632,6 @@ ImportRegistryFile(PWSTR Filename,
|
|||
FileNameBuffer,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LocaleId,
|
||||
&ErrorLine);
|
||||
if (hInf == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
BOOLEAN
|
||||
ImportRegistryFile(PWSTR Filename,
|
||||
PWSTR Section,
|
||||
LCID LocaleId,
|
||||
BOOLEAN Delete);
|
||||
|
||||
BOOLEAN
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<bootstrap installbase="$(CDOUTPUT)/system32" nameoncd="smss.exe" />
|
||||
<include base="usetup">.</include>
|
||||
<include base="zlib">.</include>
|
||||
<include base="newinflib">.</include>
|
||||
<include base="inflib">.</include>
|
||||
<include base="ReactOS">include/reactos/drivers</include>
|
||||
<library>zlib</library>
|
||||
<library>newinflib</library>
|
||||
<library>inflib</library>
|
||||
<library>ext2lib</library>
|
||||
<library>vfatlib</library>
|
||||
<library>ntdll</library>
|
||||
|
|
|
@ -166,7 +166,7 @@ VOID ConOutChar (TCHAR c)
|
|||
VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
|
||||
{
|
||||
ConWrite(szText, _tcslen(szText), nStdHandle);
|
||||
ConWrite(_T("\r\n"), 2, nStdHandle);
|
||||
ConWrite(_T("\n"), 1, nStdHandle);
|
||||
}
|
||||
|
||||
VOID ConOutResPaging(BOOL NewPage, UINT resID)
|
||||
|
|
|
@ -703,7 +703,7 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
LastSpace = i;
|
||||
|
||||
}
|
||||
/* insert the quotation and move things around */
|
||||
/* insert the quoation and move things around */
|
||||
if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1)
|
||||
{
|
||||
memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) );
|
||||
|
@ -712,17 +712,14 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor)
|
|||
{
|
||||
_tcscat(szPrefix,_T("\""));
|
||||
}
|
||||
szPrefix[LastSpace + 1] = _T('\"');
|
||||
szPrefix[LastSpace + 1] = _T('\"');
|
||||
}
|
||||
else if(LastSpace == -1)
|
||||
{
|
||||
/* Add quotation only if none exists already */
|
||||
if (szPrefix[0] != _T('\"'))
|
||||
{
|
||||
_tcscpy(szBaseWord,_T("\""));
|
||||
_tcscat(szBaseWord,szPrefix);
|
||||
_tcscpy(szPrefix,szBaseWord);
|
||||
}
|
||||
_tcscpy(szBaseWord,_T("\""));
|
||||
_tcscat(szBaseWord,szPrefix);
|
||||
_tcscpy(szPrefix,szBaseWord);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 25 KiB |
|
@ -363,12 +363,6 @@ _tmain(int argc, TCHAR *argv[])
|
|||
PrintWin32Error( szMsg, GetLastError());
|
||||
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 ) {
|
||||
LoadString( GetModuleHandle(NULL), STRING_INSERT_DISK, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="runonce" type="win32gui" installbase="system32" installname="runonce.exe" unicode="yes">
|
||||
<include base="runonce">.</include>
|
||||
<library>advapi32</library>
|
||||
|
|
|
@ -212,6 +212,7 @@ StartAutoApplications(
|
|||
WARN("FindFirstFile(%s) failed with error %lu\n", debugstr_w(szPath), GetLastError());
|
||||
return;
|
||||
}
|
||||
szPath[len] = L'\0';
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -219,10 +220,9 @@ StartAutoApplications(
|
|||
{
|
||||
memset(&ExecInfo, 0x0, sizeof(SHELLEXECUTEINFOW));
|
||||
ExecInfo.cbSize = sizeof(ExecInfo);
|
||||
wcscpy(&szPath[len+1], findData.cFileName);
|
||||
ExecInfo.lpVerb = L"open";
|
||||
ExecInfo.lpFile = szPath;
|
||||
ExecInfo.lpDirectory = NULL;
|
||||
ExecInfo.lpFile = findData.cFileName;
|
||||
ExecInfo.lpDirectory = szPath;
|
||||
TRACE("Executing %s in directory %s\n",
|
||||
debugstr_w(findData.cFileName), debugstr_w(szPath));
|
||||
ShellExecuteExW(&ExecInfo);
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<if property="ARCH" value="i386">
|
||||
<if property="ARCH" value="i386>
|
||||
<module name="bootcd" type="iso" output="ReactOS.iso">
|
||||
<bootsector>isoboot</bootsector>
|
||||
</module>
|
||||
</if>
|
||||
<ifnot property="ARCH" value="i386">
|
||||
<ifnot property="ARCH" value="i386>
|
||||
<module name="bootcd" type="iso" output="ReactOS-$(ARCH).iso">
|
||||
<bootsector>isoboot</bootsector>
|
||||
</module>
|
||||
</ifnot>
|
||||
</group>
|
||||
|
|
|
@ -41,7 +41,7 @@ HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.e
|
|||
HKCR,".386","",0x00000000,"vxdfile"
|
||||
HKCR,".vxd","",0x00000000,"vxdfile"
|
||||
HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
|
||||
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
|
||||
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156"
|
||||
|
||||
; Animated Cursors
|
||||
HKCR,".ani","",0x00000000,"anifile"
|
||||
|
|
|
@ -41,7 +41,7 @@ HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.e
|
|||
HKCR,".386","",0x00000000,"vxdfile"
|
||||
HKCR,".vxd","",0x00000000,"vxdfile"
|
||||
HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
|
||||
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
|
||||
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156"
|
||||
|
||||
; Animated Cursors
|
||||
HKCR,".ani","",0x00000000,"anifile"
|
||||
|
|
|
@ -1530,8 +1530,7 @@ HKCU,"Control Panel\Accessibility\Keyboard Preference","On",2,"0"
|
|||
; Internet Explorer
|
||||
|
||||
HKCU,Software\Wine\MSHTML,"GeckoUrl",,"http://source.winehq.org/winegecko.php"
|
||||
;HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
|
||||
HKCU,Software\Wine\MSHTML,"GeckoCabDir",,"C:\ReactOS\"
|
||||
HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
|
||||
|
||||
; Sound Schemes
|
||||
HKCU,"AppEvents",,0x00000012
|
||||
|
|
Binary file not shown.
|
@ -1,14 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<group xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<if property="ARCH" value="i386">
|
||||
<if property="ARCH" value="i386>
|
||||
<module name="livecd" type="liveiso" output="ReactOS-LiveCD.iso">
|
||||
<bootsector>isoboot</bootsector>
|
||||
</module>
|
||||
</if>
|
||||
<ifnot property="ARCH" value="i386">
|
||||
<ifnot property="ARCH" value="i386>
|
||||
<module name="livecd" type="liveiso" output="ReactOS-LiveCD-$(ARCH).iso">
|
||||
<bootsector>isoboot</bootsector>
|
||||
</module>
|
||||
</ifnot>
|
||||
</group>
|
||||
|
|
|
@ -489,6 +489,8 @@ drivers\base\nmidebug\nmidebug.sys 2
|
|||
|
||||
drivers\battery\battc\battc.sys 2
|
||||
|
||||
drivers\bus\isapnp\isapnp.sys 2
|
||||
|
||||
drivers\bus\acpi\cmbatt\cmbatt.sys 2
|
||||
drivers\bus\acpi\compbatt\compbatt.sys 2
|
||||
|
||||
|
@ -634,7 +636,6 @@ media\nls\c_28603.nls 1
|
|||
media\nls\c_28604.nls 1
|
||||
media\nls\c_28605.nls 1
|
||||
media\nls\c_28606.nls 1
|
||||
media\drivers\etc\hosts 5
|
||||
media\drivers\etc\services 5
|
||||
media\inf\audio.inf 6
|
||||
media\inf\acpi.inf 6
|
||||
|
|
|
@ -22,7 +22,6 @@ c_1252.nls=,,,,,,,,,,,,2
|
|||
cdfs.sys=,,,,,,x,,,,,,4
|
||||
cdrom.sys=,,,,,,x,,,,,,4
|
||||
class2.sys=,,,,,,x,,,,,,4
|
||||
isapnp.sys=,,,,,,,,,,,,4
|
||||
kdcom.dll=,,,,,,,,,,,,2
|
||||
disk.sys=,,,,,,x,,,,,,4
|
||||
floppy.sys=,,,,,,x,,,,,,4
|
||||
|
@ -37,16 +36,13 @@ ramdisk.sys=,,,,,,x,,,,,,4
|
|||
ext2.sys=,,,,,,x,,,,,,4
|
||||
|
||||
[HardwareIdsDatabase]
|
||||
;*PNP0A00 = isapnp
|
||||
*PNP0A03 = pci
|
||||
*PNP0C08 = acpi
|
||||
;PCI\CC_0601 = isapnp
|
||||
*PNP0A03 = pci
|
||||
PCI\CC_0604 = pci
|
||||
|
||||
[BootBusExtenders.Load]
|
||||
acpi = acpi.sys
|
||||
pci = pci.sys
|
||||
isapnp = isapnp.sys
|
||||
|
||||
[Cabinets]
|
||||
Cabinet=reactos.cab
|
||||
|
@ -80,7 +76,7 @@ hal.dll=,,,,,,,,,,,,2
|
|||
|
||||
[Files.pci_mp]
|
||||
ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2
|
||||
halmps.dll=,,,,,,,,,,hal.dll,,2
|
||||
halmp.dll=,,,,,,,,,,hal.dll,,2
|
||||
|
||||
[Display]
|
||||
;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>
|
||||
|
|
|
@ -21,22 +21,22 @@ RealEntryPoint:
|
|||
mov ss, ax
|
||||
|
||||
/* checkPoint Charlie - where it all began... */
|
||||
mov si, offset CheckPoint0
|
||||
mov si, offset _CheckPoint0
|
||||
call writestr
|
||||
|
||||
|
||||
/* Setup a real mode stack */
|
||||
mov sp, stack16
|
||||
|
||||
/* Zero BootDrive and BootPartition */
|
||||
xor eax, eax
|
||||
mov BootDrive, eax
|
||||
mov BootPartition, eax
|
||||
mov _BootDrive, eax
|
||||
mov _BootPartition, eax
|
||||
|
||||
/* Store the boot drive */
|
||||
mov BootDrive, dl
|
||||
mov _BootDrive, dl
|
||||
|
||||
/* Store the boot partition */
|
||||
mov BootPartition, dh
|
||||
mov _BootPartition, dh
|
||||
|
||||
/* Load the GDT */
|
||||
lgdt gdtptr
|
||||
|
@ -46,13 +46,13 @@ RealEntryPoint:
|
|||
call x86_16_EnableA20
|
||||
|
||||
/* checkPoint Charlie - where it all began... */
|
||||
mov si, offset CheckPoint1
|
||||
mov si, offset _CheckPoint1
|
||||
call writestr
|
||||
|
||||
call x86_16_BuildPageTables
|
||||
|
||||
/* checkPoint Charlie - where it all began... */
|
||||
mov si, offset CheckPoint2
|
||||
mov si, offset _CheckPoint2
|
||||
call writestr
|
||||
|
||||
/* Check if CPU supports CPUID */
|
||||
|
@ -89,26 +89,26 @@ RealEntryPoint:
|
|||
/* X64 Processor */
|
||||
|
||||
/* checkPoint Charlie - where it all began... */
|
||||
mov si, offset CheckPoint3
|
||||
mov si, offset _CheckPoint3
|
||||
call writestr
|
||||
|
||||
jmp switch64
|
||||
jmp _switch64
|
||||
|
||||
NO_X64_SUPPORT_DETECTED:
|
||||
mov si, offset NotAnX64Processor // Loading message
|
||||
mov si, offset _NotAnX64Processor // Loading message
|
||||
call writestr
|
||||
jmp fail
|
||||
jmp _fail
|
||||
|
||||
NO_CPUID_SUPPORT_DETECTED:
|
||||
mov si, offset NoCPUIDSupport // Loading message
|
||||
call writestr
|
||||
mov si, offset _NoCPUIDSupport // Loading message
|
||||
call writestr
|
||||
|
||||
fail:
|
||||
jmp fail
|
||||
_fail:
|
||||
jmp _fail
|
||||
nop
|
||||
nop
|
||||
|
||||
switch64:
|
||||
_switch64:
|
||||
call x86_16_SwitchToLong
|
||||
|
||||
.code64
|
||||
|
@ -119,7 +119,7 @@ switch64:
|
|||
|
||||
/* GO! */
|
||||
xor rcx, rcx
|
||||
call BootMain
|
||||
call _BootMain
|
||||
|
||||
/* Checkpoint */
|
||||
// mov ax, LMODE_DS
|
||||
|
@ -174,14 +174,14 @@ x86_16_BuildPageTables:
|
|||
push es
|
||||
|
||||
/* Get segment of pml4 */
|
||||
mov eax, offset pml4_startup
|
||||
mov eax, offset _pml4_startup
|
||||
shr eax, 4
|
||||
mov es, ax
|
||||
cld
|
||||
xor di, di
|
||||
|
||||
/* One entry in the PML4 pointing to PDP */
|
||||
mov eax, offset pdp_startup
|
||||
mov eax, offset _pdp_startup
|
||||
or eax, 0x00f
|
||||
stosd
|
||||
/* clear rest */
|
||||
|
@ -190,7 +190,7 @@ x86_16_BuildPageTables:
|
|||
rep stosd
|
||||
|
||||
/* One entry in the PDP pointing to PD */
|
||||
mov eax, offset pd_startup
|
||||
mov eax, offset _pd_startup
|
||||
or eax, 0x00f
|
||||
stosd
|
||||
/* clear rest */
|
||||
|
@ -268,7 +268,7 @@ x86_16_SwitchToLong:
|
|||
mov eax, 0x00a0 // Set PAE and PGE: 10100000b
|
||||
mov cr4, eax
|
||||
|
||||
mov edx, offset pml4_startup // Point cr3 at PML4
|
||||
mov edx, offset _pml4_startup // Point cr3 at PML4
|
||||
mov cr3, edx
|
||||
|
||||
mov ecx, 0xC0000080 // Specify EFER MSR
|
||||
|
@ -405,42 +405,42 @@ gdtptr:
|
|||
.long gdt /* Base Address */
|
||||
|
||||
|
||||
.global BootDrive
|
||||
BootDrive:
|
||||
.global _BootDrive
|
||||
_BootDrive:
|
||||
.long 0
|
||||
|
||||
.global BootPartition
|
||||
BootPartition:
|
||||
.global _BootPartition
|
||||
_BootPartition:
|
||||
.long 0
|
||||
|
||||
.global NotAnX64Processor
|
||||
NotAnX64Processor:
|
||||
.global _NotAnX64Processor
|
||||
_NotAnX64Processor:
|
||||
.ascii "FreeLoader: No x64-compatible CPU detected! Exiting..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
.global NoCPUIDSupport
|
||||
NoCPUIDSupport:
|
||||
.global _NoCPUIDSupport
|
||||
_NoCPUIDSupport:
|
||||
.ascii "FreeLoader: No CPUID instruction support detected! Exiting..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
/////////////////////////// Checkpoint messages ///////////////////////////////
|
||||
.global CheckPoint0
|
||||
CheckPoint0:
|
||||
.global _CheckPoint0
|
||||
_CheckPoint0:
|
||||
.ascii "Starting FreeLoader..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
.global CheckPoint1
|
||||
CheckPoint1:
|
||||
.global _CheckPoint1
|
||||
_CheckPoint1:
|
||||
.ascii "FreeLoader[16-bit]: building page tables..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
.global CheckPoint2
|
||||
CheckPoint2:
|
||||
.global _CheckPoint2
|
||||
_CheckPoint2:
|
||||
.ascii "FreeLoader[16-bit]: checking CPU for x64 long mode..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
.global CheckPoint3
|
||||
CheckPoint3:
|
||||
.global _CheckPoint3
|
||||
_CheckPoint3:
|
||||
.ascii "FreeLoader: Switching to x64 long mode..."
|
||||
.byte 0x0d, 0x0a, 0
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
#include <arch.h>
|
||||
|
||||
|
||||
EXTERN(ChainLoadBiosBootSectorCode)
|
||||
EXTERN(_ChainLoadBiosBootSectorCode)
|
||||
.code64
|
||||
|
||||
call x86_64_SwitchToReal
|
||||
.code16
|
||||
|
||||
/* Set the boot drive */
|
||||
mov dl, BootDrive
|
||||
mov dl, _BootDrive
|
||||
|
||||
/* Load segment registers */
|
||||
cli
|
||||
|
@ -46,7 +46,7 @@ EXTERN(ChainLoadBiosBootSectorCode)
|
|||
// ljmpl $0x0000,$0x7C00
|
||||
jmp 0x7c00:0x0000
|
||||
|
||||
EXTERN(SoftReboot)
|
||||
EXTERN(_SoftReboot)
|
||||
.code64
|
||||
|
||||
call x86_64_SwitchToReal
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <arch.h>
|
||||
|
||||
|
||||
EXTERN(DriveMapInt13HandlerStart)
|
||||
EXTERN(_DriveMapInt13HandlerStart)
|
||||
Int13Handler:
|
||||
|
||||
pushw %bp
|
||||
|
@ -82,7 +82,7 @@ CallOldInt13Handler:
|
|||
|
||||
/* Call old int 13h handler with new drive number */
|
||||
.byte 0x9a /* lcall */
|
||||
EXTERN(DriveMapOldInt13HandlerAddress)
|
||||
EXTERN(_DriveMapOldInt13HandlerAddress)
|
||||
.word 0
|
||||
.word 0
|
||||
|
||||
|
@ -105,7 +105,7 @@ CallersFlags:
|
|||
PassedInDriveNumber:
|
||||
.byte 0
|
||||
|
||||
EXTERN(DriveMapInt13HandlerMapList)
|
||||
EXTERN(_DriveMapInt13HandlerMapList)
|
||||
Int13HandlerMapCount:
|
||||
.byte 0
|
||||
|
||||
|
@ -129,4 +129,4 @@ Int13HandlerDrive4:
|
|||
Int13HandlerDriveNew4:
|
||||
.byte 0
|
||||
|
||||
EXTERN(DriveMapInt13HandlerEnd)
|
||||
EXTERN(_DriveMapInt13HandlerEnd)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* 0x00000400: Found 80486 CPU without CPUID support
|
||||
*/
|
||||
|
||||
EXTERN(CpuidSupported)
|
||||
EXTERN(_CpuidSupported)
|
||||
.code32
|
||||
|
||||
pushl %ecx /* save ECX */
|
||||
|
@ -80,7 +80,7 @@ NoCpuid:
|
|||
* VOID GetCpuid(U32 Level, U32 *eax, U32 *ebx, U32 *ecx, U32 *edx);
|
||||
*/
|
||||
|
||||
EXTERN(GetCpuid)
|
||||
EXTERN(_GetCpuid)
|
||||
.code32
|
||||
|
||||
pushl %ebp
|
||||
|
@ -123,7 +123,7 @@ EXTERN(GetCpuid)
|
|||
* U64 RDTSC(VOID);
|
||||
*/
|
||||
|
||||
EXTERN(RDTSC)
|
||||
EXTERN(_RDTSC)
|
||||
.code32
|
||||
rdtsc
|
||||
ret
|
||||
|
|
|
@ -35,7 +35,7 @@ _pnp_bios_entry_point:
|
|||
_pnp_bios_data_segment:
|
||||
.word 0
|
||||
|
||||
EXTERN(PnpBiosSupported)
|
||||
EXTERN(_PnpBiosSupported)
|
||||
.code64
|
||||
|
||||
push rdi
|
||||
|
@ -113,7 +113,7 @@ _pnp_node_size:
|
|||
_pnp_node_count:
|
||||
.word 0
|
||||
|
||||
EXTERN(PnpBiosGetDeviceNodeCount)
|
||||
EXTERN(_PnpBiosGetDeviceNodeCount)
|
||||
.code64
|
||||
|
||||
push rbp
|
||||
|
@ -182,7 +182,7 @@ _pnp_buffer_offset:
|
|||
_pnp_node_number:
|
||||
.byte 0
|
||||
|
||||
EXTERN(PnpBiosGetDeviceNode)
|
||||
EXTERN(_PnpBiosGetDeviceNode)
|
||||
.code64
|
||||
|
||||
push rbp
|
||||
|
|
|
@ -273,7 +273,7 @@ i386CommonExceptionHandler:
|
|||
SAVE_CPU_REGS
|
||||
|
||||
pushl $SCREEN_ATTR
|
||||
call MachVideoClearScreen
|
||||
call _MachVideoClearScreen
|
||||
add $4,%esp
|
||||
|
||||
movl $i386ExceptionHandlerText,%esi
|
||||
|
@ -485,7 +485,7 @@ i386PrintChar:
|
|||
pushl $SCREEN_ATTR
|
||||
andl $0xff,%eax
|
||||
pushl %eax
|
||||
call MachVideoPutChar
|
||||
call _MachVideoPutChar
|
||||
addl $16,%esp
|
||||
|
||||
ret
|
||||
|
|
|
@ -63,7 +63,7 @@ Int386_regsout:
|
|||
/*
|
||||
* int Int386(int ivec, REGS* in, REGS* out);
|
||||
*/
|
||||
EXTERN(Int386)
|
||||
EXTERN(_Int386)
|
||||
.code64
|
||||
|
||||
/* Get the function parameters */
|
||||
|
|
|
@ -39,6 +39,33 @@ EnableA20()
|
|||
/* Already done */
|
||||
}
|
||||
|
||||
void
|
||||
DumpLoaderBlock()
|
||||
{
|
||||
DbgPrint("LoaderBlock @ %p.\n", &LoaderBlock);
|
||||
DbgPrint("Flags = 0x%x.\n", LoaderBlock.Flags);
|
||||
DbgPrint("MemLower = 0x%p.\n", (PVOID)LoaderBlock.MemLower);
|
||||
DbgPrint("MemHigher = 0x%p.\n", (PVOID)LoaderBlock.MemHigher);
|
||||
DbgPrint("BootDevice = 0x%x.\n", LoaderBlock.BootDevice);
|
||||
DbgPrint("CommandLine = %s.\n", LoaderBlock.CommandLine);
|
||||
DbgPrint("ModsCount = 0x%x.\n", LoaderBlock.ModsCount);
|
||||
DbgPrint("ModsAddr = 0x%p.\n", LoaderBlock.ModsAddr);
|
||||
DbgPrint("Syms = 0x%s.\n", LoaderBlock.Syms);
|
||||
DbgPrint("MmapLength = 0x%x.\n", LoaderBlock.MmapLength);
|
||||
DbgPrint("MmapAddr = 0x%p.\n", (PVOID)LoaderBlock.MmapAddr);
|
||||
DbgPrint("RdLength = 0x%x.\n", LoaderBlock.RdLength);
|
||||
DbgPrint("RdAddr = 0x%p.\n", (PVOID)LoaderBlock.RdAddr);
|
||||
DbgPrint("DrivesCount = 0x%x.\n", LoaderBlock.DrivesCount);
|
||||
DbgPrint("DrivesAddr = 0x%p.\n", (PVOID)LoaderBlock.DrivesAddr);
|
||||
DbgPrint("ConfigTable = 0x%x.\n", LoaderBlock.ConfigTable);
|
||||
DbgPrint("BootLoaderName = 0x%x.\n", LoaderBlock.BootLoaderName);
|
||||
DbgPrint("PageDirectoryStart = 0x%p.\n", (PVOID)LoaderBlock.PageDirectoryStart);
|
||||
DbgPrint("PageDirectoryEnd = 0x%p.\n", (PVOID)LoaderBlock.PageDirectoryEnd);
|
||||
DbgPrint("KernelBase = 0x%p.\n", (PVOID)LoaderBlock.KernelBase);
|
||||
DbgPrint("ArchExtra = 0x%p.\n", (PVOID)LoaderBlock.ArchExtra);
|
||||
|
||||
}
|
||||
|
||||
/*++
|
||||
* FrLdrStartup
|
||||
* INTERNAL
|
||||
|
@ -59,7 +86,222 @@ VOID
|
|||
NTAPI
|
||||
FrLdrStartup(ULONG Magic)
|
||||
{
|
||||
DbgPrint("ReactOS loader is unsupported! Halting.\n", KernelEntryPoint);
|
||||
for(;;);
|
||||
/* Disable Interrupts */
|
||||
_disable();
|
||||
|
||||
/* Re-initalize EFLAGS */
|
||||
__writeeflags(0);
|
||||
|
||||
/* Initialize the page directory */
|
||||
FrLdrSetupPageDirectory();
|
||||
|
||||
/* Set the new PML4 */
|
||||
__writecr3((ULONGLONG)pPML4);
|
||||
|
||||
FrLdrSetupGdtIdt();
|
||||
|
||||
LoaderBlock.FrLdrDbgPrint = DbgPrint;
|
||||
|
||||
// DumpLoaderBlock();
|
||||
|
||||
DbgPrint("Jumping to kernel @ %p.\n", KernelEntryPoint);
|
||||
|
||||
/* Jump to Kernel */
|
||||
(*KernelEntryPoint)(Magic, &LoaderBlock);
|
||||
|
||||
}
|
||||
|
||||
PPAGE_DIRECTORY_AMD64
|
||||
FrLdrGetOrCreatePageDir(PPAGE_DIRECTORY_AMD64 pDir, ULONG Index)
|
||||
{
|
||||
PPAGE_DIRECTORY_AMD64 pSubDir;
|
||||
|
||||
if (!pDir)
|
||||
return NULL;
|
||||
|
||||
if (!pDir->Pde[Index].Valid)
|
||||
{
|
||||
pSubDir = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
|
||||
if (!pSubDir)
|
||||
return NULL;
|
||||
RtlZeroMemory(pSubDir, PAGE_SIZE);
|
||||
pDir->Pde[Index].PageFrameNumber = PtrToPfn(pSubDir);
|
||||
pDir->Pde[Index].Valid = 1;
|
||||
pDir->Pde[Index].Write = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pSubDir = (PPAGE_DIRECTORY_AMD64)((ULONGLONG)(pDir->Pde[Index].PageFrameNumber) * PAGE_SIZE);
|
||||
}
|
||||
return pSubDir;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
FrLdrMapSinglePage(ULONGLONG VirtualAddress, ULONGLONG PhysicalAddress)
|
||||
{
|
||||
PPAGE_DIRECTORY_AMD64 pDir3, pDir2, pDir1;
|
||||
ULONG Index;
|
||||
|
||||
pDir3 = FrLdrGetOrCreatePageDir(pPML4, VAtoPXI(VirtualAddress));
|
||||
pDir2 = FrLdrGetOrCreatePageDir(pDir3, VAtoPPI(VirtualAddress));
|
||||
pDir1 = FrLdrGetOrCreatePageDir(pDir2, VAtoPDI(VirtualAddress));
|
||||
|
||||
if (!pDir1)
|
||||
return FALSE;
|
||||
|
||||
Index = VAtoPTI(VirtualAddress);
|
||||
if (pDir1->Pde[Index].Valid)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pDir1->Pde[Index].Valid = 1;
|
||||
pDir1->Pde[Index].Write = 1;
|
||||
pDir1->Pde[Index].PageFrameNumber = PhysicalAddress / PAGE_SIZE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ULONG
|
||||
FrLdrMapRangeOfPages(ULONGLONG VirtualAddress, ULONGLONG PhysicalAddress, ULONG cPages)
|
||||
{
|
||||
ULONG i;
|
||||
|
||||
for (i = 0; i < cPages; i++)
|
||||
{
|
||||
if (!FrLdrMapSinglePage(VirtualAddress, PhysicalAddress))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
VirtualAddress += PAGE_SIZE;
|
||||
PhysicalAddress += PAGE_SIZE;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/*++
|
||||
* FrLdrSetupPageDirectory
|
||||
* INTERNAL
|
||||
*
|
||||
* Sets up the ReactOS Startup Page Directory.
|
||||
*
|
||||
* Params:
|
||||
* None.
|
||||
*
|
||||
* Returns:
|
||||
* None.
|
||||
*--*/
|
||||
VOID
|
||||
FASTCALL
|
||||
FrLdrSetupPageDirectory(VOID)
|
||||
{
|
||||
ULONG KernelPages;
|
||||
PVOID UserSharedData;
|
||||
|
||||
/* Allocate a Page for the PML4 */
|
||||
pPML4 = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
|
||||
|
||||
ASSERT(pPML4);
|
||||
|
||||
/* The page tables are located at 0xfffff68000000000
|
||||
* We create a recursive self mapping through all 4 levels at
|
||||
* virtual address 0xfffff6fb7dbedf68 */
|
||||
pPML4->Pde[VAtoPXI(PXE_BASE)].Valid = 1;
|
||||
pPML4->Pde[VAtoPXI(PXE_BASE)].Write = 1;
|
||||
pPML4->Pde[VAtoPXI(PXE_BASE)].PageFrameNumber = PtrToPfn(pPML4);
|
||||
|
||||
/* Setup low memory pages */
|
||||
if (FrLdrMapRangeOfPages(0, 0, 1024) < 1024)
|
||||
{
|
||||
DbgPrint("Could not map low memory pages.\n");
|
||||
}
|
||||
|
||||
/* Setup kernel pages */
|
||||
KernelPages = (ROUND_TO_PAGES(NextModuleBase - KERNEL_BASE_PHYS) / PAGE_SIZE);
|
||||
if (FrLdrMapRangeOfPages(KernelBase, KERNEL_BASE_PHYS, KernelPages) != KernelPages)
|
||||
{
|
||||
DbgPrint("Could not map %d kernel pages.\n", KernelPages);
|
||||
}
|
||||
|
||||
/* Setup a page for the idt */
|
||||
pIdt = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
|
||||
IdtBase = KernelBase + KernelPages * PAGE_SIZE;
|
||||
if (!FrLdrMapSinglePage(IdtBase, (ULONGLONG)pIdt))
|
||||
{
|
||||
DbgPrint("Could not map idt page.\n", KernelPages);
|
||||
}
|
||||
|
||||
/* Setup a page for the gdt & tss */
|
||||
pGdt = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
|
||||
GdtBase = IdtBase + PAGE_SIZE;
|
||||
TssBase = GdtBase + 20 * sizeof(ULONG64); // FIXME: don't hardcode
|
||||
if (!FrLdrMapSinglePage(GdtBase, (ULONGLONG)pGdt))
|
||||
{
|
||||
DbgPrint("Could not map gdt page.\n", KernelPages);
|
||||
}
|
||||
|
||||
/* Setup KUSER_SHARED_DATA page */
|
||||
UserSharedData = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory);
|
||||
if (!FrLdrMapSinglePage(KI_USER_SHARED_DATA, (ULONG64)UserSharedData))
|
||||
{
|
||||
DbgPrint("Could not map KUSER_SHARED_DATA page.\n", KernelPages);
|
||||
}
|
||||
|
||||
/* Map APIC page */
|
||||
if (!FrLdrMapSinglePage(APIC_BASE, APIC_PHYS_BASE))
|
||||
{
|
||||
DbgPrint("Could not map APIC page.\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
FrLdrSetupGdtIdt()
|
||||
{
|
||||
PKGDTENTRY64 Entry;
|
||||
KDESCRIPTOR Desc;
|
||||
|
||||
RtlZeroMemory(pGdt, PAGE_SIZE);
|
||||
|
||||
/* Setup KGDT_64_R0_CODE */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_64_R0_CODE);
|
||||
*(PULONG64)Entry = 0x00209b0000000000ULL;
|
||||
|
||||
/* Setup KGDT_64_R0_SS */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_64_R0_SS);
|
||||
*(PULONG64)Entry = 0x00cf93000000ffffULL;
|
||||
|
||||
/* Setup KGDT_64_DATA */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_64_DATA);
|
||||
*(PULONG64)Entry = 0x00cff3000000ffffULL;
|
||||
|
||||
/* Setup KGDT_64_R3_CODE */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_64_R3_CODE);
|
||||
*(PULONG64)Entry = 0x0020fb0000000000ULL;
|
||||
|
||||
/* Setup KGDT_32_R3_TEB */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_32_R3_TEB);
|
||||
*(PULONG64)Entry = 0xff40f3fd50003c00ULL;
|
||||
|
||||
/* Setup TSS entry */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_TSS);
|
||||
KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
|
||||
|
||||
/* Setup the gdt descriptor */
|
||||
Desc.Limit = 12 * sizeof(ULONG64) - 1;
|
||||
Desc.Base = (PVOID)GdtBase;
|
||||
|
||||
/* Set the new Gdt */
|
||||
__lgdt(&Desc.Limit);
|
||||
DbgPrint("Gdtr.Base = %p\n", Desc.Base);
|
||||
|
||||
/* Setup the idt descriptor */
|
||||
Desc.Limit = 12 * sizeof(ULONG64) - 1;
|
||||
Desc.Base = (PVOID)IdtBase;
|
||||
|
||||
/* Set the new Idt */
|
||||
__lidt(&Desc.Limit);
|
||||
DbgPrint("Idtr.Base = %p\n", Desc.Base);
|
||||
|
||||
}
|
||||
|
|
|
@ -29,35 +29,35 @@
|
|||
* This boots the kernel
|
||||
*/
|
||||
.code64
|
||||
.globl PageDirectoryStart
|
||||
.globl _PageDirectoryStart
|
||||
|
||||
.globl pml4_startup
|
||||
.globl pdp_startup
|
||||
.globl pd_startup
|
||||
.globl _pml4_startup
|
||||
.globl _pdp_startup
|
||||
.globl _pd_startup
|
||||
|
||||
.globl PageDirectoryEnd
|
||||
.globl _PageDirectoryEnd
|
||||
|
||||
//
|
||||
// Boot information structure
|
||||
//
|
||||
|
||||
EXTERN(reactos_memory_map_descriptor_size)
|
||||
EXTERN(_reactos_memory_map_descriptor_size)
|
||||
.long 0
|
||||
|
||||
EXTERN(reactos_memory_map)
|
||||
EXTERN(_reactos_memory_map)
|
||||
.rept (32 * /*sizeof(memory_map_t)*/24)
|
||||
.byte 0
|
||||
.endr
|
||||
|
||||
.bss
|
||||
PageDirectoryStart:
|
||||
pml4_startup:
|
||||
_PageDirectoryStart:
|
||||
_pml4_startup:
|
||||
.fill 4096, 1, 0
|
||||
|
||||
pdp_startup:
|
||||
_pdp_startup:
|
||||
.fill 4096, 1, 0
|
||||
|
||||
pd_startup:
|
||||
_pd_startup:
|
||||
.fill 4096, 1, 0
|
||||
|
||||
PageDirectoryEnd:
|
||||
_PageDirectoryEnd:
|
||||
|
|
|
@ -452,23 +452,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
|
|||
SectorCount = Geometry.Sectors;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINTM(DPRINT_HWDETECT, "Using legacy sector size detection\n");
|
||||
|
||||
/* Fall back to legacy detection */
|
||||
if (DrivePartition == 0xff)
|
||||
{
|
||||
/* This is a CD-ROM device */
|
||||
SectorSize = 2048;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is either a floppy disk device (DrivePartition == 0) or
|
||||
* a hard disk device (DrivePartition != 0 && DrivePartition != 0xFF) but
|
||||
* it doesn't matter which one because they both have 512 bytes per sector */
|
||||
SectorSize = 512;
|
||||
}
|
||||
}
|
||||
return EINVAL;
|
||||
|
||||
if (DrivePartition != 0xff && DrivePartition != 0)
|
||||
{
|
||||
|
@ -1435,10 +1419,10 @@ DetectSerialPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
|
|||
/* Set Interrupt */
|
||||
PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
|
||||
PartialDescriptor->Type = CmResourceTypeInterrupt;
|
||||
PartialDescriptor->ShareDisposition = CmResourceShareShared;
|
||||
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
||||
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
||||
PartialDescriptor->u.Interrupt.Level = Irq[i];
|
||||
PartialDescriptor->u.Interrupt.Vector = Irq[i];
|
||||
PartialDescriptor->u.Interrupt.Vector = 0;
|
||||
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
|
||||
|
||||
/* Set serial data (device specific) */
|
||||
|
@ -1545,7 +1529,7 @@ DetectParallelPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
|
|||
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
||||
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
||||
PartialDescriptor->u.Interrupt.Level = Irq[i];
|
||||
PartialDescriptor->u.Interrupt.Vector = Irq[i];
|
||||
PartialDescriptor->u.Interrupt.Vector = 0;
|
||||
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
|
@ -1731,7 +1715,7 @@ DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
|
|||
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
|
||||
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
||||
PartialDescriptor->u.Interrupt.Level = 1;
|
||||
PartialDescriptor->u.Interrupt.Vector = 1;
|
||||
PartialDescriptor->u.Interrupt.Vector = 0;
|
||||
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
|
||||
|
||||
/* Set IO Port 0x60 */
|
||||
|
@ -1903,7 +1887,7 @@ DetectPS2Mouse(PCONFIGURATION_COMPONENT_DATA BusKey)
|
|||
PartialResourceList.PartialDescriptors[0].ShareDisposition = CmResourceShareUndetermined;
|
||||
PartialResourceList.PartialDescriptors[0].Flags = CM_RESOURCE_INTERRUPT_LATCHED;
|
||||
PartialResourceList.PartialDescriptors[0].u.Interrupt.Level = 12;
|
||||
PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 12;
|
||||
PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 0;
|
||||
PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF;
|
||||
|
||||
/* Create controller key */
|
||||
|
|
|
@ -45,6 +45,7 @@ PcMachInit(const char *CmdLine)
|
|||
MachVtbl.PrepareForReactOS = PcPrepareForReactOS;
|
||||
MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
|
||||
MachVtbl.DiskGetBootPath = DiskGetBootPath;
|
||||
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
|
||||
MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
|
||||
MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
|
||||
|
|
|
@ -48,6 +48,7 @@ XboxMachInit(const char *CmdLine)
|
|||
MachVtbl.PrepareForReactOS = XboxPrepareForReactOS;
|
||||
MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
|
||||
MachVtbl.DiskGetBootPath = DiskGetBootPath;
|
||||
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
|
||||
MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
|
||||
MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
|
||||
|
|
|
@ -44,6 +44,12 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!MachDiskNormalizeSystemPath(FileName, sizeof(FileName)))
|
||||
{
|
||||
UiMessageBox("Invalid path to boot sector file");
|
||||
return;
|
||||
}
|
||||
|
||||
FilePointer = FsOpenFile(FileName);
|
||||
if (!FilePointer)
|
||||
{
|
||||
|
|
|
@ -138,20 +138,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
|
|||
|
||||
if (!DissectArcPath(Path, FileName, &DriveNumber, &DrivePartition))
|
||||
return EINVAL;
|
||||
|
||||
if (DrivePartition == 0xff)
|
||||
{
|
||||
/* This is a CD-ROM device */
|
||||
SectorSize = 2048;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is either a floppy disk device (DrivePartition == 0) or
|
||||
* a hard disk device (DrivePartition != 0 && DrivePartition != 0xFF) but
|
||||
* it doesn't matter which one because they both have 512 bytes per sector */
|
||||
SectorSize = 512;
|
||||
}
|
||||
|
||||
SectorSize = (DrivePartition == 0xff ? 2048 : 512);
|
||||
if (DrivePartition != 0xff && DrivePartition != 0)
|
||||
{
|
||||
if (!XboxDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry))
|
||||
|
|
|
@ -440,6 +440,7 @@ void PpcDefaultMachVtbl()
|
|||
|
||||
MachVtbl.GetMemoryMap = PpcGetMemoryMap;
|
||||
|
||||
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
|
||||
MachVtbl.DiskGetBootPath = PpcDiskGetBootPath;
|
||||
MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;
|
||||
|
|
|
@ -107,80 +107,62 @@ DiskGetBootPath(char *BootPath, unsigned Size)
|
|||
{
|
||||
static char Path[] = "multi(0)disk(0)";
|
||||
char Device[4];
|
||||
char Partition[4];
|
||||
PARTITION_TABLE_ENTRY PartitionEntry;
|
||||
MASTER_BOOT_RECORD MasterBootRecord;
|
||||
|
||||
if (BootDrive < 0x80)
|
||||
|
||||
_itoa(BootDrive, Device, 10);
|
||||
if (Size <= sizeof(Path) + 6 + strlen(Device))
|
||||
{
|
||||
/* This is a floppy */
|
||||
|
||||
if (Size <= sizeof(Path) + 7 + strlen(Device))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strcpy(BootPath, Path);
|
||||
|
||||
strcat(BootPath, "fdisk");
|
||||
|
||||
_itoa(BootDrive, Device, 10);
|
||||
strcat(BootPath, "(");
|
||||
strcat(BootPath, Device);
|
||||
strcat(BootPath, ")");
|
||||
return FALSE;
|
||||
}
|
||||
/* FIXME */
|
||||
else if (DiskReadBootRecord(BootDrive, 0, &MasterBootRecord))
|
||||
{
|
||||
/* This is a hard disk */
|
||||
|
||||
if (!DiskGetActivePartitionEntry(BootDrive, &PartitionEntry, &BootPartition))
|
||||
{
|
||||
DbgPrint("Invalid active partition information\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (Size <= sizeof(Path) + 18 + strlen(Device) + strlen(Partition))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strcpy(BootPath, Path);
|
||||
|
||||
strcat(BootPath, "rdisk");
|
||||
|
||||
_itoa(BootDrive - 0x80, Device, 10);
|
||||
strcat(BootPath, "(");
|
||||
strcat(BootPath, Device);
|
||||
strcat(BootPath, ")");
|
||||
|
||||
_itoa(BootPartition, Partition, 10);
|
||||
strcat(BootPath, "partition(");
|
||||
strcat(BootPath, Partition);
|
||||
strcat(BootPath, ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is a CD-ROM drive */
|
||||
|
||||
if (Size <= sizeof(Path) + 7 + strlen(Device))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strcpy(BootPath, Path);
|
||||
|
||||
strcat(BootPath, "cdrom");
|
||||
|
||||
_itoa(BootDrive - 0x80, Device, 10);
|
||||
strcat(BootPath, "(");
|
||||
strcat(BootPath, Device);
|
||||
strcat(BootPath, ")");
|
||||
}
|
||||
|
||||
strcpy(BootPath, Path);
|
||||
strcat(BootPath, BootDrive < 0x80 ? "fdisk" : "cdrom");
|
||||
strcat(strcat(strcat(BootPath, "("), Device), ")");
|
||||
|
||||
if (strcmp(BootPath, "multi(0)disk(0)cdrom(128)") == 0)
|
||||
strcpy(BootPath, "multi(0)disk(0)rdisk(0)partition(1)");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
DiskNormalizeSystemPath(char *SystemPath, unsigned Size)
|
||||
{
|
||||
CHAR BootPath[256];
|
||||
ULONG PartitionNumber;
|
||||
ULONG DriveNumber;
|
||||
PARTITION_TABLE_ENTRY PartEntry;
|
||||
char *p;
|
||||
|
||||
if (!DissectArcPath(SystemPath, BootPath, &DriveNumber, &PartitionNumber))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (0 != PartitionNumber)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (! DiskGetActivePartitionEntry(DriveNumber,
|
||||
&PartEntry,
|
||||
&PartitionNumber) ||
|
||||
PartitionNumber < 1 || 9 < PartitionNumber)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
p = SystemPath;
|
||||
while ('\0' != *p && 0 != _strnicmp(p, "partition(", 10)) {
|
||||
p++;
|
||||
}
|
||||
p = strchr(p, ')');
|
||||
if (NULL == p || '0' != *(p - 1)) {
|
||||
return FALSE;
|
||||
}
|
||||
*(p - 1) = '0' + PartitionNumber;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// This function is in arch/i386/i386disk.c
|
||||
//VOID DiskStopFloppyMotor(VOID)
|
||||
|
||||
|
|
|
@ -197,6 +197,7 @@ BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord,
|
|||
|
||||
BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord)
|
||||
{
|
||||
char ErrMsg[64];
|
||||
ULONG Index;
|
||||
|
||||
// Read master boot record
|
||||
|
@ -230,6 +231,9 @@ BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMA
|
|||
// Check the partition table magic value
|
||||
if (BootRecord->MasterBootRecordMagic != 0xaa55)
|
||||
{
|
||||
sprintf(ErrMsg, "Invalid partition table magic 0x%x found on drive 0x%lx",
|
||||
BootRecord->MasterBootRecordMagic, DriveNumber);
|
||||
DiskError(ErrMsg, 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<!DOCTYPE directory SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="freeldr_arch" type="objectlibrary" crt="static">
|
||||
<include base="freeldr_base">include</include>
|
||||
<include base="freeldr_base">cache</include>
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
<file>disk.c</file>
|
||||
<file>partition.c</file>
|
||||
<file>ramdisk.c</file>
|
||||
<if property="ARCH" value="i386">
|
||||
<file>scsiport.c</file>
|
||||
</if>
|
||||
<file>scsiport.c</file>
|
||||
</directory>
|
||||
<directory name="fs">
|
||||
<file>ext2.c</file>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
#define HYPERSPACE_BASE 0xfffff70000000000ULL
|
||||
#define HAL_BASE 0xffffffff80000000ULL
|
||||
#define APIC_BASE 0xFFFFFFFFFFFE0000ULL
|
||||
#define APIC_BASE 0xfffffffffee00000ULL // FIXME
|
||||
|
||||
#define APIC_PHYS_BASE 0xfee00000
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ extern ULONG BootDrive;
|
|||
extern ULONG BootPartition;
|
||||
|
||||
BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
|
||||
BOOLEAN DiskNormalizeSystemPath(char *SystemPath, unsigned Size);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef struct tagMACHVTBL
|
|||
ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
|
||||
|
||||
BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
|
||||
BOOLEAN (*DiskNormalizeSystemPath)(char *SystemPath, unsigned Size);
|
||||
BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
|
||||
BOOLEAN (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry);
|
||||
ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber);
|
||||
|
|
|
@ -97,6 +97,13 @@ VOID LoadAndBootLinux(PCSTR OperatingSystemName, PCSTR Description)
|
|||
goto LinuxBootFailed;
|
||||
}
|
||||
|
||||
// Open the boot volume
|
||||
if (!MachDiskNormalizeSystemPath(LinuxBootPath, sizeof(LinuxBootPath)))
|
||||
{
|
||||
UiMessageBox("Invalid boot path");
|
||||
goto LinuxBootFailed;
|
||||
}
|
||||
|
||||
// Open the kernel
|
||||
LinuxKernel = FsOpenFile(LinuxKernelName);
|
||||
if (!LinuxKernel)
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#undef MachBeep
|
||||
#undef MachPrepareForReactOS
|
||||
#undef MachDiskGetBootPath
|
||||
#undef MachDiskNormalizeSystemPath
|
||||
#undef MachDiskReadLogicalSectors
|
||||
#undef MachDiskGetDriveGeometry
|
||||
#undef MachDiskGetCacheableBlockCount
|
||||
|
@ -151,6 +152,12 @@ MachDiskGetBootPath(char *BootPath, unsigned Size)
|
|||
return MachVtbl.DiskGetBootPath(BootPath, Size);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size)
|
||||
{
|
||||
return MachVtbl.DiskNormalizeSystemPath(SystemPath, Size);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* B
|
|||
if (p == NULL)
|
||||
return FALSE;
|
||||
p++;
|
||||
*BootPartition = 0;
|
||||
*BootPartition = 0xff;
|
||||
}
|
||||
else if (_strnicmp(p, "cdrom(", 6) == 0)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* B
|
|||
* multi(0)disk(0)cdrom(x)\path
|
||||
*/
|
||||
p = p + 6;
|
||||
*BootDrive = atoi(p) + 0x80;
|
||||
*BootDrive = atoi(p);
|
||||
p = strchr(p, ')');
|
||||
if (p == NULL)
|
||||
return FALSE;
|
||||
|
|
|
@ -718,6 +718,12 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (! MachDiskNormalizeSystemPath(SystemPath,
|
||||
sizeof(SystemPath)))
|
||||
{
|
||||
UiMessageBox("Invalid system path");
|
||||
return;
|
||||
}
|
||||
/* copy system path into kernel command line */
|
||||
strcpy(reactos_kernel_cmdline, SystemPath);
|
||||
}
|
||||
|
|
|
@ -252,36 +252,28 @@ WinLdrSetupGdt(PVOID GdtBase, ULONG64 TssBase)
|
|||
PKGDTENTRY64 Entry;
|
||||
KDESCRIPTOR GdtDesc;
|
||||
|
||||
/* Setup KGDT64_NULL */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_NULL);
|
||||
*(PULONG64)Entry = 0x0000000000000000ULL;
|
||||
|
||||
/* Setup KGDT64_R0_CODE */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_CODE);
|
||||
/* Setup KGDT_64_R0_CODE */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_CODE);
|
||||
*(PULONG64)Entry = 0x00209b0000000000ULL;
|
||||
|
||||
/* Setup KGDT64_R0_DATA */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_DATA);
|
||||
/* Setup KGDT_64_R0_SS */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_SS);
|
||||
*(PULONG64)Entry = 0x00cf93000000ffffULL;
|
||||
|
||||
/* Setup KGDT64_R3_CMCODE */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMCODE);
|
||||
*(PULONG64)Entry = 0x00cffb000000ffffULL;
|
||||
|
||||
/* Setup KGDT64_R3_DATA */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_DATA);
|
||||
/* Setup KGDT_64_DATA */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_64_DATA);
|
||||
*(PULONG64)Entry = 0x00cff3000000ffffULL;
|
||||
|
||||
/* Setup KGDT64_R3_CODE */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CODE);
|
||||
/* Setup KGDT_64_R3_CODE */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R3_CODE);
|
||||
*(PULONG64)Entry = 0x0020fb0000000000ULL;
|
||||
|
||||
/* Setup KGDT64_R3_CMTEB */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMTEB);
|
||||
/* Setup KGDT_32_R3_TEB */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_32_R3_TEB);
|
||||
*(PULONG64)Entry = 0xff40f3fd50003c00ULL;
|
||||
|
||||
/* Setup TSS entry */
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT64_SYS_TSS);
|
||||
Entry = KiGetGdtEntry(GdtBase, KGDT_TSS);
|
||||
KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
|
||||
|
||||
/* Setup GDT descriptor */
|
||||
|
@ -341,8 +333,15 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG64 Pcr, IN ULONG64 Tss)
|
|||
/* LDT is unused */
|
||||
// __lldt(0);
|
||||
|
||||
/* Load selectors for DS/ES/FS/GS/SS */
|
||||
Ke386SetDs(KGDT_64_DATA | RPL_MASK); // 0x2b
|
||||
Ke386SetEs(KGDT_64_DATA | RPL_MASK); // 0x2b
|
||||
Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK); // 0x53
|
||||
Ke386SetGs(KGDT_64_DATA | RPL_MASK); // 0x2b
|
||||
Ke386SetSs(KGDT_64_R0_SS); // 0x18
|
||||
|
||||
/* Load TSR */
|
||||
__ltr(KGDT64_SYS_TSS);
|
||||
__ltr(KGDT_TSS);
|
||||
|
||||
DPRINTM(DPRINT_WINDOWS, "leave WinLdrSetProcessorContext\n");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* $Id$
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Display Control Panel
|
||||
* FILE: lib/cpl/desk/appearance.c
|
||||
|
@ -485,17 +486,11 @@ AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
UpdateSelectedThemeId(HWND hwndDlg, GLOBALS *g)
|
||||
{
|
||||
int sel;
|
||||
sel = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
|
||||
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)sel, 0);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK
|
||||
AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
INT i;
|
||||
GLOBALS *g;
|
||||
LPNMHDR lpnm;
|
||||
|
||||
|
@ -543,7 +538,8 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
g->Theme.bHasChanged = TRUE;
|
||||
UpdateSelectedThemeId(hwndDlg, g);
|
||||
i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
|
||||
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)i, 0);
|
||||
LoadThemeFromReg(g);
|
||||
//SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, WM_PAINT, 0, 0);
|
||||
}
|
||||
|
@ -561,7 +557,6 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case PSN_APPLY:
|
||||
if (g->Theme.bHasChanged)
|
||||
{
|
||||
UpdateSelectedThemeId(hwndDlg, g);
|
||||
ApplyTheme(g);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -94,17 +94,14 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
|
||||
ZeroMemory(&listItem, sizeof(LV_ITEM));
|
||||
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
|
||||
listItem.state = 0;
|
||||
listItem.state = LVIS_SELECTED;
|
||||
listItem.pszText = backgroundItem->szDisplayName;
|
||||
listItem.iImage = -1;
|
||||
listItem.iItem = pGlobalData->listViewItemCount;
|
||||
listItem.lParam = pGlobalData->listViewItemCount;
|
||||
|
||||
(void)ListView_InsertItem(hwndBackgroundList, &listItem);
|
||||
ListView_SetItemState(hwndBackgroundList,
|
||||
pGlobalData->listViewItemCount,
|
||||
LVIS_SELECTED,
|
||||
LVIS_SELECTED);
|
||||
ListView_SetItemState(hwndBackgroundList, pGlobalData->listViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
|
||||
|
||||
pGlobalData->listViewItemCount++;
|
||||
|
||||
|
@ -146,17 +143,14 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
|
||||
ZeroMemory(&listItem, sizeof(LV_ITEM));
|
||||
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
|
||||
listItem.state = 0;
|
||||
listItem.state = LVIS_SELECTED;
|
||||
listItem.pszText = backgroundItem->szDisplayName;
|
||||
listItem.iImage = sfi.iIcon;
|
||||
listItem.iItem = pGlobalData->listViewItemCount;
|
||||
listItem.lParam = pGlobalData->listViewItemCount;
|
||||
|
||||
(void)ListView_InsertItem(hwndBackgroundList, &listItem);
|
||||
ListView_SetItemState(hwndBackgroundList,
|
||||
pGlobalData->listViewItemCount,
|
||||
LVIS_SELECTED,
|
||||
LVIS_SELECTED);
|
||||
ListView_SetItemState(hwndBackgroundList, pGlobalData->listViewItemCount, LVIS_SELECTED, LVIS_SELECTED);
|
||||
|
||||
pGlobalData->listViewItemCount++;
|
||||
}
|
||||
|
@ -460,17 +454,13 @@ OnBrowseButton(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
|||
|
||||
ZeroMemory(&listItem, sizeof(LV_ITEM));
|
||||
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
|
||||
listItem.state = 0;
|
||||
listItem.state = LVIS_SELECTED;
|
||||
listItem.pszText = backgroundItem->szDisplayName;
|
||||
listItem.iImage = sfi.iIcon;
|
||||
listItem.iItem = pGlobalData->listViewItemCount;
|
||||
listItem.lParam = pGlobalData->listViewItemCount;
|
||||
|
||||
(void)ListView_InsertItem(hwndBackgroundList, &listItem);
|
||||
ListView_SetItemState(hwndBackgroundList,
|
||||
pGlobalData->listViewItemCount,
|
||||
LVIS_SELECTED,
|
||||
LVIS_SELECTED);
|
||||
SendMessage(hwndBackgroundList, WM_VSCROLL, SB_BOTTOM, 0);
|
||||
|
||||
pGlobalData->listViewItemCount++;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
/* $Id: effappdlg.c 24836 2007-02-12 03:12:56Z tkreuzer $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Display Control Panel
|
||||
* FILE: dll/cpl/desk/effappdlg.c
|
||||
|
|
|
@ -58,6 +58,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
|||
BEGIN
|
||||
GROUPBOX "²íôîðìàö³ÿ ïðî âåðñ³þ",IDC_STATIC,6,3,210,73
|
||||
CONTROL "Ïîçíà÷èòè ÿê ðîáî÷ó ñòàíö³þ",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,88,10
|
||||
CONTROL "Ïîçíà÷èòè ÿê ðîáî÷ó ñòàíö³þ",IDC_REPORTASWORKSTATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,57,88,10
|
||||
LTEXT "ReactOS áóäóºòüñÿ ÿê ñåðâåðíà ÎÑ. Îáðàòè ïðàïîðåöü, ùîá çì³íèòè ëèøå öåé äîäàòîê.",IDC_STATIC,15,15,183,41
|
||||
PUSHBUTTON "OK",IDOK,166,83,50,14
|
||||
END
|
||||
|
|
|
@ -336,7 +336,6 @@ CBDAPinControl_fnConstructor(
|
|||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// register device filter
|
||||
OutputDebugStringW(L"CBDAPinControl_fnConstructor registering device filter with network provider\n");
|
||||
hr = pNetworkProvider->RegisterDeviceFilter(pUnknown, &RegistrationCtx);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
@ -362,6 +361,7 @@ CBDAPinControl_fnConstructor(
|
|||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -357,7 +357,6 @@ CKsAllocator::GetBuffer(
|
|||
|
||||
if (!m_FreeList.empty())
|
||||
{
|
||||
OutputDebugStringW(L"CKsAllocator::GetBuffer HACK\n");
|
||||
Sample = m_FreeList.top();
|
||||
m_FreeList.pop();
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ CEnumPins::QueryInterface(
|
|||
OutputDebugStringW(Buffer);
|
||||
CoTaskMemFree(lpstr);
|
||||
|
||||
DebugBreak();
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -700,6 +700,7 @@ CInputPin::Receive(IMediaSample *pSample)
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Receive NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
|
@ -711,6 +712,7 @@ CInputPin::ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSample
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
|
@ -722,6 +724,7 @@ CInputPin::ReceiveCanBlock( void)
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return S_FALSE;
|
||||
|
@ -920,6 +923,7 @@ CInputPin::KsQualityNotify(
|
|||
OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n");
|
||||
#endif
|
||||
|
||||
DebugBreak();
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -1110,6 +1114,7 @@ CInputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::Connect NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return NOERROR;
|
||||
}
|
||||
|
@ -1194,6 +1199,7 @@ CInputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
|
|||
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
|
@ -1490,6 +1496,7 @@ CInputPin::CreatePin(
|
|||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CInputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
|
||||
OutputDebugStringW(Buffer);
|
||||
DebugBreak();
|
||||
#endif
|
||||
hr = E_FAIL;
|
||||
}
|
||||
|
@ -1622,6 +1629,7 @@ CInputPin::CreatePinHandle(
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
@ -1632,6 +1640,7 @@ CInputPin::CreatePinHandle(
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
@ -1774,6 +1783,7 @@ CInputPin::LoadProxyPlugins(
|
|||
{
|
||||
// store plugin
|
||||
m_Plugins.push_back(pUnknown);
|
||||
DebugBreak();
|
||||
}
|
||||
// close key
|
||||
RegCloseKey(hSubKey);
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
STDMETHODIMP_(ULONG) Release()
|
||||
{
|
||||
InterlockedDecrement(&m_Ref);
|
||||
DebugBreak();
|
||||
if (!m_Ref)
|
||||
{
|
||||
if (m_Allocator)
|
||||
|
@ -279,6 +280,7 @@ STDMETHODCALLTYPE
|
|||
CMediaSample::SetMediaType(AM_MEDIA_TYPE *pMediaType)
|
||||
{
|
||||
OutputDebugStringW(L"CMediaSample::SetMediaType NotImplemented\n");
|
||||
DebugBreak();
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
|
|
@ -246,16 +246,8 @@ COutputPin::COutputPin(
|
|||
|
||||
ZeroMemory(m_FramingProp, sizeof(m_FramingProp));
|
||||
ZeroMemory(m_FramingEx, sizeof(m_FramingEx));
|
||||
ZeroMemory(&m_MediaFormat, sizeof(AM_MEDIA_TYPE));
|
||||
|
||||
hr = KsGetMediaType(0, &m_MediaFormat, KsObjectParent->KsGetObjectHandle(), m_PinId);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::COutputPin Format %p pbFormat %lu\n", &m_MediaFormat, m_MediaFormat.cbFormat);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
|
||||
assert(hr == S_OK);
|
||||
|
||||
InitializeCriticalSection(&m_Lock);
|
||||
|
@ -1526,8 +1518,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
HRESULT hr;
|
||||
ALLOCATOR_PROPERTIES Properties;
|
||||
IMemAllocatorCallbackTemp *pMemCallback;
|
||||
LPGUID pGuid;
|
||||
ULONG NumGuids = 0;
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[200];
|
||||
|
@ -1550,20 +1540,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
pmt = &m_MediaFormat;
|
||||
}
|
||||
|
||||
if (m_hPin == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
hr = CreatePin(pmt);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
swprintf(Buffer, L"COutputPin::Connect CreatePin handle failed with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// query for IMemInput interface
|
||||
hr = pReceivePin->QueryInterface(IID_IMemInputPin, (void**)&m_MemInputPin);
|
||||
if (FAILED(hr))
|
||||
|
@ -1572,6 +1548,7 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n");
|
||||
#endif
|
||||
|
||||
DebugBreak();
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -1672,24 +1649,10 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
|||
return hr;
|
||||
}
|
||||
|
||||
|
||||
assert(m_hPin != INVALID_HANDLE_VALUE);
|
||||
|
||||
// get all supported sets
|
||||
if (m_Plugins.size() == 0)
|
||||
if (!m_hPin)
|
||||
{
|
||||
if (GetSupportedSets(&pGuid, &NumGuids))
|
||||
{
|
||||
// load all proxy plugins
|
||||
if (FAILED(LoadProxyPlugins(pGuid, NumGuids)));
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"COutputPin::Connect LoadProxyPlugins failed\n");
|
||||
#endif
|
||||
}
|
||||
// free sets
|
||||
CoTaskMemFree(pGuid);
|
||||
}
|
||||
//FIXME create pin handle
|
||||
assert(0);
|
||||
}
|
||||
|
||||
// receive connection;
|
||||
|
@ -1983,26 +1946,13 @@ COutputPin::CreatePin(
|
|||
// query for pin medium
|
||||
hr = KsQueryMediums(&MediumList);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::CreatePin KsQueryMediums failed %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
||||
// query for pin interface
|
||||
hr = KsQueryInterfaces(&InterfaceList);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// failed
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::CreatePin KsQueryInterfaces failed %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
|
||||
CoTaskMemFree(MediumList);
|
||||
return hr;
|
||||
}
|
||||
|
@ -2053,12 +2003,6 @@ COutputPin::CreatePin(
|
|||
CoTaskMemFree(MediumList);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -2066,12 +2010,7 @@ COutputPin::CreatePin(
|
|||
hr = InterfaceHandler->KsSetPin((IKsPin*)this);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// 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
|
||||
// failed to load interface handler plugin
|
||||
InterfaceHandler->Release();
|
||||
CoTaskMemFree(MediumList);
|
||||
CoTaskMemFree(InterfaceList);
|
||||
|
@ -2088,6 +2027,7 @@ COutputPin::CreatePin(
|
|||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::CreatePin unexpected communication %u %s\n", m_Communication, m_PinName);
|
||||
OutputDebugStringW(Buffer);
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
hr = E_FAIL;
|
||||
|
@ -2097,12 +2037,6 @@ COutputPin::CreatePin(
|
|||
CoTaskMemFree(MediumList);
|
||||
CoTaskMemFree(InterfaceList);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::CreatePin Result %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -2124,14 +2058,11 @@ COutputPin::CreatePinHandle(
|
|||
//KSPROPERTY Property;
|
||||
//ULONG BytesReturned;
|
||||
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle\n");
|
||||
|
||||
if (m_hPin != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
// pin already exists
|
||||
//CloseHandle(m_hPin);
|
||||
//m_hPin = INVALID_HANDLE_VALUE;
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle pin already exists\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -2144,10 +2075,9 @@ COutputPin::CreatePinHandle(
|
|||
if (!PinConnect)
|
||||
{
|
||||
// failed
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle out of memory\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle copy pinconnect\n");
|
||||
|
||||
// setup request
|
||||
CopyMemory(&PinConnect->Interface, Interface, sizeof(KSPIN_INTERFACE));
|
||||
CopyMemory(&PinConnect->Medium, Medium, sizeof(KSPIN_MEDIUM));
|
||||
|
@ -2158,7 +2088,7 @@ COutputPin::CreatePinHandle(
|
|||
|
||||
// get dataformat offset
|
||||
DataFormat = (PKSDATAFORMAT)(PinConnect + 1);
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle copy format\n");
|
||||
|
||||
// copy data format
|
||||
DataFormat->FormatSize = sizeof(KSDATAFORMAT) + pmt->cbFormat;
|
||||
DataFormat->Flags = 0;
|
||||
|
@ -2171,19 +2101,13 @@ COutputPin::CreatePinHandle(
|
|||
if (pmt->cbFormat)
|
||||
{
|
||||
// copy extended format
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"COutputPin::CreatePinHandle copy format %p pbFormat %lu\n", pmt, pmt->cbFormat);
|
||||
OutputDebugStringW(Buffer);
|
||||
CopyMemory((DataFormat + 1), pmt->pbFormat, pmt->cbFormat);
|
||||
}
|
||||
|
||||
// get IKsObject interface
|
||||
hr = m_ParentFilter->QueryInterface(IID_IKsObject, (LPVOID*)&KsObjectParent);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle no IID_IKsObject interface\n");
|
||||
return hr;
|
||||
}
|
||||
|
||||
// get parent filter handle
|
||||
hFilter = KsObjectParent->KsGetObjectHandle();
|
||||
|
@ -2192,19 +2116,13 @@ COutputPin::CreatePinHandle(
|
|||
KsObjectParent->Release();
|
||||
|
||||
if (!hFilter)
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle no filter handle\n");
|
||||
return E_HANDLE;
|
||||
}
|
||||
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle before creating pin\n");
|
||||
// create pin
|
||||
DWORD dwError = KsCreatePin(hFilter, PinConnect, GENERIC_READ, &m_hPin);
|
||||
hr = KsCreatePin(hFilter, PinConnect, GENERIC_READ, &m_hPin);
|
||||
|
||||
if (dwError == ERROR_SUCCESS)
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle created pin\n");
|
||||
|
||||
// store current interface / medium
|
||||
CopyMemory(&m_Medium, Medium, sizeof(KSPIN_MEDIUM));
|
||||
CopyMemory(&m_Interface, Interface, sizeof(KSPIN_INTERFACE));
|
||||
|
@ -2255,14 +2173,42 @@ COutputPin::CreatePinHandle(
|
|||
if (FAILED(InitializeIOThread()))
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle failed to initialize i/o thread\n");
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
LPGUID pGuid;
|
||||
ULONG NumGuids = 0;
|
||||
|
||||
// get all supported sets
|
||||
hr = GetSupportedSets(&pGuid, &NumGuids);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
||||
// load all proxy plugins
|
||||
hr = LoadProxyPlugins(pGuid, NumGuids);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
||||
// free sets
|
||||
CoTaskMemFree(pGuid);
|
||||
|
||||
|
||||
//TODO
|
||||
// connect pin pipes
|
||||
|
||||
}
|
||||
else
|
||||
OutputDebugStringW(L"COutputPin::CreatePinHandle failed to create pin\n");
|
||||
// free pin connect
|
||||
CoTaskMemFree(PinConnect);
|
||||
|
||||
|
@ -2392,6 +2338,7 @@ COutputPin::LoadProxyPlugins(
|
|||
{
|
||||
// store plugin
|
||||
m_Plugins.push_back(pUnknown);
|
||||
DebugBreak();
|
||||
}
|
||||
// close key
|
||||
RegCloseKey(hSubKey);
|
||||
|
@ -2410,48 +2357,17 @@ COutputPin::IoProcessRoutine()
|
|||
IMediaSample *Sample;
|
||||
LONG SampleCount;
|
||||
HRESULT hr;
|
||||
PKSSTREAM_SEGMENT * StreamSegment;
|
||||
PKSSTREAM_SEGMENT StreamSegment;
|
||||
HANDLE hEvent;
|
||||
IMediaSample ** Samples;
|
||||
LONG NumHandles;
|
||||
DWORD dwStatus;
|
||||
IMediaSample * Samples[1];
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[200];
|
||||
#endif
|
||||
|
||||
NumHandles = m_Properties.cBuffers / 2;
|
||||
|
||||
if (!NumHandles)
|
||||
NumHandles = 8;
|
||||
|
||||
assert(NumHandles);
|
||||
|
||||
//allocate stream segment array
|
||||
StreamSegment = (PKSSTREAM_SEGMENT*)CoTaskMemAlloc(sizeof(PKSSTREAM_SEGMENT) * NumHandles);
|
||||
if (!StreamSegment)
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::IoProcessRoutine out of memory\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// allocate handle array
|
||||
Samples = (IMediaSample**)CoTaskMemAlloc(sizeof(IMediaSample*) * NumHandles);
|
||||
if (!Samples)
|
||||
{
|
||||
OutputDebugStringW(L"COutputPin::IoProcessRoutine out of memory\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// zero handles array
|
||||
ZeroMemory(StreamSegment, sizeof(PKSSTREAM_SEGMENT) * NumHandles);
|
||||
ZeroMemory(Samples, sizeof(IMediaSample*) * NumHandles);
|
||||
|
||||
// first wait for the start event to signal
|
||||
WaitForSingleObject(m_hStartEvent, INFINITE);
|
||||
|
||||
m_IoCount = 0;
|
||||
|
||||
assert(m_InterfaceHandler);
|
||||
do
|
||||
{
|
||||
|
@ -2476,14 +2392,14 @@ COutputPin::IoProcessRoutine()
|
|||
|
||||
// fill buffer
|
||||
SampleCount = 1;
|
||||
Samples[m_IoCount] = Sample;
|
||||
Samples[0] = Sample;
|
||||
|
||||
Sample->SetTime(NULL, NULL);
|
||||
hr = m_InterfaceHandler->KsProcessMediaSamples(NULL, /* FIXME */
|
||||
&Samples[m_IoCount],
|
||||
Samples,
|
||||
&SampleCount,
|
||||
KsIoOperation_Read,
|
||||
&StreamSegment[m_IoCount]);
|
||||
&StreamSegment);
|
||||
if (FAILED(hr) || !StreamSegment)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
|
@ -2493,26 +2409,14 @@ COutputPin::IoProcessRoutine()
|
|||
break;
|
||||
}
|
||||
|
||||
// interface handle should increment pending i/o count
|
||||
assert(m_IoCount >= 1);
|
||||
|
||||
swprintf(Buffer, L"COutputPin::IoProcessRoutine m_IoCount %lu NumHandles %lu\n", m_IoCount, NumHandles);
|
||||
OutputDebugStringW(Buffer);
|
||||
|
||||
if (m_IoCount != NumHandles)
|
||||
continue;
|
||||
|
||||
// get completion handle
|
||||
hEvent = StreamSegment[0]->CompletionEvent;
|
||||
// get completion event
|
||||
hEvent = StreamSegment->CompletionEvent;
|
||||
|
||||
// wait for i/o completion
|
||||
dwStatus = WaitForSingleObject(hEvent, INFINITE);
|
||||
|
||||
swprintf(Buffer, L"COutputPin::IoProcessRoutine dwStatus %lx Error %lx NumHandles %lu\n", dwStatus, GetLastError(), NumHandles);
|
||||
OutputDebugStringW(Buffer);
|
||||
WaitForSingleObject(hEvent, INFINITE);
|
||||
|
||||
// perform completion
|
||||
m_InterfaceHandler->KsCompleteIo(StreamSegment[0]);
|
||||
m_InterfaceHandler->KsCompleteIo(StreamSegment);
|
||||
|
||||
// close completion event
|
||||
CloseHandle(hEvent);
|
||||
|
@ -2522,7 +2426,7 @@ COutputPin::IoProcessRoutine()
|
|||
assert(m_MemInputPin);
|
||||
|
||||
// now deliver the sample
|
||||
hr = m_MemInputPin->Receive(Samples[0]);
|
||||
hr = m_MemInputPin->Receive(Sample);
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
swprintf(Buffer, L"COutputPin::IoProcessRoutine PinName %s IMemInputPin::Receive hr %lx Sample %p m_MemAllocator %p\n", m_PinName, hr, Sample, m_MemAllocator);
|
||||
|
@ -2534,11 +2438,6 @@ COutputPin::IoProcessRoutine()
|
|||
|
||||
Sample = NULL;
|
||||
}
|
||||
|
||||
//circular stream segment array
|
||||
RtlMoveMemory(StreamSegment, &StreamSegment[1], sizeof(PKSSTREAM_SEGMENT) * (NumHandles - 1));
|
||||
RtlMoveMemory(Samples, &Samples[1], sizeof(IMediaSample*) * (NumHandles - 1));
|
||||
|
||||
}while(TRUE);
|
||||
|
||||
// signal end of i/o thread
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define _FORCENAMELESSUNION
|
||||
#define BUILDING_KS
|
||||
#define _KSDDK_
|
||||
#define KSPROXY_TRACE
|
||||
//#define KSPROXY_TRACE
|
||||
#include <dshow.h>
|
||||
//#include <streams.h>
|
||||
#include <ks.h>
|
||||
|
|
|
@ -1954,6 +1954,7 @@ CKsProxy::IsDirty()
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -2034,6 +2035,7 @@ CKsProxy::Load(
|
|||
|
||||
}while(Length > 0);
|
||||
|
||||
DebugBreak();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -2057,6 +2059,7 @@ CKsProxy::GetSizeMax(
|
|||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
|
||||
DebugBreak();
|
||||
#endif
|
||||
|
||||
return E_NOTIMPL;
|
||||
|
@ -2477,50 +2480,23 @@ CKsProxy::CreatePins()
|
|||
// query current instance count
|
||||
hr = GetPinInstanceCount(Index, &Instances);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CKsProxy::CreatePins GetPinInstanceCount failed with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// query pin communication;
|
||||
hr = GetPinCommunication(Index, &Communication);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CKsProxy::CreatePins GetPinCommunication failed with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Instances.CurrentCount == Instances.PossibleCount)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
// get direction of pin
|
||||
hr = GetPinDataflow(Index, &DataFlow);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CKsProxy::CreatePins GetPinDataflow failed with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
if (DataFlow == KSPIN_DATAFLOW_IN)
|
||||
hr = GetPinName(Index, DataFlow, InputPin, &PinName);
|
||||
|
@ -2528,14 +2504,7 @@ CKsProxy::CreatePins()
|
|||
hr = GetPinName(Index, DataFlow, OutputPin, &PinName);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
WCHAR Buffer[100];
|
||||
swprintf(Buffer, L"CKsProxy::CreatePins GetPinName failed with %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
// construct the pins
|
||||
if (DataFlow == KSPIN_DATAFLOW_IN)
|
||||
|
@ -2543,11 +2512,6 @@ CKsProxy::CreatePins()
|
|||
hr = CInputPin_Constructor((IBaseFilter*)this, PinName, m_hDevice, Index, Communication, IID_IPin, (void**)&pPin);
|
||||
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);
|
||||
continue;
|
||||
}
|
||||
|
@ -2558,11 +2522,6 @@ CKsProxy::CreatePins()
|
|||
hr = COutputPin_Constructor((IBaseFilter*)this, PinName, Index, Communication, IID_IPin, (void**)&pPin);
|
||||
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);
|
||||
continue;
|
||||
}
|
||||
|
@ -2668,12 +2627,9 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
|
|||
hr = LoadProxyPlugins(pGuid, NumGuids);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
#if 0 //HACK
|
||||
CloseHandle(m_hDevice);
|
||||
m_hDevice = NULL;
|
||||
return hr;
|
||||
#endif
|
||||
OutputDebugStringW(L"CKsProxy::LoadProxyPlugins failed!\n");
|
||||
}
|
||||
|
||||
// free sets
|
||||
|
@ -2682,14 +2638,6 @@ CKsProxy::Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog)
|
|||
// now create the input / output pins
|
||||
hr = CreatePins();
|
||||
|
||||
#ifdef KSPROXY_TRACE
|
||||
swprintf(Buffer, L"CKsProxy::Load CreatePins %lx\n", hr);
|
||||
OutputDebugStringW(Buffer);
|
||||
#endif
|
||||
|
||||
//HACK
|
||||
hr = S_OK;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -3038,6 +2986,10 @@ STDMETHODCALLTYPE
|
|||
CKsProxy::EnumPins(
|
||||
IEnumPins **ppEnum)
|
||||
{
|
||||
#ifdef KSPROXY_TRACE
|
||||
OutputDebugStringW(L"CKsProxy::EnumPins\n");
|
||||
#endif
|
||||
|
||||
return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,14 @@ CEnumPins_fnConstructor(
|
|||
{
|
||||
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)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
|
|
@ -9,14 +9,10 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
const GUID KSCATEGORY_BDA_NETWORK_PROVIDER = {0x71985f4b, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}};
|
||||
#endif
|
||||
|
||||
static INTERFACE_TABLE InterfaceTable[] =
|
||||
{
|
||||
{&CLSID_DVBTNetworkProvider, CNetworkProvider_fnConstructor, L"ReactOS DVBT Network Provider"},
|
||||
{NULL, NULL, NULL}
|
||||
{&CLSID_DVBTNetworkProvider, CNetworkProvider_fnConstructor},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
extern "C"
|
||||
|
@ -57,19 +53,8 @@ DllUnregisterServer(void)
|
|||
HRESULT hr = S_OK;
|
||||
HKEY hClass;
|
||||
|
||||
|
||||
hr = StringFromCLSID(KSCATEGORY_BDA_NETWORK_PROVIDER, &pStr);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_SET_VALUE, &hClass) != ERROR_SUCCESS)
|
||||
{
|
||||
CoTaskMemFree(pStr);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
RegDeleteKeyW(hClass, pStr);
|
||||
CoTaskMemFree(pStr);
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -86,24 +71,6 @@ DllUnregisterServer(void)
|
|||
return hr;
|
||||
}
|
||||
|
||||
VOID
|
||||
RegisterBDAComponent(
|
||||
HKEY hFilter,
|
||||
LPCWSTR ComponentClsid,
|
||||
LPCWSTR ComponentName)
|
||||
{
|
||||
HKEY hComp;
|
||||
|
||||
// create network provider filter key
|
||||
if (RegCreateKeyExW(hFilter, ComponentClsid, 0, NULL, 0, KEY_WRITE, NULL, &hComp, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
// store class id
|
||||
RegSetValueExW(hComp, L"CLSID", 0, REG_SZ, (const BYTE*)ComponentClsid, (wcslen(ComponentClsid)+1) * sizeof(WCHAR));
|
||||
RegSetValueExW(hComp, L"FriendlyName", 0, REG_SZ, (const BYTE*)ComponentName, (wcslen(ComponentName)+1) * sizeof(WCHAR));
|
||||
RegCloseKey(hComp);
|
||||
}
|
||||
}
|
||||
|
||||
extern "C"
|
||||
KSDDKAPI
|
||||
HRESULT
|
||||
|
@ -113,50 +80,12 @@ DllRegisterServer(void)
|
|||
ULONG Index = 0;
|
||||
LPOLESTR pStr;
|
||||
HRESULT hr = S_OK;
|
||||
HKEY hClass, hKey, hSubKey, hProvider, hInstance, hFilter;
|
||||
HKEY hClass, hKey, hSubKey;
|
||||
static LPCWSTR ModuleName = L"msdvbnp.ax";
|
||||
static LPCWSTR ThreadingModel = L"Both";
|
||||
|
||||
hr = StringFromCLSID(KSCATEGORY_BDA_NETWORK_PROVIDER, &pStr);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_WRITE, &hClass) != ERROR_SUCCESS)
|
||||
{
|
||||
CoTaskMemFree(pStr);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (RegCreateKeyExW(hClass, pStr, 0, NULL, 0, KEY_WRITE, NULL, &hProvider, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hClass);
|
||||
CoTaskMemFree(pStr);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
CoTaskMemFree(pStr);
|
||||
|
||||
if (RegCreateKeyExW(hProvider, L"Instance", 0, NULL, 0, KEY_WRITE, NULL, &hInstance, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hClass);
|
||||
return E_FAIL;
|
||||
}
|
||||
RegCloseKey(hProvider);
|
||||
|
||||
/* open active movie filter category key */
|
||||
if (RegCreateKeyExW(hClass, L"{da4e3da0-d07d-11d0-bd50-00a0c911ce86}\\Instance", 0, NULL, 0, KEY_WRITE, NULL, &hFilter, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hClass);
|
||||
RegCloseKey(hInstance);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
RegisterBDAComponent(hFilter, L"{71985F4A-1CA1-11d3-9CC8-00C04F7971E0}", L"BDA Playback Filter");
|
||||
RegisterBDAComponent(hFilter, L"{71985F4B-1CA1-11D3-9CC8-00C04F7971E0}", L"BDA Network Providers");
|
||||
RegisterBDAComponent(hFilter, L"{71985F48-1CA1-11d3-9CC8-00C04F7971E0}", L"BDA Source Filter");
|
||||
RegisterBDAComponent(hFilter, L"{A2E3074F-6C3D-11D3-B653-00C04F79498E}", L"BDA Transport Information Renderers");
|
||||
RegisterBDAComponent(hFilter, L"{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}", L"BDA Receiver Component");
|
||||
RegCloseKey(hKey);
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -175,23 +104,11 @@ DllRegisterServer(void)
|
|||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
if (RegCreateKeyExW(hInstance, InterfaceTable[Index].ProviderName, 0, 0, 0, KEY_WRITE, NULL, &hKey, 0) == ERROR_SUCCESS)
|
||||
{
|
||||
//FIXME filterdata
|
||||
RegSetValueExW(hKey, L"FriendlyName", 0, REG_SZ, (const BYTE*)InterfaceTable[Index].ProviderName, (wcslen(InterfaceTable[Index].ProviderName) + 1) * sizeof(WCHAR));
|
||||
RegSetValueExW(hKey, L"CLSID", 0, REG_SZ, (const BYTE*)pStr, (wcslen(pStr)+1) * sizeof(WCHAR));
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
CoTaskMemFree(pStr);
|
||||
Index++;
|
||||
}while(InterfaceTable[Index].lpfnCI != 0);
|
||||
|
||||
RegCloseKey(hClass);
|
||||
RegCloseKey(hInstance);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ typedef struct
|
|||
{
|
||||
const GUID* riid;
|
||||
LPFNCREATEINSTANCE lpfnCI;
|
||||
LPCWSTR ProviderName;
|
||||
} INTERFACE_TABLE;
|
||||
|
||||
/* classfactory.cpp */
|
||||
|
|
|
@ -854,7 +854,7 @@ SampleGrabber_ISampleGrabber_GetCurrentBuffer(ISampleGrabber *iface, LONG *bufSi
|
|||
static HRESULT WINAPI
|
||||
SampleGrabber_ISampleGrabber_GetCurrentSample(ISampleGrabber *iface, IMediaSample **sample)
|
||||
{
|
||||
/* MS doesn't implement it either, no one should call it */
|
||||
/* MS doesn't implement it either, noone should call it */
|
||||
WARN("(%p): not implemented\n", sample);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -1264,7 +1264,7 @@ SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes)
|
|||
TRACE("(%p)->(%p)\n", This, mtypes);
|
||||
if (!mtypes)
|
||||
return E_POINTER;
|
||||
*mtypes = mediaenum_create(This->sg->pin_in.pair ? &This->sg->mtype : NULL);
|
||||
*mtypes = mediaenum_create(This->sg->pin_in.pair ? &This->sg->mtype : (const AM_MEDIA_TYPE *)NULL);
|
||||
return *mtypes ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ static HRESULT AVIDec_ConnectInput(InputPin *pin, const AM_MEDIA_TYPE * pmt)
|
|||
bmi = &format2->bmiHeader;
|
||||
else
|
||||
goto failed;
|
||||
TRACE("Fourcc: %s\n", debugstr_an((const char *)&pmt->subtype.Data1, 4));
|
||||
TRACE("Fourcc: %s\n", debugstr_an((char *)&pmt->subtype.Data1, 4));
|
||||
|
||||
This->hvid = ICLocate(pmt->majortype.Data1, pmt->subtype.Data1, bmi, NULL, ICMODE_DECOMPRESS);
|
||||
if (This->hvid)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue