Sync with trunk head (part 1 of 2)

svn path=/branches/header-work/; revision=47094
This commit is contained in:
Amine Khaldi 2010-05-03 12:54:59 +00:00
commit 69b36d050f
630 changed files with 27981 additions and 12148 deletions

View file

@ -28,6 +28,7 @@
<if property="OPTIMIZE" value="1">
<compilerflag>-ftracer</compilerflag>
</if>
<compilerflag>-fms-extensions</compilerflag>
<compilerflag>-Wno-attributes</compilerflag>
<compilerflag>-U_UNICODE</compilerflag>
<compilerflag>-UUNICODE</compilerflag>

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -1,25 +1,26 @@
<?xml version="1.0"?>
<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>
<!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>
<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>

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -1,4 +1,5 @@
<?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>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "../../../tools/rbuild/project.dtd">
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="magnify" type="win32gui" installbase="system32" installname="magnify.exe">
<include base="magnify">.</include>
<library>user32</library>

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
<module name="eventvwr" type="win32gui" installbase="system32" installname="eventvwr.exe" unicode="yes">
<include base="eventvwr">.</include>
<library>user32</library>
@ -8,4 +8,3 @@
<file>eventvwr.c</file>
<file>eventvwr.rc</file>
</module>
</rbuild>

View file

@ -630,8 +630,9 @@ int main(int argc, char* argv[])
while ((NeverStop) || (Count < PingCount))
{
Ping();
Sleep(Timeout);
Count++;
if((NeverStop) || (Count < PingCount))
Sleep(Timeout);
};
Cleanup();

View file

@ -147,16 +147,16 @@ void LoadSettings(void)
if (dwPointSize != 0)
Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize);
hFont = CreateFontIndirect(&Globals.lfFont);
if (hFont)
{
if (Globals.hFont)
DeleteObject(Globals.hFont);
Globals.hFont = hFont;
}
RegCloseKey(hKey);
}
hFont = CreateFontIndirect(&Globals.lfFont);
if (hFont)
{
if (Globals.hFont)
DeleteObject(Globals.hFont);
Globals.hFont = hFont;
}
}
static BOOL SaveDword(HKEY hKey, LPCTSTR pszValueNameT, DWORD dwValue)

View file

@ -51,7 +51,7 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
{
DWORD dwSize;
LPBYTE pBytes = NULL;
LPCWSTR pszText;
LPWSTR 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 = (LPCWSTR) &pBytes[dwPos];
pszText = (LPWSTR) &pBytes[dwPos];
dwCharCount = (dwSize - dwPos) / sizeof(WCHAR);
break;
@ -174,6 +174,10 @@ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding
else
adwEolnCount[EOLN_LF]++;
break;
case '\0':
pszText[i] = ' ';
break;
}
}

View file

@ -60,8 +60,8 @@ BEGIN
MENUITEM "800%", IDM_VIEWZOOM800
END
MENUITEM SEPARATOR
MENUITEM "Show grid", IDM_VIEWSHOWGRID
MENUITEM "Show miniature", IDM_VIEWSHOWMINIATURE
MENUITEM "Mostra griglia", IDM_VIEWSHOWGRID
MENUITEM "Mostra 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 meter"
IDS_PRINTRES, "%d x %d pixels per metro"
END

View file

@ -143,6 +143,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
HBITMAP tempBm;
int i;
TCHAR tooltips[16][30];
HDC hDC;
TCHAR *c;
TCHAR sfnFilename[1000];
@ -152,7 +153,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
TCHAR ofnFiletitle[256];
TCHAR ofnFilter[1000];
TCHAR miniaturetitle[100];
int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
static int custColors[16] = { 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff
};
@ -371,8 +372,10 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
CreateWindowEx(0, _T("Scrollbox"), _T(""), WS_CHILD | WS_VISIBLE, 3, 3, imgXRes, imgYRes, hScrlClient,
NULL, hThisInstance, NULL);
hDrawingDC = CreateCompatibleDC(GetDC(hImageArea));
hSelDC = CreateCompatibleDC(GetDC(hImageArea));
hDC = GetDC(hImageArea);
hDrawingDC = CreateCompatibleDC(hDC);
hSelDC = CreateCompatibleDC(hDC);
ReleaseDC(hImageArea, hDC);
SelectObject(hDrawingDC, CreatePen(PS_SOLID, 0, fgColor));
SelectObject(hDrawingDC, CreateSolidBrush(bgColor));

View file

@ -25,6 +25,34 @@ 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;
@ -147,6 +175,8 @@ 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:
@ -169,21 +199,30 @@ 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;
}
@ -276,6 +315,8 @@ 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:
@ -285,12 +326,17 @@ 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)
{
@ -310,10 +356,14 @@ 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;
}
@ -398,6 +448,8 @@ 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:
@ -420,21 +472,30 @@ 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;
}
@ -457,6 +518,8 @@ 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:
@ -466,12 +529,17 @@ 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)
{
@ -491,10 +559,14 @@ 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;
}

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -2,41 +2,41 @@
[Section]
Name = Mozilla Firefox 3.0
Version = 3.0.18
Version = 3.0.19
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/latest-3.0/win32/en-US/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/en-US/Firefox%20Setup%203.0.19.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/latest-3.0/win32/de/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/de/Firefox%20Setup%203.0.19.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/latest-3.0/win32/es-ES/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/es-ES/Firefox%20Setup%203.0.19.exe
[Section.0414]
Description = Mest populære og best også gratis nettleserene der ute.
Size = 6.9M
Size = 7.0M
URLSite = http://www.mozilla-europe.org/no/
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/nb-NO/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/nb-NO/Firefox%20Setup%203.0.19.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/latest-3.0/win32/pl/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/pl/Firefox%20Setup%203.0.19.exe
[Section.0419]
Description = Один из самых популярных и лучших бесплатных браузеров.
Size = 7.4M
URLSite = http://www.mozilla-europe.org/ru/
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/win32/ru/Firefox%20Setup%203.0.18.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.19-real/win32/ru/Firefox%20Setup%203.0.19.exe

View file

@ -2,13 +2,13 @@
[Section]
Name = Miranda IM
Version = 0.8.18
Version = 0.8.21
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.18-unicode.exe
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.8.21-unicode.exe
CDPath = none
[Section.0407]

View file

@ -2,13 +2,13 @@
[Section]
Name = OpenTTD
Version = 0.7.5
Version = 1.0.0
Licence = GPL v2
Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.
Size = 2.9MB
Size = 3.5MB
Category = 4
URLSite = http://www.openttd.org/
URLDownload = http://binaries.openttd.org/releases/0.7.5/openttd-0.7.5-windows-win32.exe
URLDownload = http://binaries.openttd.org/releases/1.0.0/openttd-1.0.0-windows-win32.exe
CDPath = none
[Section.0407]

View file

@ -2,13 +2,13 @@
[Section]
Name = Opera
Version = 10.51
Version = 10.52
Licence = Freeware
Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client.
Size = 11.0M
Size = 12.0M
Category = 5
URLSite = http://www.opera.com/
URLDownload = http://get4.opera.com/pub/opera/win/1051/int/Opera_1051_int_Setup.exe
URLDownload = http://get4.opera.com/pub/opera/win/1052/int/Opera_1052_int_Setup.exe
CDPath = none
[Section.0407]

View file

@ -2,13 +2,13 @@
[Section]
Name = SciTE
Version = 2.03
Version = 2.11
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/Sc203.exe
URLDownload = http://ovh.dl.sourceforge.net/sourceforge/scintilla/Sc211.exe
CDPath = none
[Section.0407]

View file

@ -2,13 +2,13 @@
[Section]
Name = ScummVM
Version = 1.0.0
Version = 1.1.0
Licence = GPL
Description = Sam and Max, Day of the Tentacle, etc on ReactOS.
Size = 3.1MB
Size = 3.4MB
Category = 4
URLSite = http://scummvm.org/
URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.0.0/scummvm-1.0.0-win32.exe
URLDownload = http://dfn.dl.sourceforge.net/project/scummvm/scummvm/1.1.0/scummvm-1.1.0-win32.exe
CDPath = none
[Section.0407]

View file

@ -2,31 +2,31 @@
[Section]
Name = Mozilla SeaMonkey
Version = 2.0.3
Version = 2.0.4
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.0MB
Size = 10.1MB
Category = 5
URLSite = http://www.seamonkey-project.org/
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/en-US/SeaMonkey%20Setup%202.0.3.exe
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/en-US/SeaMonkey%20Setup%202.0.4.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.1MB
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/de/SeaMonkey%20Setup%202.0.3.exe
Size = 10.0MB
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/de/SeaMonkey%20Setup%202.0.4.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.3/win32/es-ES/SeaMonkey%20Setup%202.0.3.exe
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/es-ES/SeaMonkey%20Setup%202.0.4.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.3/win32/pl/SeaMonkey%20Setup%202.0.3.exe
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/pl/SeaMonkey%20Setup%202.0.4.exe
[Section.0419]
Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор.
Size = 10.4MB
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.3/win32/ru/SeaMonkey%20Setup%202.0.3.exe
URLDownload = http://ftp.df.lth.se/mozilla/seamonkey/releases/2.0.4/win32/ru/SeaMonkey%20Setup%202.0.4.exe

View file

@ -2,35 +2,35 @@
[Section]
Name = Mozilla Thunderbird
Version = 3.0.3
Version = 3.0.4
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.3/win32/en-US/Thunderbird%20Setup%203.0.3.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/en-US/Thunderbird%20Setup%203.0.4.exe
CDPath = none
[Section.0407]
Description = Der populärste und einer der besten freien Mail-Clients.
Size = 8.4M
Size = 8.5M
URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.3/win32/de/Thunderbird%20Setup%203.0.3.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/de/Thunderbird%20Setup%203.0.4.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.3/win32/es-ES/Thunderbird%20Setup%203.0.3.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/es-ES/Thunderbird%20Setup%203.0.4.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.3/win32/pl/Thunderbird%20Setup%203.0.3.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/pl/Thunderbird%20Setup%203.0.4.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.3/win32/ru/Thunderbird%20Setup%203.0.3.exe
URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.0.4/win32/ru/Thunderbird%20Setup%203.0.4.exe

View file

@ -2,13 +2,13 @@
[Section]
Name = µTorrent
Version = 2.0
Version = 2.0.1
Licence = Freeware for non-commercial uses
Description = Small and fast BitTorrent Client.
Size = 312K
Size = 314K
Category = 5
URLSite = http://www.utorrent.com/
URLDownload = http://download.utorrent.com/2.0/utorrent.exe
URLDownload = http://download.utorrent.com/2.0.1/utorrent.exe
CDPath = none

View file

@ -228,8 +228,6 @@ 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];
@ -275,25 +273,11 @@ 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;
}
@ -356,11 +340,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[0] ? BST_UNCHECKED : BST_CHECKED, 0);
SendMessage(hwndExportAll, BM_SETCHECK, pszSelectedKey ? BST_UNCHECKED : BST_CHECKED, 0);
hwndExportBranch = GetDlgItem(hdlg, IDC_EXPORT_BRANCH);
if (hwndExportBranch)
SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey[0] ? BST_CHECKED : BST_UNCHECKED, 0);
SendMessage(hwndExportBranch, BM_SETCHECK, pszSelectedKey ? BST_CHECKED : BST_UNCHECKED, 0);
hwndExportBranchText = GetDlgItem(hdlg, IDC_EXPORT_BRANCH_TEXT);
if (hwndExportBranchText)
@ -406,7 +390,12 @@ BOOL ExportRegistryFile(HWND hWnd)
InitOpenFileName(hWnd, &ofn);
LoadString(hInst, IDS_EXPORT_REG_FILE, Caption, sizeof(Caption)/sizeof(TCHAR));
ofn.lpstrTitle = Caption;
ofn.lCustData = (LPARAM) ExportKeyPath;
/* Only set the path if a key (not the root node) is selected */
if (hKeyRoot != 0)
{
ofn.lCustData = (LPARAM) ExportKeyPath;
}
ofn.Flags = OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLEHOOK;
ofn.lpfnHook = ExportRegistryFile_OFNHookProc;
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_EXPORTRANGE);

View file

@ -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 PerfGetIndexByProcessId(DWORD dwProcessId);
int ProcGetIndexByProcessId(DWORD dwProcessId);
#if 0
void SwitchToThisWindow (
@ -236,6 +236,13 @@ 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);
@ -269,6 +276,55 @@ 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();
}
}
}
@ -333,13 +389,12 @@ 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;
BOOL bItemRemoved = FALSE;
LPAPPLICATION_PAGE_LIST_ITEM pAPLI = NULL;
HIMAGELIST hImageListLarge;
HIMAGELIST hImageListSmall;
LV_ITEM item;
int i;
BOOL bAlreadyInList = FALSE;
memset(&item, 0, sizeof(LV_ITEM));
@ -406,51 +461,7 @@ void AddOrUpdateHwnd(HWND hWnd, WCHAR *szTitle, HICON hIcon, BOOL bHung)
item.lParam = (LPARAM)pAPLI;
(void)ListView_InsertItem(hApplicationPageListCtrl, &item);
}
/* 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();
return;
}
void ApplicationPageUpdate(void)
@ -878,7 +889,6 @@ 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));
@ -902,7 +912,7 @@ void ApplicationPage_OnGotoProcess(void)
/*
* Select the process item in the list
*/
i = PerfGetIndexByProcessId(dwProcessId);
i = ProcGetIndexByProcessId(dwProcessId);
if (i != -1)
{
ListView_SetItemState(hProcessPageListCtrl,

View file

@ -40,6 +40,15 @@ 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};
@ -63,6 +72,8 @@ BOOL PerfDataInitialize(void)
void PerfDataUninitialize(void)
{
PLIST_ENTRY pCur;
PSIDTOUSERNAME pEntry;
if (pPerfData != NULL)
HeapFree(GetProcessHeap(), 0, pPerfData);
@ -74,6 +85,15 @@ 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)
@ -86,6 +106,56 @@ 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;
@ -106,6 +176,7 @@ 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);
@ -341,7 +412,8 @@ ClearInfo:
ZeroMemory(&pPerfData[Idx].IOCounters, sizeof(IO_COUNTERS));
}
SidToUserName(ProcessUser, pPerfData[Idx].UserName, sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]));
cwcUserName = sizeof(pPerfData[0].UserName) / sizeof(pPerfData[0].UserName[0]);
CachedGetUserFromSid(ProcessUser, pPerfData[Idx].UserName, &cwcUserName);
if (ProcessSD != NULL)
{
@ -356,6 +428,29 @@ 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;
@ -387,27 +482,6 @@ 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;

View file

@ -60,6 +60,7 @@ 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);

View file

@ -28,7 +28,6 @@
typedef struct
{
ULONG Index;
ULONG ProcessId;
} PROCESS_PAGE_LIST_ITEM, *LPPROCESS_PAGE_LIST_ITEM;
@ -54,6 +53,27 @@ 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;
@ -71,7 +91,7 @@ DWORD GetSelectedProcessId(void)
(void)ListView_GetItem(hProcessPageListCtrl, &lvitem);
if (lvitem.lParam)
return PerfDataGetProcessId(((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->Index);
return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
}
return 0;
@ -219,7 +239,7 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
break;
pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
Index = pData->Index;
Index = PerfDataGetProcessIndex(pData->ProcessId);
ColumnIndex = pnmdi->item.iSubItem;
PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, pnmdi->item.cchTextMax);
@ -414,7 +434,7 @@ void UpdateProcesses()
{
int i;
ULONG l;
LV_ITEM item;
LV_ITEM item;
LPPROCESS_PAGE_LIST_ITEM pData;
/* Remove old processes */
@ -431,10 +451,17 @@ void UpdateProcesses()
HeapFree(GetProcessHeap(), 0, pData);
}
}
for (l = 0; l < PerfDataGetProcessCount(); l++)
/* Check for difference in listview process and performance process counts */
if (ListView_GetItemCount(hProcessPageListCtrl) != PerfDataGetProcessCount())
{
AddProcess(l);
/* Add new processes by checking against the current items */
for (l = 0; l < PerfDataGetProcessCount(); l++)
{
AddProcess(l);
}
}
if (TaskManagerSettings.SortColumn != -1)
{
(void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
@ -482,7 +509,7 @@ void AddProcess(ULONG Index)
item.iItem = i;
(void)ListView_GetItem(hProcessPageListCtrl, &item);
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
if (PerfDataGetProcessId(pData->Index) == pid)
if (pData->ProcessId == pid)
{
bAlreadyInList = TRUE;
break;
@ -491,7 +518,6 @@ 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 */
@ -686,6 +712,8 @@ 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;
@ -704,165 +732,167 @@ 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(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
PerfDataGetImageName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
PerfDataGetImageName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
PerfDataGetImageName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
ret = _wcsicmp(text1, text2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_PID)
{
l1 = PerfDataGetProcessId(Param1->Index);
l2 = PerfDataGetProcessId(Param2->Index);
l1 = Param1->ProcessId;
l2 = Param2->ProcessId;
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_USERNAME)
{
PerfDataGetUserName(Param1->Index, text1, sizeof (text1) / sizeof (*text1));
PerfDataGetUserName(Param2->Index, text2, sizeof (text2) / sizeof (*text2));
PerfDataGetUserName(IndexParam1, text1, sizeof (text1) / sizeof (*text1));
PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2));
ret = _wcsicmp(text1, text2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID)
{
l1 = PerfDataGetSessionId(Param1->Index);
l2 = PerfDataGetSessionId(Param2->Index);
l1 = PerfDataGetSessionId(IndexParam1);
l2 = PerfDataGetSessionId(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_CPUUSAGE)
{
l1 = PerfDataGetCPUUsage(Param1->Index);
l2 = PerfDataGetCPUUsage(Param2->Index);
l1 = PerfDataGetCPUUsage(IndexParam1);
l2 = PerfDataGetCPUUsage(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_CPUTIME)
{
time1 = PerfDataGetCPUTime(Param1->Index);
time2 = PerfDataGetCPUTime(Param2->Index);
time1 = PerfDataGetCPUTime(IndexParam1);
time2 = PerfDataGetCPUTime(IndexParam2);
ret = largeintcmp(time1, time2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGE)
{
l1 = PerfDataGetWorkingSetSizeBytes(Param1->Index);
l2 = PerfDataGetWorkingSetSizeBytes(Param2->Index);
l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_PEAKMEMORYUSAGE)
{
l1 = PerfDataGetPeakWorkingSetSizeBytes(Param1->Index);
l2 = PerfDataGetPeakWorkingSetSizeBytes(Param2->Index);
l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGEDELTA)
{
l1 = PerfDataGetWorkingSetSizeDelta(Param1->Index);
l2 = PerfDataGetWorkingSetSizeDelta(Param2->Index);
l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTS)
{
l1 = PerfDataGetPageFaultCount(Param1->Index);
l2 = PerfDataGetPageFaultCount(Param2->Index);
l1 = PerfDataGetPageFaultCount(IndexParam1);
l2 = PerfDataGetPageFaultCount(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTSDELTA)
{
l1 = PerfDataGetPageFaultCountDelta(Param1->Index);
l2 = PerfDataGetPageFaultCountDelta(Param2->Index);
l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_VIRTUALMEMORYSIZE)
{
l1 = PerfDataGetVirtualMemorySizeBytes(Param1->Index);
l2 = PerfDataGetVirtualMemorySizeBytes(Param2->Index);
l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEDPOOL)
{
l1 = PerfDataGetPagedPoolUsagePages(Param1->Index);
l2 = PerfDataGetPagedPoolUsagePages(Param2->Index);
l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_NONPAGEDPOOL)
{
l1 = PerfDataGetNonPagedPoolUsagePages(Param1->Index);
l2 = PerfDataGetNonPagedPoolUsagePages(Param2->Index);
l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_BASEPRIORITY)
{
l1 = PerfDataGetBasePriority(Param1->Index);
l2 = PerfDataGetBasePriority(Param2->Index);
l1 = PerfDataGetBasePriority(IndexParam1);
l2 = PerfDataGetBasePriority(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_HANDLECOUNT)
{
l1 = PerfDataGetHandleCount(Param1->Index);
l2 = PerfDataGetHandleCount(Param2->Index);
l1 = PerfDataGetHandleCount(IndexParam1);
l2 = PerfDataGetHandleCount(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_THREADCOUNT)
{
l1 = PerfDataGetThreadCount(Param1->Index);
l2 = PerfDataGetThreadCount(Param2->Index);
l1 = PerfDataGetThreadCount(IndexParam1);
l2 = PerfDataGetThreadCount(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_USEROBJECTS)
{
l1 = PerfDataGetUSERObjectCount(Param1->Index);
l2 = PerfDataGetUSERObjectCount(Param2->Index);
l1 = PerfDataGetUSERObjectCount(IndexParam1);
l2 = PerfDataGetUSERObjectCount(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_GDIOBJECTS)
{
l1 = PerfDataGetGDIObjectCount(Param1->Index);
l2 = PerfDataGetGDIObjectCount(Param2->Index);
l1 = PerfDataGetGDIObjectCount(IndexParam1);
l2 = PerfDataGetGDIObjectCount(IndexParam2);
ret = CMP(l1, l2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADS)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.ReadOperationCount;
ull2 = iocounters2.ReadOperationCount;
ret = CMP(ull1, ull2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITES)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.WriteOperationCount;
ull2 = iocounters2.WriteOperationCount;
ret = CMP(ull1, ull2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHER)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.OtherOperationCount;
ull2 = iocounters2.OtherOperationCount;
ret = CMP(ull1, ull2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADBYTES)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.ReadTransferCount;
ull2 = iocounters2.ReadTransferCount;
ret = CMP(ull1, ull2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITEBYTES)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.WriteTransferCount;
ull2 = iocounters2.WriteTransferCount;
ret = CMP(ull1, ull2);
}
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHERBYTES)
{
PerfDataGetIOCounters(Param1->Index, &iocounters1);
PerfDataGetIOCounters(Param2->Index, &iocounters2);
PerfDataGetIOCounters(IndexParam1, &iocounters1);
PerfDataGetIOCounters(IndexParam2, &iocounters2);
ull1 = iocounters1.OtherTransferCount;
ull2 = iocounters2.OtherTransferCount;
ret = CMP(ull1, ull2);

View file

@ -869,6 +869,7 @@ void TaskManager_OnTabWndSelChange(void)
HMENU hViewMenu;
HMENU hSubMenu;
WCHAR szTemp[256];
SYSTEM_INFO sysInfo;
hMenu = GetMenu(hMainWnd);
hViewMenu = GetSubMenu(hMenu, 2);
@ -947,16 +948,28 @@ void TaskManager_OnTabWndSelChange(void)
DeleteMenu(hMenu, 3, MF_BYPOSITION);
DrawMenuBar(hMainWnd);
}
hSubMenu = CreatePopupMenu();
LoadStringW(hInst, IDS_MENU_ONEGRAPHALLCPUS, szTemp, 256);
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHALL, szTemp);
GetSystemInfo(&sysInfo);
LoadStringW(hInst, IDS_MENU_ONEGRAPHPERCPU, szTemp, 256);
AppendMenuW(hSubMenu, MF_STRING, ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, szTemp);
/* Hide CPU graph options on single CPU systems */
if (sysInfo.dwNumberOfProcessors > 1)
{
hSubMenu = CreatePopupMenu();
LoadStringW(hInst, IDS_MENU_CPUHISTORY, szTemp, 256);
AppendMenuW(hViewMenu, MF_STRING|MF_POPUP, (UINT_PTR) hSubMenu, 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_SHOWKERNELTIMES, szTemp, 256);
AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_SHOWKERNELTIMES, szTemp);
@ -965,10 +978,7 @@ void TaskManager_OnTabWndSelChange(void)
CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_CHECKED);
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
*/

View file

@ -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, (char *)key);
WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (const char *)key);
return strcmp(p, key);
}
@ -1601,7 +1601,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
case 0xEE:
case 0xEF:
{
char* ptr = (char*) format + 8;
const char* ptr = (const char*) format + 8;
BYTE type = format[3];
int wnd = -1;

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group>
<module name="rpcss" type="win32cui" installbase="system32" installname="rpcss.exe" unicode="yes">
<include base="rpcss">.</include>

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -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>

View file

@ -428,7 +428,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
/* ReactOS_KdSerial */
CreateFreeLoaderEntry(IniCache, IniSection,
L"ReactOS_KdSerial", L"\"ReactOS (RosDbg)\"",
L"ReactOS", ArcPath,
L"Windows2003", ArcPath,
L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /KDSERIAL");
/* ReactOS_LogFile */

View file

@ -132,6 +132,7 @@ InfpOpenInfFileW(
IN PCWSTR FileName,
IN PCWSTR InfClass,
IN DWORD InfStyle,
IN LCID LocaleId,
OUT PUINT ErrorLine)
{
HINF hInf = NULL;
@ -143,6 +144,7 @@ InfpOpenInfFileW(
Status = InfOpenFile(
&hInf,
&FileNameU,
LocaleId,
&ErrorLineUL);
*ErrorLine = (UINT)ErrorLineUL;
if (!NT_SUCCESS(Status))
@ -252,6 +254,7 @@ INF_OpenBufferedFileA(
IN ULONG FileSize,
IN PCSTR InfClass,
IN DWORD InfStyle,
IN LCID LocaleId,
OUT PUINT ErrorLine)
{
#ifdef __REACTOS__
@ -263,6 +266,7 @@ INF_OpenBufferedFileA(
&hInf,
FileBuffer,
FileSize,
LocaleId,
&ErrorLineUL);
*ErrorLine = (UINT)ErrorLineUL;
if (!NT_SUCCESS(Status))

View file

@ -110,6 +110,7 @@ InfpOpenInfFileW(
IN PCWSTR FileName,
IN PCWSTR InfClass,
IN DWORD InfStyle,
IN LCID LocaleId,
OUT PUINT ErrorLine);
#endif /* __REACTOS__ */
@ -132,6 +133,7 @@ INF_OpenBufferedFileA(
IN ULONG FileSize,
IN PCSTR InfClass,
IN DWORD InfStyle,
IN LCID LocaleId,
OUT PUINT ErrorLine);
VOID INF_SetHeap(

View file

@ -79,6 +79,8 @@ static PGENERIC_LIST KeyboardList = NULL;
static PGENERIC_LIST LayoutList = NULL;
static PGENERIC_LIST LanguageList = NULL;
static LANGID LanguageId = 0;
/* FUNCTIONS ****************************************************************/
static VOID
@ -422,6 +424,7 @@ CheckUnattendedSetup(VOID)
UnattendInf = SetupOpenInfFileW(UnattendInfPath,
NULL,
INF_STYLE_WIN4,
LanguageId,
&ErrorLine);
if (UnattendInf == INVALID_HANDLE_VALUE)
@ -678,6 +681,8 @@ LanguagePage(PINPUT_RECORD Ir)
{
SelectedLanguageId = (PWCHAR)GetListEntryUserData(GetCurrentListEntry(LanguageList));
LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
if (wcscmp(SelectedLanguageId, DefaultLanguage))
{
UpdateKBLayout();
@ -765,6 +770,7 @@ SetupStartPage(PINPUT_RECORD Ir)
SetupInf = SetupOpenInfFileW(FileNameBuffer,
NULL,
INF_STYLE_WIN4,
LanguageId,
&ErrorLine);
if (SetupInf == INVALID_HANDLE_VALUE)
@ -3045,6 +3051,7 @@ PrepareCopyPage(PINPUT_RECORD Ir)
InfFileSize,
(const CHAR*) NULL,
INF_STYLE_WIN4,
LanguageId,
&ErrorLine);
if (InfHandle == INVALID_HANDLE_VALUE)
@ -3259,6 +3266,8 @@ 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;
@ -3274,7 +3283,7 @@ RegistryPage(PINPUT_RECORD Ir)
CONSOLE_SetStatusText(MUIGetString(STRING_IMPORTFILE), File);
if (!ImportRegistryFile(File, Section, Delete))
if (!ImportRegistryFile(File, Section, LanguageId, Delete))
{
DPRINT("Importing %S failed\n", File);

View file

@ -617,6 +617,7 @@ registry_callback (HINF hInf, PCWSTR Section, BOOLEAN Delete)
BOOLEAN
ImportRegistryFile(PWSTR Filename,
PWSTR Section,
LCID LocaleId,
BOOLEAN Delete)
{
WCHAR FileNameBuffer[MAX_PATH];
@ -632,6 +633,7 @@ ImportRegistryFile(PWSTR Filename,
FileNameBuffer,
NULL,
INF_STYLE_WIN4,
LocaleId,
&ErrorLine);
if (hInf == INVALID_HANDLE_VALUE)
{

View file

@ -29,6 +29,7 @@
BOOLEAN
ImportRegistryFile(PWSTR Filename,
PWSTR Section,
LCID LocaleId,
BOOLEAN Delete);
BOOLEAN

View file

@ -4,10 +4,10 @@
<bootstrap installbase="$(CDOUTPUT)/system32" nameoncd="smss.exe" />
<include base="usetup">.</include>
<include base="zlib">.</include>
<include base="inflib">.</include>
<include base="newinflib">.</include>
<include base="ReactOS">include/reactos/drivers</include>
<library>zlib</library>
<library>inflib</library>
<library>newinflib</library>
<library>ext2lib</library>
<library>vfatlib</library>
<library>ntdll</library>

View file

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

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -363,6 +363,12 @@ _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);

View file

@ -1,3 +1,5 @@
<?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>

View file

@ -212,7 +212,6 @@ StartAutoApplications(
WARN("FindFirstFile(%s) failed with error %lu\n", debugstr_w(szPath), GetLastError());
return;
}
szPath[len] = L'\0';
do
{
@ -220,9 +219,10 @@ StartAutoApplications(
{
memset(&ExecInfo, 0x0, sizeof(SHELLEXECUTEINFOW));
ExecInfo.cbSize = sizeof(ExecInfo);
wcscpy(&szPath[len+1], findData.cFileName);
ExecInfo.lpVerb = L"open";
ExecInfo.lpFile = findData.cFileName;
ExecInfo.lpDirectory = szPath;
ExecInfo.lpFile = szPath;
ExecInfo.lpDirectory = NULL;
TRACE("Executing %s in directory %s\n",
debugstr_w(findData.cFileName), debugstr_w(szPath));
ShellExecuteExW(&ExecInfo);

View file

@ -1,12 +1,14 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<if property="ARCH" value="i386>
<group xmlns:xi="http://www.w3.org/2001/XInclude">
<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>

View file

@ -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,-156"
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
; Animated Cursors
HKCR,".ani","",0x00000000,"anifile"

View file

@ -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,-156"
HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-157"
; Animated Cursors
HKCR,".ani","",0x00000000,"anifile"

View file

@ -1530,7 +1530,8 @@ 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",0x00020000,"%SystemRoot%\"
HKCU,Software\Wine\MSHTML,"GeckoCabDir",,"C:\ReactOS\"
; Sound Schemes
HKCU,"AppEvents",,0x00000012

Binary file not shown.

View file

@ -1,12 +1,14 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<if property="ARCH" value="i386>
<group xmlns:xi="http://www.w3.org/2001/XInclude">
<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>

View file

@ -489,8 +489,6 @@ 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
@ -636,6 +634,7 @@ 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

View file

@ -22,6 +22,7 @@ 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
@ -36,13 +37,16 @@ ramdisk.sys=,,,,,,x,,,,,,4
ext2.sys=,,,,,,x,,,,,,4
[HardwareIdsDatabase]
*PNP0C08 = acpi
;*PNP0A00 = isapnp
*PNP0A03 = pci
*PNP0C08 = acpi
;PCI\CC_0601 = isapnp
PCI\CC_0604 = pci
[BootBusExtenders.Load]
acpi = acpi.sys
pci = pci.sys
isapnp = isapnp.sys
[Cabinets]
Cabinet=reactos.cab
@ -76,7 +80,7 @@ hal.dll=,,,,,,,,,,,,2
[Files.pci_mp]
ntkrnlmp.exe=,,,,,,,,,,ntoskrnl.exe,,2
halmp.dll=,,,,,,,,,,hal.dll,,2
halmps.dll=,,,,,,,,,,hal.dll,,2
[Display]
;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp>

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -63,7 +63,7 @@ Int386_regsout:
/*
* int Int386(int ivec, REGS* in, REGS* out);
*/
EXTERN(_Int386)
EXTERN(Int386)
.code64
/* Get the function parameters */

View file

@ -39,33 +39,6 @@ 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
@ -86,222 +59,7 @@ VOID
NTAPI
FrLdrStartup(ULONG Magic)
{
/* 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);
DbgPrint("ReactOS loader is unsupported! Halting.\n", KernelEntryPoint);
for(;;);
}
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);
}

View file

@ -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:

View file

@ -452,7 +452,23 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
SectorCount = Geometry.Sectors;
}
else
return EINVAL;
{
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;
}
}
if (DrivePartition != 0xff && DrivePartition != 0)
{
@ -1419,10 +1435,10 @@ DetectSerialPorts(PCONFIGURATION_COMPONENT_DATA BusKey)
/* Set Interrupt */
PartialDescriptor = &PartialResourceList->PartialDescriptors[1];
PartialDescriptor->Type = CmResourceTypeInterrupt;
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
PartialDescriptor->ShareDisposition = CmResourceShareShared;
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialDescriptor->u.Interrupt.Level = Irq[i];
PartialDescriptor->u.Interrupt.Vector = 0;
PartialDescriptor->u.Interrupt.Vector = Irq[i];
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
/* Set serial data (device specific) */
@ -1529,7 +1545,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 = 0;
PartialDescriptor->u.Interrupt.Vector = Irq[i];
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
}
@ -1715,7 +1731,7 @@ DetectKeyboardController(PCONFIGURATION_COMPONENT_DATA BusKey)
PartialDescriptor->ShareDisposition = CmResourceShareUndetermined;
PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED;
PartialDescriptor->u.Interrupt.Level = 1;
PartialDescriptor->u.Interrupt.Vector = 0;
PartialDescriptor->u.Interrupt.Vector = 1;
PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF;
/* Set IO Port 0x60 */
@ -1887,7 +1903,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 = 0;
PartialResourceList.PartialDescriptors[0].u.Interrupt.Vector = 12;
PartialResourceList.PartialDescriptors[0].u.Interrupt.Affinity = 0xFFFFFFFF;
/* Create controller key */

View file

@ -45,7 +45,6 @@ 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;

View file

@ -48,7 +48,6 @@ 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;

View file

@ -44,12 +44,6 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
return;
}
if (!MachDiskNormalizeSystemPath(FileName, sizeof(FileName)))
{
UiMessageBox("Invalid path to boot sector file");
return;
}
FilePointer = FsOpenFile(FileName);
if (!FilePointer)
{

View file

@ -138,7 +138,20 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
if (!DissectArcPath(Path, FileName, &DriveNumber, &DrivePartition))
return EINVAL;
SectorSize = (DrivePartition == 0xff ? 2048 : 512);
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;
}
if (DrivePartition != 0xff && DrivePartition != 0)
{
if (!XboxDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry))

View file

@ -440,7 +440,6 @@ void PpcDefaultMachVtbl()
MachVtbl.GetMemoryMap = PpcGetMemoryMap;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskGetBootPath = PpcDiskGetBootPath;
MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;

View file

@ -107,62 +107,80 @@ DiskGetBootPath(char *BootPath, unsigned Size)
{
static char Path[] = "multi(0)disk(0)";
char Device[4];
_itoa(BootDrive, Device, 10);
if (Size <= sizeof(Path) + 6 + strlen(Device))
char Partition[4];
PARTITION_TABLE_ENTRY PartitionEntry;
MASTER_BOOT_RECORD MasterBootRecord;
if (BootDrive < 0x80)
{
return FALSE;
/* 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, ")");
}
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)");
/* 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, ")");
}
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)

View file

@ -197,7 +197,6 @@ 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
@ -231,9 +230,6 @@ 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;
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE directory SYSTEM "../../../tools/rbuild/project.dtd">
<!DOCTYPE module 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>

View file

@ -23,7 +23,9 @@
<file>disk.c</file>
<file>partition.c</file>
<file>ramdisk.c</file>
<file>scsiport.c</file>
<if property="ARCH" value="i386">
<file>scsiport.c</file>
</if>
</directory>
<directory name="fs">
<file>ext2.c</file>

View file

@ -45,7 +45,7 @@
#define HYPERSPACE_BASE 0xfffff70000000000ULL
#define HAL_BASE 0xffffffff80000000ULL
#define APIC_BASE 0xfffffffffee00000ULL // FIXME
#define APIC_BASE 0xFFFFFFFFFFFE0000ULL
#define APIC_PHYS_BASE 0xfee00000

View file

@ -127,7 +127,6 @@ extern ULONG BootDrive;
extern ULONG BootPartition;
BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
BOOLEAN DiskNormalizeSystemPath(char *SystemPath, unsigned Size);
///////////////////////////////////////////////////////////////////////////////////////

View file

@ -62,7 +62,6 @@ 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);

View file

@ -97,13 +97,6 @@ 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)

View file

@ -37,7 +37,6 @@
#undef MachBeep
#undef MachPrepareForReactOS
#undef MachDiskGetBootPath
#undef MachDiskNormalizeSystemPath
#undef MachDiskReadLogicalSectors
#undef MachDiskGetDriveGeometry
#undef MachDiskGetCacheableBlockCount
@ -152,12 +151,6 @@ 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)
{

View file

@ -60,7 +60,7 @@ BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* B
if (p == NULL)
return FALSE;
p++;
*BootPartition = 0xff;
*BootPartition = 0;
}
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);
*BootDrive = atoi(p) + 0x80;
p = strchr(p, ')');
if (p == NULL)
return FALSE;

View file

@ -718,12 +718,6 @@ 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);
}

View file

@ -252,28 +252,36 @@ WinLdrSetupGdt(PVOID GdtBase, ULONG64 TssBase)
PKGDTENTRY64 Entry;
KDESCRIPTOR GdtDesc;
/* Setup KGDT_64_R0_CODE */
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_CODE);
/* Setup KGDT64_NULL */
Entry = KiGetGdtEntry(GdtBase, KGDT64_NULL);
*(PULONG64)Entry = 0x0000000000000000ULL;
/* Setup KGDT64_R0_CODE */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_CODE);
*(PULONG64)Entry = 0x00209b0000000000ULL;
/* Setup KGDT_64_R0_SS */
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_SS);
/* Setup KGDT64_R0_DATA */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_DATA);
*(PULONG64)Entry = 0x00cf93000000ffffULL;
/* Setup KGDT_64_DATA */
Entry = KiGetGdtEntry(GdtBase, KGDT_64_DATA);
/* Setup KGDT64_R3_CMCODE */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMCODE);
*(PULONG64)Entry = 0x00cffb000000ffffULL;
/* Setup KGDT64_R3_DATA */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_DATA);
*(PULONG64)Entry = 0x00cff3000000ffffULL;
/* Setup KGDT_64_R3_CODE */
Entry = KiGetGdtEntry(GdtBase, KGDT_64_R3_CODE);
/* Setup KGDT64_R3_CODE */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CODE);
*(PULONG64)Entry = 0x0020fb0000000000ULL;
/* Setup KGDT_32_R3_TEB */
Entry = KiGetGdtEntry(GdtBase, KGDT_32_R3_TEB);
/* Setup KGDT64_R3_CMTEB */
Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMTEB);
*(PULONG64)Entry = 0xff40f3fd50003c00ULL;
/* Setup TSS entry */
Entry = KiGetGdtEntry(GdtBase, KGDT_TSS);
Entry = KiGetGdtEntry(GdtBase, KGDT64_SYS_TSS);
KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
/* Setup GDT descriptor */
@ -333,15 +341,8 @@ 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(KGDT_TSS);
__ltr(KGDT64_SYS_TSS);
DPRINTM(DPRINT_WINDOWS, "leave WinLdrSetProcessorContext\n");
}

View file

@ -1,5 +1,4 @@
/* $Id$
*
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Display Control Panel
* FILE: lib/cpl/desk/appearance.c
@ -486,11 +485,17 @@ 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;
@ -538,8 +543,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
g->Theme.bHasChanged = TRUE;
i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)i, 0);
UpdateSelectedThemeId(hwndDlg, g);
LoadThemeFromReg(g);
//SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, WM_PAINT, 0, 0);
}
@ -557,6 +561,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case PSN_APPLY:
if (g->Theme.bHasChanged)
{
UpdateSelectedThemeId(hwndDlg, g);
ApplyTheme(g);
}
return TRUE;

View file

@ -94,14 +94,17 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.state = LVIS_SELECTED;
listItem.state = 0;
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++;
@ -143,14 +146,17 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.state = LVIS_SELECTED;
listItem.state = 0;
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++;
}
@ -454,13 +460,17 @@ OnBrowseButton(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
ZeroMemory(&listItem, sizeof(LV_ITEM));
listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE;
listItem.state = LVIS_SELECTED;
listItem.state = 0;
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++;

View file

@ -1,5 +1,4 @@
/* $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

View file

@ -58,7 +58,6 @@ 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

View file

@ -336,6 +336,7 @@ 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))
{
@ -361,7 +362,6 @@ CBDAPinControl_fnConstructor(
WCHAR Buffer[100];
swprintf(Buffer, L"CBDAPinControl_fnConstructor failed to register filter with %lx\n", hr);
OutputDebugStringW(Buffer);
DebugBreak();
}
}
}

View file

@ -357,6 +357,7 @@ CKsAllocator::GetBuffer(
if (!m_FreeList.empty())
{
OutputDebugStringW(L"CKsAllocator::GetBuffer HACK\n");
Sample = m_FreeList.top();
m_FreeList.pop();
}

View file

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

View file

@ -700,7 +700,6 @@ CInputPin::Receive(IMediaSample *pSample)
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::Receive NotImplemented\n");
DebugBreak();
#endif
return E_NOTIMPL;
@ -712,7 +711,6 @@ CInputPin::ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSample
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ReceiveMultiple NotImplemented\n");
DebugBreak();
#endif
return E_NOTIMPL;
@ -724,7 +722,6 @@ CInputPin::ReceiveCanBlock( void)
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ReceiveCanBlock NotImplemented\n");
DebugBreak();
#endif
return S_FALSE;
@ -923,7 +920,6 @@ CInputPin::KsQualityNotify(
OutputDebugStringW(L"CInputPin::KsQualityNotify NotImplemented\n");
#endif
DebugBreak();
return E_NOTIMPL;
}
@ -1114,7 +1110,6 @@ CInputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::Connect NotImplemented\n");
DebugBreak();
#endif
return NOERROR;
}
@ -1199,7 +1194,6 @@ CInputPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::ConnectionMediaType NotImplemented\n");
DebugBreak();
#endif
return E_NOTIMPL;
@ -1496,7 +1490,6 @@ 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;
}
@ -1629,7 +1622,6 @@ CInputPin::CreatePinHandle(
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle GetSupportedSets failed\n");
DebugBreak();
#endif
return hr;
}
@ -1640,7 +1632,6 @@ CInputPin::CreatePinHandle(
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CInputPin::CreatePinHandle LoadProxyPlugins failed\n");
DebugBreak();
#endif
return hr;
}
@ -1783,7 +1774,6 @@ CInputPin::LoadProxyPlugins(
{
// store plugin
m_Plugins.push_back(pUnknown);
DebugBreak();
}
// close key
RegCloseKey(hSubKey);

View file

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

View file

@ -246,8 +246,16 @@ 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);
@ -1518,6 +1526,8 @@ 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];
@ -1540,6 +1550,20 @@ 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))
@ -1548,7 +1572,6 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
OutputDebugStringW(L"COutputPin::Connect no IMemInputPin interface\n");
#endif
DebugBreak();
return hr;
}
@ -1649,10 +1672,24 @@ COutputPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
return hr;
}
if (!m_hPin)
assert(m_hPin != INVALID_HANDLE_VALUE);
// get all supported sets
if (m_Plugins.size() == 0)
{
//FIXME create pin handle
assert(0);
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);
}
}
// receive connection;
@ -1946,13 +1983,26 @@ 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;
}
@ -2003,6 +2053,12 @@ 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;
}
@ -2010,7 +2066,12 @@ COutputPin::CreatePin(
hr = InterfaceHandler->KsSetPin((IKsPin*)this);
if (FAILED(hr))
{
// failed to load interface handler plugin
// failed to initialize interface handler plugin
#ifdef KSPROXY_TRACE
WCHAR Buffer[100];
swprintf(Buffer, L"COutputPin::CreatePin failed to initialize interface handler %lx\n", hr);
OutputDebugStringW(Buffer);
#endif
InterfaceHandler->Release();
CoTaskMemFree(MediumList);
CoTaskMemFree(InterfaceList);
@ -2027,7 +2088,6 @@ 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;
@ -2037,6 +2097,12 @@ 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;
}
@ -2058,11 +2124,14 @@ 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;
}
@ -2075,9 +2144,10 @@ 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));
@ -2088,7 +2158,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;
@ -2101,13 +2171,19 @@ 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();
@ -2116,13 +2192,19 @@ COutputPin::CreatePinHandle(
KsObjectParent->Release();
if (!hFilter)
return E_HANDLE;
// create pin
hr = KsCreatePin(hFilter, PinConnect, GENERIC_READ, &m_hPin);
if (SUCCEEDED(hr))
{
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);
if (dwError == ERROR_SUCCESS)
{
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));
@ -2173,42 +2255,14 @@ 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);
@ -2338,7 +2392,6 @@ COutputPin::LoadProxyPlugins(
{
// store plugin
m_Plugins.push_back(pUnknown);
DebugBreak();
}
// close key
RegCloseKey(hSubKey);
@ -2357,17 +2410,48 @@ COutputPin::IoProcessRoutine()
IMediaSample *Sample;
LONG SampleCount;
HRESULT hr;
PKSSTREAM_SEGMENT StreamSegment;
PKSSTREAM_SEGMENT * StreamSegment;
HANDLE hEvent;
IMediaSample * Samples[1];
IMediaSample ** Samples;
LONG NumHandles;
DWORD dwStatus;
#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
{
@ -2392,14 +2476,14 @@ COutputPin::IoProcessRoutine()
// fill buffer
SampleCount = 1;
Samples[0] = Sample;
Samples[m_IoCount] = Sample;
Sample->SetTime(NULL, NULL);
hr = m_InterfaceHandler->KsProcessMediaSamples(NULL, /* FIXME */
Samples,
&Samples[m_IoCount],
&SampleCount,
KsIoOperation_Read,
&StreamSegment);
&StreamSegment[m_IoCount]);
if (FAILED(hr) || !StreamSegment)
{
#ifdef KSPROXY_TRACE
@ -2409,14 +2493,26 @@ COutputPin::IoProcessRoutine()
break;
}
// get completion event
hEvent = StreamSegment->CompletionEvent;
// 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;
// wait for i/o completion
WaitForSingleObject(hEvent, INFINITE);
dwStatus = WaitForSingleObject(hEvent, INFINITE);
swprintf(Buffer, L"COutputPin::IoProcessRoutine dwStatus %lx Error %lx NumHandles %lu\n", dwStatus, GetLastError(), NumHandles);
OutputDebugStringW(Buffer);
// perform completion
m_InterfaceHandler->KsCompleteIo(StreamSegment);
m_InterfaceHandler->KsCompleteIo(StreamSegment[0]);
// close completion event
CloseHandle(hEvent);
@ -2426,7 +2522,7 @@ COutputPin::IoProcessRoutine()
assert(m_MemInputPin);
// now deliver the sample
hr = m_MemInputPin->Receive(Sample);
hr = m_MemInputPin->Receive(Samples[0]);
#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);
@ -2438,6 +2534,11 @@ 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

View file

@ -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>

View file

@ -1954,7 +1954,6 @@ CKsProxy::IsDirty()
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::IsDirty Notimplemented\n");
DebugBreak();
#endif
return E_NOTIMPL;
}
@ -2035,7 +2034,6 @@ CKsProxy::Load(
}while(Length > 0);
DebugBreak();
return S_OK;
}
@ -2059,7 +2057,6 @@ CKsProxy::GetSizeMax(
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::GetSizeMax Notimplemented\n");
DebugBreak();
#endif
return E_NOTIMPL;
@ -2480,23 +2477,50 @@ 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);
@ -2504,7 +2528,14 @@ 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)
@ -2512,6 +2543,11 @@ 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;
}
@ -2522,6 +2558,11 @@ 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;
}
@ -2627,9 +2668,12 @@ 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
@ -2638,6 +2682,14 @@ 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;
}
@ -2986,10 +3038,6 @@ STDMETHODCALLTYPE
CKsProxy::EnumPins(
IEnumPins **ppEnum)
{
#ifdef KSPROXY_TRACE
OutputDebugStringW(L"CKsProxy::EnumPins\n");
#endif
return CEnumPins_fnConstructor(m_Pins, IID_IEnumPins, (void**)ppEnum);
}

View file

@ -155,14 +155,6 @@ 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;

View file

@ -9,10 +9,14 @@
#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},
{NULL, NULL}
{&CLSID_DVBTNetworkProvider, CNetworkProvider_fnConstructor, L"ReactOS DVBT Network Provider"},
{NULL, NULL, NULL}
};
extern "C"
@ -53,8 +57,19 @@ 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
{
@ -71,6 +86,24 @@ 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
@ -80,12 +113,50 @@ DllRegisterServer(void)
ULONG Index = 0;
LPOLESTR pStr;
HRESULT hr = S_OK;
HKEY hClass, hKey, hSubKey;
HKEY hClass, hKey, hSubKey, hProvider, hInstance, hFilter;
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
{
@ -104,11 +175,23 @@ 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;
}

View file

@ -28,6 +28,7 @@ typedef struct
{
const GUID* riid;
LPFNCREATEINSTANCE lpfnCI;
LPCWSTR ProviderName;
} INTERFACE_TABLE;
/* classfactory.cpp */

View file

@ -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, noone should call it */
/* MS doesn't implement it either, no one 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 : (const AM_MEDIA_TYPE *)NULL);
*mtypes = mediaenum_create(This->sg->pin_in.pair ? &This->sg->mtype : NULL);
return *mtypes ? S_OK : E_OUTOFMEMORY;
}

View file

@ -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((char *)&pmt->subtype.Data1, 4));
TRACE("Fourcc: %s\n", debugstr_an((const 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