Sync with trunk r63174.

CORE-8176 #resolve #comment Trunk commit r63174 should fix this issue. I merged from trunk to bring it into Shell-experiments.

svn path=/branches/shell-experiments/; revision=63175
This commit is contained in:
David Quintana 2014-05-06 15:51:24 +00:00
commit 057a69972f
323 changed files with 17885 additions and 12574 deletions

View file

@ -58,7 +58,6 @@ VOID Usage(VOID)
int _tmain (int argc, TCHAR *argv[])
{
INT i;
INT LineLen1, LineLen2;
FILE *fp1, *fp2; // file pointers
PTCHAR Line1 = (TCHAR *)malloc(STRBUF * sizeof(TCHAR));
PTCHAR Line2 = (TCHAR *)malloc(STRBUF * sizeof(TCHAR));
@ -156,8 +155,8 @@ int _tmain (int argc, TCHAR *argv[])
_tprintf(_T("Comparing %s and %s...\n"), File1, File2);
while ((LineLen1 = GetLine(Line1, fp1) != 0) &&
(LineLen2 = GetLine(Line2, fp2) != 0))
while ((GetLine(Line1, fp1) != 0) &&
(GetLine(Line2, fp2) != 0))
{
// LineCount++;
while ((*Line1 != '\0') && (*Line2 != '\0'))

View file

@ -125,11 +125,12 @@ find_str (char *sz, FILE *p, int invert_search,
void
usage (void)
{
TCHAR lpUsage[4096];
WCHAR wszUsage[4096];
char oemUsage[4096];
LoadString( GetModuleHandle(NULL), IDS_USAGE, (LPTSTR)lpUsage, 4096);
CharToOem(lpUsage, lpUsage);
printf( lpUsage );
LoadStringW (GetModuleHandleW (NULL), IDS_USAGE, wszUsage, sizeof(wszUsage) / sizeof(wszUsage[0]));
CharToOemW (wszUsage, oemUsage);
fputs (oemUsage, stdout);
}
@ -139,7 +140,8 @@ main (int argc, char **argv)
{
char *opt, *needle = NULL;
int ret = 0;
TCHAR lpMessage[4096];
WCHAR wszMessage[4096];
char oemMessage[4096];
int invert_search = 0; /* flag to invert the search */
int count_lines = 0; /* flag to whether/not count lines */
@ -216,9 +218,9 @@ main (int argc, char **argv)
{
/* We were not able to find a file. Display a message and
set the exit status. */
LoadString( GetModuleHandle(NULL), IDS_NO_SUCH_FILE, (LPTSTR)lpMessage, 4096);
CharToOem(lpMessage, lpMessage);
fprintf (stderr, lpMessage, *argv);//
LoadStringW (GetModuleHandleW (NULL), IDS_NO_SUCH_FILE, wszMessage, sizeof(wszMessage) / sizeof(wszMessage[0]));
CharToOemW (wszMessage, oemMessage);
fprintf (stderr, oemMessage, *argv);
}
else
{
@ -235,9 +237,9 @@ main (int argc, char **argv)
}
else
{
LoadString(GetModuleHandle(NULL), IDS_CANNOT_OPEN, (LPTSTR)lpMessage, 4096);
CharToOem(lpMessage, lpMessage);
fprintf (stderr, lpMessage,
LoadStringW (GetModuleHandleW (NULL), IDS_CANNOT_OPEN, wszMessage, sizeof(wszMessage) / sizeof(wszMessage[0]));
CharToOemW (wszMessage, oemMessage);
fprintf (stderr, oemMessage,
finddata.name);
}
}

View file

@ -112,7 +112,7 @@ ShowMCIError(HWND hwnd, DWORD dwError)
LoadString(hInstance, IDS_DEFAULTMCIERRMSG, szErrorMessage, sizeof(szErrorMessage) / sizeof(TCHAR));
}
_stprintf(szTempMessage, _T("MMSYS%u: %s"), dwError, szErrorMessage);
_stprintf(szTempMessage, _T("MMSYS%lu: %s"), dwError, szErrorMessage);
MessageBox(hwnd, szTempMessage, szAppTitle, MB_OK | MB_ICONEXCLAMATION);
}

View file

@ -268,7 +268,7 @@ UpdateViewMenu(PMAIN_WND_INFO Info)
CheckMenuItem(hMenu,
IDC_SHOWHIDDEN,
MF_BYCOMMAND | (Info->bShowHidden) ? MF_CHECKED : MF_UNCHECKED);
MF_BYCOMMAND | (Info->bShowHidden ? MF_CHECKED : MF_UNCHECKED));
}
@ -304,7 +304,7 @@ InitMainWnd(PMAIN_WND_INFO Info)
0);
SetMenuDefaultItem(Info->hShortcutMenu, IDC_PROP, FALSE);
/* create seperate thread to emum devices */
/* create separate thread to emum devices */
DevEnumThread = CreateThread(NULL,
0,
DeviceEnumThread,
@ -418,6 +418,23 @@ OnNotify(PMAIN_WND_INFO Info,
}
break;
case NM_RETURN:
{
HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView);
if (Info->Display == DevicesByType)
{
OpenPropSheet(Info->hTreeView, hSelected);
}
else if (Info->Display == DevicesByConnection)
{
if (hSelected != TreeView_GetRoot(Info->hTreeView))
{
OpenPropSheet(Info->hTreeView, hSelected);
}
}
}
break;
case NM_DBLCLK:
{
HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView);

View file

@ -260,19 +260,12 @@ GetEventCategory(IN LPCWSTR KeyName,
(LPWSTR)&lpMsgBuf,
EVENT_MESSAGE_FILE_BUFFER,
NULL) != 0)
{
if (lpMsgBuf)
{
/* Trim the string */
TrimNulls((LPWSTR)lpMsgBuf);
TrimNulls(lpMsgBuf);
/* Copy the category name */
wcscpy(CategoryName, (LPCWSTR)lpMsgBuf);
}
else
{
wcscpy(CategoryName, (LPCWSTR)lpMsgBuf);
}
wcscpy(CategoryName, lpMsgBuf);
}
else
{
@ -1118,14 +1111,14 @@ DisplayEvent(HWND hDlg)
if (iIndex != -1)
{
ListView_GetItemText(hwndListView, iIndex, 0, szEventType, sizeof(szEventType) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 1, szDate, sizeof(szDate) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 2, szTime, sizeof(szTime) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 3, szSource, sizeof(szSource) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 4, szCategory, sizeof(szCategory) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 5, szEventID, sizeof(szEventID) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 6, szUser, sizeof(szUser) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 7, szComputer, sizeof(szComputer) * sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 0, szEventType, sizeof(szEventType) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 1, szDate, sizeof(szDate) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 2, szTime, sizeof(szTime) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 3, szSource, sizeof(szSource) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 4, szCategory, sizeof(szCategory) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 5, szEventID, sizeof(szEventID) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 6, szUser, sizeof(szUser) / sizeof(WCHAR));
ListView_GetItemText(hwndListView, iIndex, 7, szComputer, sizeof(szComputer) / sizeof(WCHAR));
bEventData = !(pevlr->DataLength == 0);

View file

@ -31,8 +31,8 @@ SetWallpaper(TCHAR * FileName, DWORD dwStyle, DWORD dwTile) //FIXME: Has to be c
RegSetValueEx(hDesktop, _T("Wallpaper"), 0, REG_SZ, (LPBYTE) FileName,
_tcslen(FileName) * sizeof(TCHAR));
_stprintf(szStyle, _T("%i"), dwStyle);
_stprintf(szTile, _T("%i"), dwTile);
_stprintf(szStyle, _T("%lu"), dwStyle);
_stprintf(szTile, _T("%lu"), dwTile);
RegSetValueEx(hDesktop, _T("WallpaperStyle"), 0, REG_SZ, (LPBYTE) szStyle,
_tcslen(szStyle) * sizeof(TCHAR));

View file

@ -595,7 +595,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (!drawing)
{
TCHAR coordStr[100];
_stprintf(coordStr, _T("%d, %d"), xNow, yNow);
_stprintf(coordStr, _T("%ld, %ld"), xNow, yNow);
SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) coordStr);
}
}
@ -634,7 +634,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case TOOL_SHAPE:
{
TCHAR coordStr[100];
_stprintf(coordStr, _T("%d, %d"), xNow, yNow);
_stprintf(coordStr, _T("%ld, %ld"), xNow, yNow);
SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) coordStr);
break;
}
@ -648,7 +648,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
TCHAR sizeStr[100];
if ((activeTool >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
yRel = xRel;
_stprintf(sizeStr, _T("%d x %d"), xRel, yRel);
_stprintf(sizeStr, _T("%ld x %ld"), xRel, yRel);
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) sizeStr);
}
}
@ -661,7 +661,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
TCHAR sizeStr[100];
if ((activeTool >= TOOL_LINE) && (GetAsyncKeyState(VK_SHIFT) < 0))
yRel = xRel;
_stprintf(sizeStr, _T("%d x %d"), xRel, yRel);
_stprintf(sizeStr, _T("%ld x %ld"), xRel, yRel);
SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) sizeStr);
}
}

View file

@ -225,7 +225,7 @@ CBindStatusCallback_OnProgress(IBindStatusCallback *iface,
if (This->szMimeType[0] != _T('\0'))
_tprintf(_T("Length: %I64u [%s]\n"), This->Size, This->szMimeType);
else
_tprintf(_T("Length: %ull\n"), This->Size);
_tprintf(_T("Length: %I64u\n"), This->Size);
}
_tprintf(_T("\n"));

View file

@ -1303,13 +1303,13 @@ void shell(int argc, const char *argv[])
if (argc > 1)
{
strncat(CmdLine, " /C", MAX_PATH);
strncat(CmdLine, " /C", MAX_PATH - strlen(CmdLine) - 1);
}
for (i=1; i<argc; i++)
{
strncat(CmdLine, " ", MAX_PATH);
strncat(CmdLine, argv[i], MAX_PATH);
strncat(CmdLine, " ", MAX_PATH - strlen(CmdLine) - 1);
strncat(CmdLine, argv[i], MAX_PATH - strlen(CmdLine) - 1);
}
StartupInfo.cb = sizeof( StartupInfo );

View file

@ -333,8 +333,8 @@ LPTSTR GetConnectionDescription(LPTSTR lpClass)
(PBYTE)lpKeyClass,
&dwDataSize) != ERROR_SUCCESS)
{
lpKeyClass = NULL;
HeapFree(ProcessHeap, 0, lpKeyClass);
lpKeyClass = NULL;
continue;
}
}

View file

@ -709,7 +709,7 @@ char* TANSIParser::ParseEscapeANSI(char* pszBuffer, char* pszBufferEnd)
case 'n':
if (iCurrentParam == 1 && iParam[0]==5) {
// report the cursor position
Network.WriteString("\x1B[0n", 6);
Network.WriteString("\x1B[0n", 4);
break;
}
if (iCurrentParam == 1 && iParam[0]==6){

View file

@ -965,7 +965,7 @@ static INT_PTR CALLBACK DIALOG_GoTo_DialogProc(HWND hwndDialog, UINT uMsg, WPARA
switch(uMsg) {
case WM_INITDIALOG:
hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER);
_sntprintf(szText, SIZEOF(szText), _T("%d"), lParam);
_sntprintf(szText, SIZEOF(szText), _T("%ld"), lParam);
SetWindowText(hTextBox, szText);
break;
case WM_COMMAND:

View file

@ -179,12 +179,16 @@ EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc)
if (!GetLocaleInfoW(GetUserDefaultLCID(), LOCALE_ILANGUAGE,
szLocale, sizeof(szLocale) / sizeof(WCHAR)))
{
FindClose(hFind);
return FALSE;
}
hr = StringCbCatW(szSectionLocale, sizeof(szSectionLocale), szLocale);
if (FAILED(hr))
{
FindClose(hFind);
return FALSE;
}
#define GET_STRING1(a, b) \
if (!ParserGetString(szSectionLocale, a, b, MAX_PATH, FindFileData.cFileName)) \

View file

@ -205,7 +205,7 @@ static
DWORD WINAPI
ThreadFunc(LPVOID Context)
{
IBindStatusCallback *dl;
IBindStatusCallback *dl = NULL;
WCHAR path[MAX_PATH];
LPWSTR p;
HWND Dlg = (HWND) Context;
@ -217,7 +217,7 @@ ThreadFunc(LPVOID Context)
BOOL bCab = FALSE;
HINTERNET hOpen = NULL;
HINTERNET hFile = NULL;
HANDLE hOut = NULL;
HANDLE hOut = INVALID_HANDLE_VALUE;
unsigned char lpBuffer[4096];
const LPWSTR lpszAgent = L"RApps/1.0";
@ -262,6 +262,7 @@ ThreadFunc(LPVOID Context)
/* download it */
bTempfile = TRUE;
dl = CreateDl(Context, &bCancelled);
if (dl == NULL) goto end;
hOpen = InternetOpenW(lpszAgent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (!hOpen) goto end;
@ -284,7 +285,8 @@ ThreadFunc(LPVOID Context)
while (dwBytesRead);
CloseHandle(hOut);
if (dl) IBindStatusCallback_Release(dl);
hOut = INVALID_HANDLE_VALUE;
if (bCancelled) goto end;
ShowWindow(Dlg, SW_HIDE);
@ -295,10 +297,12 @@ ThreadFunc(LPVOID Context)
ShellExecuteW( NULL, L"open", path, NULL, NULL, SW_SHOWNORMAL );
}
end:
CloseHandle(hOut);
if (hOut != INVALID_HANDLE_VALUE) CloseHandle(hOut);
InternetCloseHandle(hFile);
InternetCloseHandle(hOpen);
if (dl) IBindStatusCallback_Release(dl);
if (bTempfile)
{
if (bCancelled || (SettingsInfo.bDelInstaller && !bCab))

View file

@ -893,7 +893,7 @@ static void REGPROC_print_error(void)
status = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, error_code, 0, (LPSTR) &lpMsgBuf, 0, NULL);
if (!status) {
fprintf(stderr,"%S: Cannot display message for error %ld, status %ld\n",
fprintf(stderr,"%S: Cannot display message for error %lu, status %lu\n",
getAppName(), error_code, GetLastError());
exit(1);
}

View file

@ -1049,7 +1049,7 @@ static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, HLPFILE* file, const
ptr = beg + 2; /* for type and pack */
mm = fetch_ushort(&ptr); /* mapping mode */
sprintf(tmp, "{\\pict\\wmetafile%d\\picw%d\\pich%d",
sprintf(tmp, "{\\pict\\wmetafile%u\\picw%u\\pich%u",
mm, GET_USHORT(ptr, 0), GET_USHORT(ptr, 2));
if (!HLPFILE_RtfAddControl(rd, tmp)) return FALSE;
ptr += 4;
@ -1465,11 +1465,10 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
}
/* FIXME: missing at least colors, also bold attribute looses information */
sprintf(tmp, "\\f%d\\cf%d\\fs%d%s%s%s%s",
sprintf(tmp, "\\f%u\\cf%u\\fs%u%s%s%s%s",
font, font + 2, fs,
page->file->fonts[font].LogFont.lfWeight > 400 ? "\\b" : "\\b0",
page->file->fonts[font].LogFont.lfItalic ? "\\i" : "\\i0",
page->file->fonts[font].LogFont.lfUnderline ? "\\ul" : "\\ul0",
page->file->fonts[font].LogFont.lfItalic ? "\\i" : "\\i0", page->file->fonts[font].LogFont.lfUnderline ? "\\ul" : "\\ul0",
page->file->fonts[font].LogFont.lfStrikeOut ? "\\strike" : "\\strike0");
if (!HLPFILE_RtfAddControl(rd, tmp)) goto done;
}

View file

@ -1,6 +1,5 @@
add_executable(winver winver.c)
add_executable(winver winver.c winver.rc)
set_module_type(winver win32gui UNICODE)
add_importlibs(winver shell32 msvcrt kernel32)
add_cd_file(TARGET winver DESTINATION reactos/system32 FOR all)

View file

@ -1,3 +1,9 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Version Program
* FILE: winver.c
*/
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
@ -5,11 +11,10 @@
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
static const WCHAR szROS[] = { 'R','e','a','c','t','O','S',0 };
UNREFERENCED_PARAMETER(hInstance);
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
UNREFERENCED_PARAMETER(nCmdShow);
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(hInstance);
ShellAboutW(0, szROS, 0, 0);
return 1;
return ShellAboutW(NULL, L"ReactOS", NULL, NULL);
}

View file

@ -0,0 +1,5 @@
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Version Program"
#define REACTOS_STR_INTERNAL_NAME "winver"
#define REACTOS_STR_ORIGINAL_FILENAME "winver.exe"
#include <reactos/version.rc>

View file

@ -1620,7 +1620,7 @@ DWORD PNP_CreateDevInst(
dwInstanceNumber = 0;
do
{
swprintf(szGeneratedInstance, L"Root\\%ls\\%04d",
swprintf(szGeneratedInstance, L"Root\\%ls\\%04lu",
pszDeviceID, dwInstanceNumber);
/* Try to create a device instance with this ID */
@ -2115,7 +2115,7 @@ DWORD PNP_HwProfFlags(
else
{
swprintf(szKeyName,
L"System\\CurrentControlSet\\HardwareProfiles\\%04u\\System\\CurrentControlSet\\Enum",
L"System\\CurrentControlSet\\HardwareProfiles\\%04lu\\System\\CurrentControlSet\\Enum",
ulConfig);
}

View file

@ -461,7 +461,7 @@ AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
}
else
{
swprintf(szLangID, L"d%03u%s", uCount, MuiLayouts[uIndex].LangID);
swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
Status = NtSetValueKey(KeyHandle,
&ValueName,
0,

View file

@ -33,8 +33,10 @@
/* FUNCTIONS ****************************************************************/
static VOID
GetDriverName (PDISKENTRY DiskEntry)
static
VOID
GetDriverName(
PDISKENTRY DiskEntry)
{
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
WCHAR KeyName[32];
@ -66,8 +68,10 @@ GetDriverName (PDISKENTRY DiskEntry)
}
static VOID
AssignDriverLetters (PPARTLIST List)
static
VOID
AssignDriverLetters(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -161,8 +165,10 @@ AssignDriverLetters (PPARTLIST List)
}
static VOID
UpdatePartitionNumbers (PDISKENTRY DiskEntry)
static
VOID
UpdatePartitionNumbers(
PDISKENTRY DiskEntry)
{
PPARTENTRY PartEntry;
PLIST_ENTRY Entry;
@ -210,8 +216,10 @@ UpdatePartitionNumbers (PDISKENTRY DiskEntry)
}
static VOID
AddPartitionToList (ULONG DiskNumber,
static
VOID
AddPartitionToList(
ULONG DiskNumber,
PDISKENTRY DiskEntry,
DRIVE_LAYOUT_INFORMATION *LayoutBuffer)
{
@ -229,6 +237,7 @@ AddPartitionToList (ULONG DiskNumber,
break;
}
}
if (j >= 4)
{
continue;
@ -320,8 +329,10 @@ AddPartitionToList (ULONG DiskNumber,
}
static VOID
ScanForUnpartitionedDiskSpace (PDISKENTRY DiskEntry)
static
VOID
ScanForUnpartitionedDiskSpace(
PDISKENTRY DiskEntry)
{
ULONGLONG LastStartingOffset;
ULONGLONG LastPartitionLength;
@ -445,9 +456,11 @@ ScanForUnpartitionedDiskSpace (PDISKENTRY DiskEntry)
}
}
NTSTATUS
NTAPI
DiskIdentifierQueryRoutine(PWSTR ValueName,
DiskIdentifierQueryRoutine(
PWSTR ValueName,
ULONG ValueType,
PVOID ValueData,
ULONG ValueLength,
@ -469,12 +482,15 @@ DiskIdentifierQueryRoutine(PWSTR ValueName,
return STATUS_SUCCESS;
}
return STATUS_UNSUCCESSFUL;
}
NTSTATUS
NTAPI
DiskConfigurationDataQueryRoutine(PWSTR ValueName,
DiskConfigurationDataQueryRoutine(
PWSTR ValueName,
ULONG ValueType,
PVOID ValueData,
ULONG ValueLength,
@ -491,10 +507,13 @@ DiskConfigurationDataQueryRoutine(PWSTR ValueName,
return STATUS_UNSUCCESSFUL;
FullResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)ValueData;
/* Hm. Version and Revision are not set on Microsoft Windows XP... */
/*if (FullResourceDescriptor->PartialResourceList.Version != 1 ||
#if 0
if (FullResourceDescriptor->PartialResourceList.Version != 1 ||
FullResourceDescriptor->PartialResourceList.Revision != 1)
return STATUS_UNSUCCESSFUL;*/
return STATUS_UNSUCCESSFUL;
#endif
for (i = 0; i < FullResourceDescriptor->PartialResourceList.Count; i++)
{
@ -507,12 +526,15 @@ DiskConfigurationDataQueryRoutine(PWSTR ValueName,
return STATUS_SUCCESS;
}
return STATUS_UNSUCCESSFUL;
}
NTSTATUS
NTAPI
SystemConfigurationDataQueryRoutine(PWSTR ValueName,
SystemConfigurationDataQueryRoutine(
PWSTR ValueName,
ULONG ValueType,
PVOID ValueData,
ULONG ValueLength,
@ -528,10 +550,13 @@ SystemConfigurationDataQueryRoutine(PWSTR ValueName,
return STATUS_UNSUCCESSFUL;
FullResourceDescriptor = (PCM_FULL_RESOURCE_DESCRIPTOR)ValueData;
/* Hm. Version and Revision are not set on Microsoft Windows XP... */
/*if (FullResourceDescriptor->PartialResourceList.Version != 1 ||
#if 0
if (FullResourceDescriptor->PartialResourceList.Version != 1 ||
FullResourceDescriptor->PartialResourceList.Revision != 1)
return STATUS_UNSUCCESSFUL;*/
return STATUS_UNSUCCESSFUL;
#endif
for (i = 0; i < FullResourceDescriptor->PartialResourceList.Count; i++)
{
@ -542,17 +567,22 @@ SystemConfigurationDataQueryRoutine(PWSTR ValueName,
*Int13Drives = (CM_INT13_DRIVE_PARAMETER*) RtlAllocateHeap(ProcessHeap, 0, FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
if (*Int13Drives == NULL)
return STATUS_NO_MEMORY;
memcpy(*Int13Drives,
&FullResourceDescriptor->PartialResourceList.PartialDescriptors[i + 1],
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
return STATUS_SUCCESS;
}
return STATUS_UNSUCCESSFUL;
}
#define ROOT_NAME L"\\Registry\\Machine\\HARDWARE\\DESCRIPTION\\System\\MultifunctionAdapter"
static VOID
EnumerateBiosDiskEntries(PPARTLIST PartList)
EnumerateBiosDiskEntries(
PPARTLIST PartList)
{
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
WCHAR Name[120];
@ -626,6 +656,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
QueryTable[0].QueryRoutine = DiskIdentifierQueryRoutine;
QueryTable[1].Name = L"Configuration Data";
QueryTable[1].QueryRoutine = DiskConfigurationDataQueryRoutine;
DiskCount = 0;
while (1)
{
@ -634,6 +665,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
{
break;
}
swprintf(Name, L"%s\\%lu\\DiskController\\0\\DiskPeripheral\\%lu", ROOT_NAME, AdapterCount, DiskCount);
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
Name,
@ -645,6 +677,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
RtlFreeHeap(ProcessHeap, 0, BiosDiskEntry);
break;
}
BiosDiskEntry->DiskNumber = DiskCount;
BiosDiskEntry->Recognized = FALSE;
@ -657,7 +690,6 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
DPRINT1("Didn't find int13 drive datas for disk %u\n", DiskCount);
}
InsertTailList(&PartList->BiosDiskListHead, &BiosDiskEntry->ListEntry);
DPRINT("DiskNumber: %lu\n", BiosDiskEntry->DiskNumber);
@ -675,17 +707,23 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
DiskCount++;
}
}
RtlFreeHeap(ProcessHeap, 0, Int13Drives);
return;
}
}
AdapterCount++;
}
RtlFreeHeap(ProcessHeap, 0, Int13Drives);
}
static VOID
AddDiskToList (HANDLE FileHandle,
static
VOID
AddDiskToList(
HANDLE FileHandle,
ULONG DiskNumber,
PPARTLIST List)
{
@ -745,7 +783,6 @@ AddDiskToList (HANDLE FileHandle,
Mbr = (PARTITION_SECTOR*)RtlAllocateHeap(ProcessHeap,
0,
DiskGeometry.BytesPerSector);
if (Mbr == NULL)
{
return;
@ -924,7 +961,8 @@ AddDiskToList (HANDLE FileHandle,
PPARTLIST
CreatePartitionList (SHORT Left,
CreatePartitionList(
SHORT Left,
SHORT Top,
SHORT Right,
SHORT Bottom)
@ -1020,8 +1058,7 @@ CreatePartitionList (SHORT Left,
}
else
{
List->CurrentDisk =
CONTAINING_RECORD (List->DiskListHead.Flink,
List->CurrentDisk = CONTAINING_RECORD(List->DiskListHead.Flink,
DISKENTRY,
ListEntry);
@ -1032,8 +1069,7 @@ CreatePartitionList (SHORT Left,
}
else
{
List->CurrentPartition =
CONTAINING_RECORD (List->CurrentDisk->PartListHead.Flink,
List->CurrentPartition = CONTAINING_RECORD(List->CurrentDisk->PartListHead.Flink,
PARTENTRY,
ListEntry);
List->CurrentPartitionNumber = 0;
@ -1045,7 +1081,8 @@ CreatePartitionList (SHORT Left,
VOID
DestroyPartitionList (PPARTLIST List)
DestroyPartitionList(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PBIOSDISKENTRY BiosDiskEntry;
@ -1090,8 +1127,10 @@ DestroyPartitionList (PPARTLIST List)
}
static VOID
PrintEmptyLine (PPARTLIST List)
static
VOID
PrintEmptyLine(
PPARTLIST List)
{
COORD coPos;
DWORD Written;
@ -1101,7 +1140,6 @@ PrintEmptyLine (PPARTLIST List)
Width = List->Right - List->Left - 1;
Height = List->Bottom - List->Top - 2;
coPos.X = List->Left + 1;
coPos.Y = List->Top + 1 + List->Line;
@ -1119,12 +1157,15 @@ PrintEmptyLine (PPARTLIST List)
coPos,
&Written);
}
List->Line++;
}
static VOID
PrintPartitionData (PPARTLIST List,
static
VOID
PrintPartitionData(
PPARTLIST List,
PDISKENTRY DiskEntry,
PPARTENTRY PartEntry,
ULONG PartNumber)
@ -1134,7 +1175,6 @@ PrintPartitionData (PPARTLIST List,
DWORD Written;
USHORT Width;
USHORT Height;
LARGE_INTEGER PartSize;
PCHAR Unit;
UCHAR Attribute;
@ -1143,7 +1183,6 @@ PrintPartitionData (PPARTLIST List,
Width = List->Right - List->Left - 1;
Height = List->Bottom - List->Top - 2;
coPos.X = List->Left + 1;
coPos.Y = List->Top + 1 + List->Line;
@ -1280,12 +1319,15 @@ PrintPartitionData (PPARTLIST List,
coPos,
&Written);
}
List->Line++;
}
static VOID
PrintDiskData (PPARTLIST List,
static
VOID
PrintDiskData(
PPARTLIST List,
PDISKENTRY DiskEntry)
{
PPARTENTRY PartEntry;
@ -1302,7 +1344,6 @@ PrintDiskData (PPARTLIST List,
Width = List->Right - List->Left - 1;
Height = List->Bottom - List->Top - 2;
coPos.X = List->Left + 1;
coPos.Y = List->Top + 1 + List->Line;
@ -1344,6 +1385,7 @@ PrintDiskData (PPARTLIST List,
DiskEntry->Bus,
DiskEntry->Id);
}
if (List->Line >= 0 && List->Line <= Height)
{
FillConsoleOutputAttribute(StdOutput,
@ -1368,6 +1410,7 @@ PrintDiskData (PPARTLIST List,
coPos,
&Written);
}
List->Line++;
/* Print separator line */
@ -1410,7 +1453,8 @@ PrintDiskData (PPARTLIST List,
VOID
DrawPartitionList (PPARTLIST List)
DrawPartitionList(
PPARTLIST List)
{
PLIST_ENTRY Entry, Entry2;
PDISKENTRY DiskEntry;
@ -1428,15 +1472,18 @@ DrawPartitionList (PPARTLIST List)
CurrentDiskLine = 0;
CurrentPartLine = 0;
LastLine = 0;
Entry = List->DiskListHead.Flink;
while (Entry != &List->DiskListHead)
{
DiskEntry = CONTAINING_RECORD(Entry, DISKENTRY, ListEntry);
LastLine += 2;
if (CurrentPartLineFound == FALSE)
{
CurrentPartLine += 2;
}
Entry2 = DiskEntry->PartListHead.Flink;
while (Entry2 != &DiskEntry->PartListHead)
{
@ -1445,17 +1492,21 @@ DrawPartitionList (PPARTLIST List)
{
CurrentPartLineFound = TRUE;
}
Entry2 = Entry2->Flink;
if (CurrentPartLineFound == FALSE)
{
CurrentPartLine++;
}
LastLine++;
}
if (DiskEntry == List->CurrentDisk)
{
CurrentDiskLineFound = TRUE;
}
Entry = Entry->Flink;
if (Entry != &List->DiskListHead)
{
@ -1464,6 +1515,7 @@ DrawPartitionList (PPARTLIST List)
CurrentPartLine ++;
CurrentDiskLine = CurrentPartLine;
}
LastLine++;
}
else
@ -1481,12 +1533,12 @@ DrawPartitionList (PPARTLIST List)
{
List->Offset = CurrentPartLine - (List->Bottom - List->Top - 2);
}
if (CurrentDiskLine < List->Offset && CurrentPartLine - CurrentDiskLine < List->Bottom - List->Top - 2)
{
List->Offset = CurrentDiskLine;
}
/* draw upper left corner */
coPos.X = List->Left;
coPos.Y = List->Top;
@ -1624,7 +1676,10 @@ DrawPartitionList (PPARTLIST List)
DWORD
SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber)
SelectPartition(
PPARTLIST List,
ULONG DiskNumber,
ULONG PartitionNumber)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -1660,18 +1715,23 @@ SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber)
return TRUE;
}
}
Entry2 = Entry2->Flink;
}
return FALSE;
}
Entry1 = Entry1->Flink;
}
return FALSE;
}
VOID
ScrollDownPartitionList (PPARTLIST List)
ScrollDownPartitionList(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -1721,6 +1781,7 @@ ScrollDownPartitionList (PPARTLIST List)
DrawPartitionList(List);
return;
}
Entry2 = Entry2->Flink;
}
}
@ -1757,7 +1818,8 @@ ScrollDownPartitionList (PPARTLIST List)
VOID
ScrollUpPartitionList (PPARTLIST List)
ScrollUpPartitionList(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -1816,6 +1878,7 @@ ScrollUpPartitionList (PPARTLIST List)
DrawPartitionList(List);
return;
}
Entry2 = Entry2->Blink;
}
}
@ -1863,8 +1926,10 @@ ScrollUpPartitionList (PPARTLIST List)
}
static PPARTENTRY
GetPrevPartitionedEntry (PDISKENTRY DiskEntry,
static
PPARTENTRY
GetPrevPartitionedEntry(
PDISKENTRY DiskEntry,
PPARTENTRY CurrentEntry)
{
PPARTENTRY PrevEntry;
@ -1889,8 +1954,10 @@ GetPrevPartitionedEntry (PDISKENTRY DiskEntry,
}
static PPARTENTRY
GetNextPartitionedEntry (PDISKENTRY DiskEntry,
static
PPARTENTRY
GetNextPartitionedEntry(
PDISKENTRY DiskEntry,
PPARTENTRY CurrentEntry)
{
PPARTENTRY NextEntry;
@ -1915,8 +1982,10 @@ GetNextPartitionedEntry (PDISKENTRY DiskEntry,
}
static PPARTENTRY
GetPrevUnpartitionedEntry (PDISKENTRY DiskEntry,
static
PPARTENTRY
GetPrevUnpartitionedEntry(
PDISKENTRY DiskEntry,
PPARTENTRY PartEntry)
{
PPARTENTRY PrevPartEntry;
@ -1934,8 +2003,10 @@ GetPrevUnpartitionedEntry (PDISKENTRY DiskEntry,
}
static PPARTENTRY
GetNextUnpartitionedEntry (PDISKENTRY DiskEntry,
static
PPARTENTRY
GetNextUnpartitionedEntry(
PDISKENTRY DiskEntry,
PPARTENTRY PartEntry)
{
PPARTENTRY NextPartEntry;
@ -1954,7 +2025,8 @@ GetNextUnpartitionedEntry (PDISKENTRY DiskEntry,
VOID
CreateNewPartition (PPARTLIST List,
CreateNewPartition(
PPARTLIST List,
ULONGLONG PartitionSize,
BOOLEAN AutoCreate)
{
@ -2126,7 +2198,6 @@ CreateNewPartition (PPARTLIST List,
NewPartEntry->PartInfo[1].RewritePartition = TRUE;
/* Update previous container partition data */
PrevPartEntry->PartInfo[1].StartingOffset.QuadPart =
NewPartEntry->PartInfo[0].StartingOffset.QuadPart - DiskEntry->TrackSize;
PrevPartEntry->PartInfo[1].HiddenSectors =
@ -2201,7 +2272,8 @@ CreateNewPartition (PPARTLIST List,
VOID
DeleteCurrentPartition (PPARTLIST List)
DeleteCurrentPartition(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -2354,7 +2426,8 @@ DeleteCurrentPartition (PPARTLIST List)
VOID
CheckActiveBootPartition (PPARTLIST List)
CheckActiveBootPartition(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -2447,6 +2520,7 @@ CheckActiveBootPartition (PPARTLIST List)
}
}
}
/* Go to the next one */
ListEntry = ListEntry->Flink;
}
@ -2454,7 +2528,8 @@ CheckActiveBootPartition (PPARTLIST List)
BOOLEAN
CheckForLinuxFdiskPartitions (PPARTLIST List)
CheckForLinuxFdiskPartitions(
PPARTLIST List)
{
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
@ -2507,7 +2582,8 @@ CheckForLinuxFdiskPartitions (PPARTLIST List)
BOOLEAN
WritePartitionsToDisk (PPARTLIST List)
WritePartitionsToDisk(
PPARTLIST List)
{
PDRIVE_LAYOUT_INFORMATION DriveLayout;
OBJECT_ATTRIBUTES ObjectAttributes;
@ -2541,6 +2617,7 @@ WritePartitionsToDisk (PPARTLIST List)
{
/* Count partitioned entries */
PartitionCount = 0;
Entry2 = DiskEntry1->PartListHead.Flink;
while (Entry2 != &DiskEntry1->PartListHead)
{
@ -2554,6 +2631,7 @@ WritePartitionsToDisk (PPARTLIST List)
Entry2 = Entry2->Flink;
}
if (PartitionCount == 0)
{
DriveLayoutSize = sizeof (DRIVE_LAYOUT_INFORMATION) +
@ -2564,6 +2642,7 @@ WritePartitionsToDisk (PPARTLIST List)
DriveLayoutSize = sizeof (DRIVE_LAYOUT_INFORMATION) +
((PartitionCount - 1) * sizeof (PARTITION_INFORMATION));
}
DriveLayout = (PDRIVE_LAYOUT_INFORMATION)RtlAllocateHeap(ProcessHeap,
0,
DriveLayoutSize);
@ -2588,8 +2667,8 @@ WritePartitionsToDisk (PPARTLIST List)
else
{
DriveLayout->PartitionCount = PartitionCount;
Index = 0;
Entry2 = DiskEntry1->PartListHead.Flink;
while (Entry2 != &DiskEntry1->PartListHead)
{
@ -2607,6 +2686,7 @@ WritePartitionsToDisk (PPARTLIST List)
Entry2 = Entry2->Flink;
}
}
if (DiskEntry1->Signature == 0)
{
LARGE_INTEGER SystemTime;
@ -2643,8 +2723,10 @@ WritePartitionsToDisk (PPARTLIST List)
{
break;
}
Entry2 = Entry2->Flink;
}
if (Entry2 == &List->DiskListHead)
{
break;
@ -2653,12 +2735,10 @@ WritePartitionsToDisk (PPARTLIST List)
/* set one partition entry to dirty, this will update the signature */
DriveLayout->PartitionEntry[0].RewritePartition = TRUE;
}
DriveLayout->Signature = DiskEntry1->Signature;
swprintf(DstPath,
L"\\Device\\Harddisk%d\\Partition0",
DiskEntry1->DiskNumber);
@ -2676,7 +2756,6 @@ WritePartitionsToDisk (PPARTLIST List)
&Iosb,
0,
FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtOpenFile() failed (Status %lx)\n", Status);
@ -2713,7 +2792,10 @@ WritePartitionsToDisk (PPARTLIST List)
return TRUE;
}
BOOL SetMountedDeviceValues(PPARTLIST List)
BOOL
SetMountedDeviceValues(
PPARTLIST List)
{
PLIST_ENTRY Entry1, Entry2;
PDISKENTRY DiskEntry;
@ -2742,20 +2824,23 @@ BOOL SetMountedDeviceValues(PPARTLIST List)
{
if (PartEntry->DriveLetter[i])
{
if (!SetMountedDeviceValue(PartEntry->DriveLetter[i], DiskEntry->Signature, PartEntry->PartInfo[i].StartingOffset))
if (!SetMountedDeviceValue(PartEntry->DriveLetter[i],
DiskEntry->Signature,
PartEntry->PartInfo[i].StartingOffset))
{
return FALSE;
}
}
}
}
Entry2 = Entry2->Flink;
}
Entry1 = Entry1->Flink;
}
return TRUE;
}
/* EOF */

View file

@ -181,44 +181,58 @@ typedef struct
} BIOS_DISK, *PBIOS_DISK;
PPARTLIST
CreatePartitionList (SHORT Left,
CreatePartitionList(
SHORT Left,
SHORT Top,
SHORT Right,
SHORT Bottom);
VOID
DestroyPartitionList (PPARTLIST List);
DestroyPartitionList(
PPARTLIST List);
VOID
DrawPartitionList (PPARTLIST List);
DrawPartitionList(
PPARTLIST List);
DWORD
SelectPartition(PPARTLIST List, ULONG DiskNumber, ULONG PartitionNumber);
SelectPartition(
PPARTLIST List,
ULONG DiskNumber,
ULONG PartitionNumber);
BOOL
SetMountedDeviceValues(PPARTLIST List);
SetMountedDeviceValues(
PPARTLIST List);
VOID
ScrollDownPartitionList (PPARTLIST List);
ScrollDownPartitionList(
PPARTLIST List);
VOID
ScrollUpPartitionList (PPARTLIST List);
ScrollUpPartitionList(
PPARTLIST List);
VOID
CreateNewPartition (PPARTLIST List,
CreateNewPartition(
PPARTLIST List,
ULONGLONG PartitionSize,
BOOLEAN AutoCreate);
VOID
DeleteCurrentPartition (PPARTLIST List);
DeleteCurrentPartition(
PPARTLIST List);
VOID
CheckActiveBootPartition (PPARTLIST List);
CheckActiveBootPartition(
PPARTLIST List);
BOOLEAN
CheckForLinuxFdiskPartitions (PPARTLIST List);
CheckForLinuxFdiskPartitions(
PPARTLIST List);
BOOLEAN
WritePartitionsToDisk (PPARTLIST List);
WritePartitionsToDisk(
PPARTLIST List);
/* EOF */

View file

@ -58,7 +58,7 @@ PrintAlias (VOID)
DWORD len;
len = GetConsoleAliasesLength(_T("cmd.exe"));
if (len <= 0)
if (len == 0)
return;
/* allocate memory for an extra \0 char to make parsing easier */

View file

@ -397,13 +397,13 @@ Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
/* build command line for CreateProcess(): FullName + " " + rest */
BOOL quoted = !!_tcschr(First, ' ');
_tcscpy(szFullCmdLine, quoted ? _T("\"") : _T(""));
_tcsncat(szFullCmdLine, First, CMDLINE_LENGTH - _tcslen(szFullCmdLine));
_tcsncat(szFullCmdLine, quoted ? _T("\"") : _T(""), CMDLINE_LENGTH - _tcslen(szFullCmdLine));
_tcsncat(szFullCmdLine, First, CMDLINE_LENGTH - _tcslen(szFullCmdLine) - 1);
_tcsncat(szFullCmdLine, quoted ? _T("\"") : _T(""), CMDLINE_LENGTH - _tcslen(szFullCmdLine) - 1);
if (*rest)
{
_tcsncat(szFullCmdLine, _T(" "), CMDLINE_LENGTH - _tcslen(szFullCmdLine));
_tcsncat(szFullCmdLine, rest, CMDLINE_LENGTH - _tcslen(szFullCmdLine));
_tcsncat(szFullCmdLine, _T(" "), CMDLINE_LENGTH - _tcslen(szFullCmdLine) - 1);
_tcsncat(szFullCmdLine, rest, CMDLINE_LENGTH - _tcslen(szFullCmdLine) - 1);
}
TRACE ("[EXEC: %s]\n", debugstr_aw(szFullCmdLine));

View file

@ -93,7 +93,7 @@ static BOOL pendingRename()
}
else
{
printf("Couldn't open key, error %ld\n", res);
printf("Couldn't open key, error %lu\n", res);
res=FALSE;
}
@ -113,7 +113,7 @@ static BOOL pendingRename()
if (res!=ERROR_SUCCESS)
{
printf("Couldn't query value's length (%ld)\n", res);
printf("Couldn't query value's length (%lu)\n", res);
res=FALSE;
goto end;
}
@ -369,7 +369,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if ((res=RegEnumValueW(hkRun, i, szValue, &nValLength, 0, &type,
(LPBYTE)szCmdLine, &nDataLength))!=ERROR_SUCCESS)
{
printf("Couldn't read in value %ld - %ld\n", i, res);
printf("Couldn't read in value %lu - %ld\n", i, res);
continue;
}
@ -379,22 +379,22 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
if (bDelete && (res=RegDeleteValueW(hkRun, szValue))!=ERROR_SUCCESS)
{
printf("Couldn't delete value - %ld, %ld. Running command anyways.\n", i, res);
printf("Couldn't delete value - %lu, %ld. Running command anyways.\n", i, res);
}
if (type!=REG_SZ)
{
printf("Incorrect type of value #%ld (%ld)\n", i, type);
printf("Incorrect type of value #%lu (%lu)\n", i, type);
continue;
}
if ((res=runCmd(szCmdLine, NULL, bSynchronous, FALSE))==INVALID_RUNCMD_RETURN)
{
printf("Error running cmd #%ld (%ld)\n", i, GetLastError());
printf("Error running cmd #%lu (%ld)\n", i, GetLastError());
}
printf("Done processing cmd #%ld\n", i);
printf("Done processing cmd #%lu\n", i);
}
free(szValue);

View file

@ -73,7 +73,7 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
static void WINAPI ServiceCtrlHandler(DWORD code)
{
WINE_TRACE("%d\n", code);
WINE_TRACE("%u\n", code);
switch (code)
{
@ -83,7 +83,7 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
KillService();
return;
default:
fprintf(stderr, "Unhandled service control code: %d\n", code);
fprintf(stderr, "Unhandled service control code: %u\n", code);
break;
}

View file

@ -99,7 +99,7 @@ ScmCreateNewControlPipe(PSERVICE_IMAGE pServiceImage)
}
/* Create '\\.\pipe\net\NtControlPipeXXX' instance */
swprintf(szControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%u", ServiceCurrent);
swprintf(szControlPipeName, L"\\\\.\\pipe\\net\\NtControlPipe%lu", ServiceCurrent);
DPRINT("PipeName: %S\n", szControlPipeName);

View file

@ -115,7 +115,7 @@ LlbHwLoadOsLoaderFromRam(VOID)
/* Set parameters for the OS loader */
snprintf(CommandLine,
sizeof(CommandLine),
"rdbase=0x%x rdsize=0x%x rdoffset=%s",
"rdbase=0x%lx rdsize=0x%lx rdoffset=%s",
RootFs, Size, Offset);
LlbSetCommandLine(CommandLine);

View file

@ -1636,7 +1636,8 @@ HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,0x00000000
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}",,0x00000012
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ListviewShadow",0x00010001,0x1
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ListviewShadow",0x00010001,0x00000001
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","HideFileExt",0x00010001,0x00000000
; default shell
HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon",,0x00000012

View file

@ -1342,7 +1342,7 @@ HKLM,"SOFTWARE\Microsoft\Ole","EnableRemoteConnect",0x00000000,"N"
; SvcHost services
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost",,0x00000012
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost", "netsvcs",0x00010000,"DHCP"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost", "netsvcs",0x00010000,"DHCP","BITS"
; Win32 config
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows",,0x00000012

View file

@ -1304,6 +1304,16 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ImagePath",0x00020000,"system32\d
HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Start",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Type",0x00010001,0x00000001
; Background Intelligent Transfer Service (BITS)
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","DisplayName",0x00000000,"BITS"
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Description",0x00000000,"Background Intelligent Transfer Service (BITS)"
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ErrorControl",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ImagePath",0x00020000,"%SystemRoot%\system32\svchost.exe -k netsvcs"
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","ObjectName",0x00000000,"LocalSystem"
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Start",0x00010001,0x00000003
HKLM,"SYSTEM\CurrentControlSet\Services\BITS","Type",0x00010001,0x00000020
HKLM,"SYSTEM\CurrentControlSet\Services\BITS\Parameters","ServiceDll",0x00020000,"%SystemRoot%\system32\qmgr.dll"
; BlueScreen device driver
HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ErrorControl",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Group",0x00000000,"Video Init"
@ -1393,13 +1403,6 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ImagePath",0x00020000,"system32
HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Start",0x00010001,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Type",0x00010001,0x00000008
; Kernel-Mode Tests
;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ErrorControl",0x00010001,0x00000000
;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Group",0x00000000,"Base"
;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ImagePath",0x00020000,"system32\drivers\kmtest.sys"
;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Start",0x00010001,0x00000001
;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Type",0x00010001,0x00000001
; Keyboard class driver
HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ErrorControl",0x00010001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Group",0x00000000,"Keyboard Class"

View file

@ -61,5 +61,5 @@ Signature = "$ReactOS$"
"modules/optional/vmx_mode.dll" 1 optional
"modules/optional/vmx_svga.inf" 6 optional
"modules/optional/vmx_svga.sys" 2 optional
"modules/optional/wine_gecko-2.21-x86.msi" 4 optional
"modules/optional/wine_gecko-2.24-x86.msi" 4 optional
"boot/bootdata/bootcdregtest/AHKAppTests.cmd" 7 optional

View file

@ -170,16 +170,16 @@ FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
FrLdrHeapFreeEx(FrLdrDefaultHeap, MemoryPointer, Tag);
}
PVOID
FORCEINLINE
PVOID
FrLdrTempAlloc(
ULONG Size, ULONG Tag)
{
return FrLdrHeapAllocateEx(FrLdrTempHeap, Size, Tag);
}
VOID
FORCEINLINE
VOID
FrLdrTempFree(
PVOID Allocation, ULONG Tag)
{

View file

@ -36,6 +36,9 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_flags("-Wno-microsoft")
endif()
if(DBG)
add_compile_flags_language("-Wold-style-declaration -Wdeclaration-after-statement" "C")
endif()
add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX")
#bug

View file

@ -59,6 +59,6 @@ echo Preparing reactos...
cd ../reactos
rm -f CMakeCache.txt
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=1 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH -DREACTOS_BUILD_TOOLS_DIR:PATH="$REACTOS_BUILD_TOOLS_DIR" $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR"
cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH -DREACTOS_BUILD_TOOLS_DIR:PATH="$REACTOS_BUILD_TOOLS_DIR" $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR"
echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\).

View file

@ -26,11 +26,11 @@
#include <msi.h>
#define GECKO_VERSION "2.21"
#define GECKO_VERSION "2.24"
#ifdef __i386__
#define ARCH_STRING "x86"
#define GECKO_SHA "a514fc4d53783a586c7880a676c415695fe934a3"
#define GECKO_SHA "b4923c0565e6cbd20075a0d4119ce3b48424f962"
#else
#define ARCH_STRING ""
#define GECKO_SHA "???"
@ -60,7 +60,7 @@ static const addon_info_t *addon;
static HWND install_dialog = NULL;
static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.21-x86.msi";
static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.24-x86.msi";
/* SHA definitions are copied from advapi32. They aren't available in headers. */

View file

@ -82,8 +82,8 @@ LdrAlternateResourcesEnabled(VOID)
return FALSE;
}
ULONG_PTR
FORCEINLINE
ULONG_PTR
LdrpMakeCookie(VOID)
{
/* Generate a cookie */

View file

@ -2054,8 +2054,8 @@ lookinhash:
if (ShowSnaps)
{
DPRINT1("LDR: LdrpCheckForLoadedDll - Unable To Locate %ws: 0x%08x\n",
DllName->Buffer, Length);
DPRINT1("LDR: LdrpCheckForLoadedDll - Unable To Locate %wZ: 0x%08x\n",
&DllName, Length);
}
/* Return failure */
@ -2333,7 +2333,8 @@ LdrpGetProcedureAddress(IN PVOID BaseAddress,
if (!ExportDir)
{
DPRINT1("Image %wZ has no exports, but were trying to get procedure %s. BaseAddress asked %p, got entry BA %p\n", &LdrEntry->BaseDllName, Name ? Name->Buffer : NULL, BaseAddress, LdrEntry->DllBase);
DPRINT1("Image %wZ has no exports, but were trying to get procedure %Z. BaseAddress asked 0x%p, got entry BA 0x%p\n",
&LdrEntry->BaseDllName, &Name, BaseAddress, LdrEntry->DllBase);
Status = STATUS_PROCEDURE_NOT_FOUND;
_SEH2_YIELD(goto Quickie;)
}

View file

@ -11,13 +11,18 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl.dll atl.spec ADD_IMPORTLIB)
list(APPEND SOURCE
atl_main.c
atl.c
atl30.c
atl_ax.c
registrar.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/atl_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/atl.def)
add_library(atl SHARED ${SOURCE} rsrc.rc)
set_module_type(atl win32dll)
target_link_libraries(atl uuid wine)
add_importlibs(atl atl100 atl80 oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_importlibs(atl oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_dependencies(atl atl_atliface_header)
add_pch(atl precomp.h SOURCE)
add_cd_file(TARGET atl DESTINATION reactos/system32 FOR all)

View file

@ -17,11 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <precomp.h>
#include <wingdi.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl100);
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
HINSTANCE atl_instance;
typedef unsigned char cpp_bool;
@ -296,18 +298,22 @@ HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULE *pM, _ATL_TERMFUNC *pFunc, DWORD
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("(%p %p %ld)\n", pM, pFunc, dw);
TRACE("version %04x (%p %p %ld)\n", _ATL_VER, pM, pFunc, dw);
if (_ATL_VER > _ATL_VER_30 || pM->cbSize > ATLVer1Size) {
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
pM->m_pTermFuncs = termfunc_elem;
}
return S_OK;
}
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlCallTermFunc [atl100.@]
*/
@ -327,6 +333,8 @@ void WINAPI AtlCallTermFunc(_ATL_MODULE *pM)
pM->m_pTermFuncs = NULL;
}
#endif
/***********************************************************************
* AtlLoadTypeLib [atl100.56]
*/
@ -383,12 +391,39 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE inst, LPCOLESTR lpszIndex,
return S_OK;
}
#if _ATL_VER <= _ATL_VER_80
/***********************************************************************
* AtlRegisterTypeLib [atl80.19]
*/
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
{
ITypeLib *typelib;
BSTR path;
HRESULT hres;
TRACE("(%p %s)\n", inst, debugstr_w(index));
hres = AtlLoadTypeLib(inst, index, &path, &typelib);
if(FAILED(hres))
return hres;
hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
ITypeLib_Release(typelib);
SysFreeString(path);
return hres;
}
#endif
#if _ATL_VER > _ATL_VER_30
/***********************************************************************
* AtlWinModuleInit [atl100.65]
*/
HRESULT WINAPI AtlWinModuleInit(_ATL_WIN_MODULE *winmod)
{
TRACE("(%p\n", winmod);
TRACE("(%p)\n", winmod);
if(winmod->cbSize != sizeof(*winmod))
return E_INVALIDARG;
@ -499,7 +534,28 @@ HRESULT WINAPI AtlComModuleRegisterClassObjects(_ATL_COM_MODULE *module, DWORD c
}
return S_OK;
}
/***********************************************************************
* AtlComModuleRevokeClassObjects [atl100.20]
*/
HRESULT WINAPI AtlComModuleRevokeClassObjects(_ATL_COM_MODULE *module)
{
_ATL_OBJMAP_ENTRY **iter;
HRESULT hres;
TRACE("(%p)\n", module);
if(!module)
return E_INVALIDARG;
for(iter = module->m_ppAutoObjMapFirst; iter < module->m_ppAutoObjMapLast; iter++) {
hres = CoRevokeClassObject((*iter)->dwRegister);
if(FAILED(hres))
return hres;
}
return S_OK;
}
/***********************************************************************
@ -554,6 +610,8 @@ HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeL
return S_OK;
}
#endif
/***********************************************************************
* AtlRegisterClassCategoriesHelper [atl100.49]
*/
@ -757,6 +815,8 @@ HRESULT WINAPI AtlGetObjectSourceInterface(IUnknown *unk, GUID *libid, IID *iid,
return hres;
}
#if _ATL_VER >= _ATL_VER90
/***********************************************************************
* AtlSetPerUserRegistration [atl100.67]
*/
@ -776,11 +836,14 @@ HRESULT WINAPI AtlGetPerUserRegistration(cpp_bool *pbEnabled)
return S_OK;
}
#endif
/***********************************************************************
* AtlGetVersion [atl100.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
TRACE("version %04x (%p)\n", _ATL_VER, pReserved);
return _ATL_VER;
}
@ -790,6 +853,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
atl_instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
case DLL_PROCESS_DETACH:

View file

@ -2,11 +2,11 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
10 stdcall AtlAdvise(ptr ptr ptr ptr) atl100.AtlAdvise
11 stdcall AtlUnadvise(ptr ptr long) atl100.AtlUnadvise
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
10 stdcall AtlAdvise(ptr ptr ptr ptr)
11 stdcall AtlUnadvise(ptr ptr long)
12 stdcall AtlFreeMarshalStream(ptr)
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlModuleGetClassObject(ptr ptr ptr ptr)
16 stdcall AtlModuleInit(ptr long long)
17 stdcall AtlModuleRegisterClassObjects(ptr long long)
@ -16,36 +16,36 @@
21 stdcall AtlModuleTerm(ptr)
22 stdcall AtlModuleUnregisterServer(ptr ptr)
23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
24 stdcall AtlWaitWithMessageLoop(long)
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
30 stdcall AtlComPtrAssign(ptr ptr)
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
34 stdcall AtlGetVersion(ptr)
35 stdcall AtlAxDialogBoxW(long wstr long ptr long) atl100.AtlAxDialogBoxW
36 stdcall AtlAxDialogBoxA(long str long ptr long) atl100.AtlAxDialogBoxA
37 stdcall AtlAxCreateDialogW(long wstr long ptr long) atl100.AtlAxCreateDialogW
38 stdcall AtlAxCreateDialogA(long str long ptr long) atl100.AtlAxCreateDialogA
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr) atl100.AtlAxCreateControl
40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr) atl100.AtlAxCreateControlEx
41 stdcall AtlAxAttachControl(ptr ptr ptr) atl100.AtlAxAttachControl
35 stdcall AtlAxDialogBoxW(long wstr long ptr long)
36 stdcall AtlAxDialogBoxA(long str long ptr long)
37 stdcall AtlAxCreateDialogW(long wstr long ptr long)
38 stdcall AtlAxCreateDialogA(long str long ptr long)
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr)
40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr)
41 stdcall AtlAxAttachControl(ptr ptr ptr)
42 stdcall AtlAxWinInit()
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long) atl100.AtlRegisterClassCategoriesHelper
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr) atl100.AtlIPersistStreamInit_Load
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr) atl100.AtlIPersistPropertyBag_Load
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long)
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
53 stub AtlIPersistPropertyBag_Save
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.AtlGetObjectSourceInterface
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
55 stub AtlModuleUnRegisterTypeLib
56 stdcall AtlModuleLoadTypeLib(ptr wstr ptr ptr)
57 stdcall AtlModuleUnregisterServerEx(ptr long ptr)

View file

@ -19,40 +19,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <precomp.h>
#include <stdio.h>
#include <rpcproxy.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <ole2.h>
#include <oleauto.h>
//#include "objidl.h"
#include <atlbase.h>
#include <atlwin.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
static HINSTANCE hInst;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
if (fdwReason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(hinstDLL);
hInst = hinstDLL;
}
return TRUE;
}
extern HINSTANCE atl_instance;
#define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer)
@ -150,25 +122,6 @@ HRESULT WINAPI AtlModuleTerm(_ATL_MODULE *pM)
return S_OK;
}
HRESULT WINAPI AtlModuleAddTermFunc(_ATL_MODULEW *pM, _ATL_TERMFUNC *pFunc, DWORD_PTR dw)
{
_ATL_TERMFUNC_ELEM *termfunc_elem;
TRACE("(%p %p %ld)\n", pM, pFunc, dw);
if (pM->cbSize > ATLVer1Size)
{
termfunc_elem = HeapAlloc(GetProcessHeap(), 0, sizeof(_ATL_TERMFUNC_ELEM));
termfunc_elem->pFunc = pFunc;
termfunc_elem->dw = dw;
termfunc_elem->pNext = pM->m_pTermFuncs;
pM->m_pTermFuncs = termfunc_elem;
}
return S_OK;
}
HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW *pM, DWORD dwClsContext,
DWORD dwFlags)
{
@ -602,6 +555,7 @@ static HRESULT do_register_server(BOOL do_register)
return do_register_dll_server(NULL, atl_dllW, MAKEINTRESOURCEW(101), do_register, reg_map);
}
/**************************************************************
* DllGetClassObject (ATL.2)
*/
@ -640,59 +594,3 @@ HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
/***********************************************************************
* AtlGetVersion [ATL.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
return _ATL_VER;
}
/**********************************************************************
* AtlAxWin class window procedure
*/
static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
if ( wMsg == WM_CREATE )
{
DWORD len = GetWindowTextLengthW( hWnd ) + 1;
WCHAR *ptr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
if (!ptr)
return 1;
GetWindowTextW( hWnd, ptr, len );
AtlAxCreateControlEx( ptr, hWnd, NULL, NULL, NULL, NULL, NULL );
HeapFree( GetProcessHeap(), 0, ptr );
return 0;
}
return DefWindowProcW( hWnd, wMsg, wParam, lParam );
}
BOOL WINAPI AtlAxWinInit(void)
{
WNDCLASSEXW wcex;
const WCHAR AtlAxWin[] = {'A','t','l','A','x','W','i','n',0};
FIXME("semi-stub\n");
if ( FAILED( OleInitialize(NULL) ) )
return FALSE;
wcex.cbSize = sizeof(wcex);
wcex.style = CS_GLOBALCLASS;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = GetModuleHandleW( NULL );
wcex.hIcon = NULL;
wcex.hCursor = NULL;
wcex.hbrBackground = NULL;
wcex.lpszMenuName = NULL;
wcex.hIconSm = 0;
wcex.lpfnWndProc = AtlAxWin_wndproc;
wcex.lpszClassName = AtlAxWin;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
return TRUE;
}

View file

@ -18,13 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
#include <precomp.h>
#include <ole2.h>
#include <exdisp.h>
#include <atlwin.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#include <wine/atlwin.h>
typedef struct IOCS {
IOleClientSite IOleClientSite_iface;
@ -72,16 +70,30 @@ static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L
BOOL WINAPI AtlAxWinInit(void)
{
WNDCLASSEXW wcex;
const WCHAR AtlAxWin100[] = {'A','t','l','A','x','W','i','n','1','0','0',0};
const WCHAR AtlAxWinLic100[] = {'A','t','l','A','x','W','i','n','L','i','c','1','0','0',0};
FIXME("semi-stub\n");
#if _ATL_VER <= _ATL_VER_30
#define ATL_NAME_SUFFIX 0
#elif _ATL_VER == _ATL_VER_80
#define ATL_NAME_SUFFIX '8','0',0
#elif _ATL_VER == _ATL_VER_90
#define ATL_NAME_SUFFIX '9','0',0
#elif _ATL_VER == _ATL_VER_100
#define ATL_NAME_SUFFIX '1','0','0',0
#elif _ATL_VER == _ATL_VER_110
#define ATL_NAME_SUFFIX '1','1','0',0
#else
#error Unsupported version
#endif
const WCHAR AtlAxWinW[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX};
FIXME("version %04x semi-stub\n", _ATL_VER);
if ( FAILED( OleInitialize(NULL) ) )
return FALSE;
wcex.cbSize = sizeof(wcex);
wcex.style = CS_GLOBALCLASS | CS_DBLCLKS;
wcex.style = CS_GLOBALCLASS | (_ATL_VER > _ATL_VER_30 ? CS_DBLCLKS : 0);
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = GetModuleHandleW( NULL );
@ -92,13 +104,17 @@ BOOL WINAPI AtlAxWinInit(void)
wcex.hIconSm = 0;
wcex.lpfnWndProc = AtlAxWin_wndproc;
wcex.lpszClassName = AtlAxWin100;
wcex.lpszClassName = AtlAxWinW;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
wcex.lpszClassName = AtlAxWinLic100;
if(_ATL_VER > _ATL_VER_30) {
const WCHAR AtlAxWinLicW[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX};
wcex.lpszClassName = AtlAxWinLicW;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
}
return TRUE;
}

View file

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep register
[
helpstring("Registrar Class"),
progid("ATL.Registrar"),

25
dll/win32/atl/precomp.h Normal file
View file

@ -0,0 +1,25 @@
#ifndef _ATL_PCH_
#define _ATL_PCH_
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <wine/atlbase.h>
#include <wine/atlwin.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL_PCH_ */

View file

@ -16,9 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "precomp.h"
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#include <precomp.h>
/**************************************************************
* ATLRegistrar implementation
@ -490,15 +488,13 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
DWORD filelen, len;
LPWSTR regstrw;
LPSTR regstra;
LRESULT lres;
HRESULT hres;
file = CreateFileW(fileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
file = CreateFileW(fileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
if(file != INVALID_HANDLE_VALUE) {
filelen = GetFileSize(file, NULL);
regstra = HeapAlloc(GetProcessHeap(), 0, filelen);
lres = ReadFile(file, regstra, filelen, NULL, NULL);
if(lres == ERROR_SUCCESS) {
if(ReadFile(file, regstra, filelen, NULL, NULL)) {
len = MultiByteToWideChar(CP_ACP, 0, regstra, filelen, NULL, 0)+1;
regstrw = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, regstra, filelen, regstrw, len);
@ -508,13 +504,13 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
HeapFree(GetProcessHeap(), 0, regstrw);
}else {
WARN("Failed to read faile\n");
hres = HRESULT_FROM_WIN32(lres);
WARN("Failed to read file %s\n", debugstr_w(fileName));
hres = HRESULT_FROM_WIN32(GetLastError());
}
HeapFree(GetProcessHeap(), 0, regstra);
CloseHandle(file);
}else {
WARN("Could not open file\n");
WARN("Could not open file %s\n", debugstr_w(fileName));
hres = HRESULT_FROM_WIN32(GetLastError());
}

View file

@ -11,9 +11,9 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(atl100.dll atl100.spec ADD_IMPORTLIB)
list(APPEND SOURCE
atl.c
atl_ax.c
registrar.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl_ax.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/registrar.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/atl100_stubs.c)

View file

@ -5,7 +5,7 @@
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
17 stdcall AtlComModuleRegisterClassObjects(ptr long long)
20 stub AtlComModuleRevokeClassObjects
20 stdcall AtlComModuleRevokeClassObjects(ptr)
22 stdcall AtlComModuleUnregisterServer(ptr long ptr)
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long)

View file

@ -19,4 +19,6 @@
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL100_PCH_ */

View file

@ -3,15 +3,23 @@ add_definitions(
-D__WINESRC__
-D_ATL_VER=_ATL_VER_80)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
spec2def(atl80.dll atl80.spec ADD_IMPORTLIB)
list(APPEND SOURCE
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl.c
atl80.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/atl_ax.c
${REACTOS_SOURCE_DIR}/dll/win32/atl/registrar.c
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/atl80_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/atl80.def)
add_library(atl80 SHARED ${SOURCE})
set_module_type(atl80 win32dll)
target_link_libraries(atl80 wine)
add_importlibs(atl80 atl100 oleaut32 user32 ole32 msvcrt kernel32 ntdll)
target_link_libraries(atl80 uuid wine)
add_importlibs(atl80 oleaut32 user32 ole32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_pch(atl80 precomp.h SOURCE)
add_cd_file(TARGET atl80 DESTINATION reactos/system32 FOR all)

View file

@ -16,21 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <precomp.h>
#include <stdio.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winerror.h>
#include <winuser.h>
#include <wine/atlbase.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
/***********************************************************************
* AtlRegisterTypeLib [atl80.18]
@ -68,85 +58,3 @@ HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib
return S_OK;
}
/***********************************************************************
* AtlRegisterTypeLib [atl80.19]
*/
HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE inst, const WCHAR *index)
{
ITypeLib *typelib;
BSTR path;
HRESULT hres;
TRACE("(%p %s)\n", inst, debugstr_w(index));
hres = AtlLoadTypeLib(inst, index, &path, &typelib);
if(FAILED(hres))
return hres;
hres = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */
ITypeLib_Release(typelib);
SysFreeString(path);
return hres;
}
/***********************************************************************
* AtlGetVersion [atl80.@]
*/
DWORD WINAPI AtlGetVersion(void *pReserved)
{
return _ATL_VER;
}
/**********************************************************************
* AtlAxWin class window procedure
*/
static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
if ( wMsg == WM_CREATE )
{
DWORD len = GetWindowTextLengthW( hWnd ) + 1;
WCHAR *ptr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
if (!ptr)
return 1;
GetWindowTextW( hWnd, ptr, len );
AtlAxCreateControlEx( ptr, hWnd, NULL, NULL, NULL, NULL, NULL );
HeapFree( GetProcessHeap(), 0, ptr );
return 0;
}
return DefWindowProcW( hWnd, wMsg, wParam, lParam );
}
BOOL WINAPI AtlAxWinInit(void)
{
WNDCLASSEXW wcex;
const WCHAR AtlAxWin80[] = {'A','t','l','A','x','W','i','n','8','0',0};
const WCHAR AtlAxWinLic80[] = {'A','t','l','A','x','W','i','n','L','i','c','8','0',0};
FIXME("semi-stub\n");
if ( FAILED( OleInitialize(NULL) ) )
return FALSE;
wcex.cbSize = sizeof(wcex);
wcex.style = CS_GLOBALCLASS | CS_DBLCLKS;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = GetModuleHandleW( NULL );
wcex.hIcon = NULL;
wcex.hCursor = NULL;
wcex.hbrBackground = NULL;
wcex.lpszMenuName = NULL;
wcex.hIconSm = 0;
wcex.lpfnWndProc = AtlAxWin_wndproc;
wcex.lpszClassName = AtlAxWin80;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
wcex.lpszClassName = AtlAxWinLic80;
if ( !RegisterClassExW( &wcex ) )
return FALSE;
return TRUE;
}

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="Microsoft.VC80.ATL" version="8.0.50727.4053" processorArchitecture="" publicKeyToken="1fc8b3b9a1e18e3b"/>
<file name="atl80.dll"/>
</assembly>

22
dll/win32/atl80/atl80.rc Normal file
View file

@ -0,0 +1,22 @@
/*
* Resource file for atl80
*
* Copyright 2011 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: atl80.manifest */
WINE_MANIFEST 24 atl80.manifest

View file

@ -1,53 +1,53 @@
10 stdcall AtlAdvise(ptr ptr ptr ptr) atl100.AtlAdvise
11 stdcall AtlUnadvise(ptr ptr long) atl100.AtlUnadvise
12 stdcall AtlFreeMarshalStream(ptr) atl100.AtlFreeMarshalStream
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr) atl100.AtlMarshalPtrInProc
14 stdcall AtlUnmarshalPtr(ptr ptr ptr) atl100.AtlUnmarshalPtr
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) atl100.AtlComModuleGetClassObject
17 stdcall AtlComModuleRegisterClassObjects(ptr long long) atl100.AtlComModuleRegisterClassObjects
10 stdcall AtlAdvise(ptr ptr ptr ptr)
11 stdcall AtlUnadvise(ptr ptr long)
12 stdcall AtlFreeMarshalStream(ptr)
13 stdcall AtlMarshalPtrInProc(ptr ptr ptr)
14 stdcall AtlUnmarshalPtr(ptr ptr ptr)
15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr)
17 stdcall AtlComModuleRegisterClassObjects(ptr long long)
18 stdcall AtlComModuleRegisterServer(ptr long ptr)
19 stdcall AtlRegisterTypeLib(ptr wstr)
20 stub AtlComModuleRevokeClassObjects
22 stdcall AtlComModuleUnregisterServer(ptr long ptr) atl100.AtlComModuleUnregisterServer
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) atl100.AtlUpdateRegistryFromResourceD
24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop
20 stdcall AtlComModuleRevokeClassObjects(ptr)
22 stdcall AtlComModuleUnregisterServer(ptr long ptr)
23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr)
24 stdcall AtlWaitWithMessageLoop(long)
25 stub AtlSetErrorInfo
26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC
27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel
28 stdcall AtlPixelToHiMetric(ptr ptr) atl100.AtlPixelToHiMetric
26 stdcall AtlCreateTargetDC(long ptr)
27 stdcall AtlHiMetricToPixel(ptr ptr)
28 stdcall AtlPixelToHiMetric(ptr ptr)
29 stub AtlDevModeW2A
30 stdcall AtlComPtrAssign(ptr ptr) atl100.AtlComPtrAssign
31 stdcall AtlComQIPtrAssign(ptr ptr ptr) atl100.AtlComQIPtrAssign
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr) atl100.AtlInternalQueryInterface
30 stdcall AtlComPtrAssign(ptr ptr)
31 stdcall AtlComQIPtrAssign(ptr ptr ptr)
32 stdcall AtlInternalQueryInterface(ptr ptr ptr ptr)
34 stdcall AtlGetVersion(ptr)
35 stdcall AtlAxDialogBoxW(long wstr long ptr long) atl100.AtlAxDialogBoxW
36 stdcall AtlAxDialogBoxA(long str long ptr long) atl100.AtlAxDialogBoxA
37 stdcall AtlAxCreateDialogW(long wstr long ptr long) atl100.AtlAxCreateDialogW
38 stdcall AtlAxCreateDialogA(long str long ptr long) atl100.AtlAxCreateDialogA
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr) atl100.AtlAxCreateControl
40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr) atl100.AtlAxCreateControlEx
41 stdcall AtlAxAttachControl(ptr ptr ptr) atl100.AtlAxAttachControl
35 stdcall AtlAxDialogBoxW(long wstr long ptr long)
36 stdcall AtlAxDialogBoxA(long str long ptr long)
37 stdcall AtlAxCreateDialogW(long wstr long ptr long)
38 stdcall AtlAxCreateDialogA(long str long ptr long)
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr)
40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr)
41 stdcall AtlAxAttachControl(ptr ptr ptr)
42 stdcall AtlAxWinInit()
43 stdcall AtlWinModuleAddCreateWndData(ptr ptr ptr) atl100.AtlWinModuleAddCreateWndData
44 stdcall AtlWinModuleExtractCreateWndData(ptr) atl100.AtlWinModuleExtractCreateWndData
43 stdcall AtlWinModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlWinModuleExtractCreateWndData(ptr)
45 stub AtlWinModuleRegisterWndClassInfoW
46 stub AtlWinModuleRegisterWndClassInfoA
47 stdcall AtlAxGetControl(long ptr) atl100.AtlAxGetControl
48 stdcall AtlAxGetHost(long ptr) atl100.AtlAxGetHost
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long) atl100.AtlRegisterClassCategoriesHelper
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr) atl100.AtlIPersistStreamInit_Load
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr) atl100.AtlIPersistStreamInit_Save
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr) atl100.AtlIPersistPropertyBag_Load
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stdcall AtlRegisterClassCategoriesHelper(ptr ptr long)
50 stdcall AtlIPersistStreamInit_Load(ptr ptr ptr ptr)
51 stdcall AtlIPersistStreamInit_Save(ptr long ptr ptr ptr)
52 stdcall AtlIPersistPropertyBag_Load(ptr ptr ptr ptr ptr)
53 stub AtlIPersistPropertyBag_Save
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr) atl100.AtlGetObjectSourceInterface
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
55 stub AtlUnRegisterTypeLib
56 stdcall AtlLoadTypeLib(long wstr ptr ptr) atl100.AtlLoadTypeLib
58 stdcall AtlModuleAddTermFunc(ptr ptr long) atl100.AtlModuleAddTermFunc
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
59 stub AtlAxCreateControlLic
60 stub AtlAxCreateControlLicEx
61 stdcall AtlCreateRegistrar(ptr) atl100.AtlCreateRegistrar
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
64 stdcall AtlCallTermFunc(ptr) atl100.AtlCallTermFunc
65 stdcall AtlWinModuleInit(ptr) atl100.AtlWinModuleInit
64 stdcall AtlCallTermFunc(ptr)
65 stdcall AtlWinModuleInit(ptr)
66 stub AtlWinModuleTerm

24
dll/win32/atl80/precomp.h Normal file
View file

@ -0,0 +1,24 @@
#ifndef _ATL80_PCH_
#define _ATL80_PCH_
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <oleauto.h>
#include <wine/atlbase.h>
#include <wine/debug.h>
#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(atl);
#endif /* _ATL80_PCH_ */

View file

@ -221,7 +221,7 @@ GetDeviceCapabilities(
caps->vDriverVersion = 0x0100;
memset(caps->szPname, 0, sizeof(caps->szPname));
memcpy(caps->szPname, L"PC speaker\0", strlen("PC speaker\0") * 2);
wcscpy(caps->szPname, L"PC speaker");
caps->wTechnology = MOD_SQSYNTH;

View file

@ -23,7 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
static unsigned arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
static BOOL arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{
addr->Mode = AddrModeFlat;

View file

@ -2,7 +2,7 @@
* File cpu_arm64.c
*
* Copyright (C) 2009 Eric Pouech
* Copyright (C) 2010-2013 Andrأ© Hentschel
* Copyright (C) 2010-2013 André Hentschel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -23,7 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
static unsigned arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
static BOOL arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{
addr->Mode = AddrModeFlat;

View file

@ -45,7 +45,7 @@ static ADDRESS_MODE get_selector_type(HANDLE hThread, const CONTEXT* ctx, WORD s
return -1;
}
static unsigned i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr,
static BOOL i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr,
unsigned seg, unsigned long offset)
{
addr->Mode = AddrModeFlat;
@ -71,7 +71,7 @@ static unsigned i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* a
#endif
#ifndef DBGHELP_STATIC_LIB
static unsigned i386_get_addr(HANDLE hThread, const CONTEXT* ctx,
static BOOL i386_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{
#ifdef __i386__

View file

@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
static unsigned ppc_get_addr(HANDLE hThread, const CONTEXT* ctx,
static BOOL ppc_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{
switch (ca)

View file

@ -83,7 +83,7 @@ typedef struct _UNWIND_INFO
#define GetExceptionDataPtr(info) \
((PVOID)((PULONG)GetLanguageSpecificData(info) + 1)
static unsigned x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx,
static BOOL x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
{
addr->Mode = AddrModeFlat;

View file

@ -60,25 +60,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
*/
unsigned dbghelp_options = SYMOPT_UNDNAME;
HANDLE hMsvcrt = NULL;
/***********************************************************************
* DllMain (DEBUGHLP.@)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH: break;
case DLL_PROCESS_DETACH:
if (hMsvcrt) FreeLibrary(hMsvcrt);
break;
case DLL_THREAD_ATTACH: break;
case DLL_THREAD_DETACH: break;
default: break;
}
return TRUE;
}
static struct process* process_first /* = NULL */;

View file

@ -569,7 +569,7 @@ struct cpu
DWORD frame_regno;
/* address manipulation */
unsigned (*get_addr)(HANDLE hThread, const CONTEXT* ctx,
BOOL (*get_addr)(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr, ADDRESS64* addr);
/* stack manipulation */
@ -594,7 +594,6 @@ extern struct cpu* dbghelp_current_cpu DECLSPEC_HIDDEN;
/* dbghelp.c */
extern struct process* process_find_by_handle(HANDLE hProcess) DECLSPEC_HIDDEN;
extern HANDLE hMsvcrt DECLSPEC_HIDDEN;
extern BOOL validate_addr64(DWORD64 addr) DECLSPEC_HIDDEN;
extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* data) DECLSPEC_HIDDEN;
extern void* fetch_buffer(struct process* pcs, unsigned size) DECLSPEC_HIDDEN;

View file

@ -513,7 +513,7 @@ static void dwarf2_fill_attr(const dwarf2_parse_context_t* ctx,
break;
case DW_FORM_ref8:
FIXME("Unhandled 64 bit support\n");
FIXME("Unhandled 64-bit support\n");
break;
case DW_FORM_sdata:
@ -1408,6 +1408,9 @@ static struct symt* dwarf2_parse_udt_type(dwarf2_parse_context_t* ctx,
switch (child->abbrev->tag)
{
case DW_TAG_array_type:
dwarf2_parse_array_type(ctx, di);
break;
case DW_TAG_member:
/* FIXME: should I follow the sibling stuff ?? */
dwarf2_parse_udt_member(ctx, child, (struct symt_udt*)di->symt);
@ -1680,6 +1683,9 @@ static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
struct symt_block* parent_block,
dwarf2_debug_info_t* di);
static struct symt* dwarf2_parse_subroutine_type(dwarf2_parse_context_t* ctx,
dwarf2_debug_info_t* di);
static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm,
struct symt_block* parent_block,
dwarf2_debug_info_t* di)
@ -1769,6 +1775,12 @@ static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm,
case DW_TAG_variable:
dwarf2_parse_variable(subpgm, block, child);
break;
case DW_TAG_pointer_type:
dwarf2_parse_pointer_type(subpgm->ctx, di);
break;
case DW_TAG_subroutine_type:
dwarf2_parse_subroutine_type(subpgm->ctx, di);
break;
case DW_TAG_lexical_block:
dwarf2_parse_subprogram_block(subpgm, block, child);
break;
@ -1900,6 +1912,9 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_parse_context_t* ctx,
case DW_TAG_inlined_subroutine:
dwarf2_parse_inlined_subroutine(&subpgm, NULL, child);
break;
case DW_TAG_pointer_type:
dwarf2_parse_pointer_type(subpgm.ctx, di);
break;
case DW_TAG_subprogram:
/* FIXME: likely a declaration (to be checked)
* skip it for now

View file

@ -43,6 +43,32 @@
#define NT_GNU_BUILD_ID 3
#endif
#ifndef HAVE_STRUCT_R_DEBUG
struct r_debug
{
int r_version;
struct link_map *r_map;
ElfW(Addr) r_brk;
enum
{
RT_CONSISTENT,
RT_ADD,
RT_DELETE
} r_state;
ElfW(Addr) r_ldbase;
};
#endif /* HAVE_STRUCT_R_DEBUG */
#ifndef HAVE_STRUCT_LINK_MAP
struct link_map
{
ElfW(Addr) l_addr;
char *l_name;
ElfW(Dyn) *l_ld;
struct link_map *l_next, *l_prev;
};
#endif /* HAVE_STRUCT_LINK_MAP */
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
struct elf_info
@ -1427,7 +1453,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
{
BOOL ret = FALSE;
struct module* module;
static WCHAR S_libstdcPPW[] = {'l','i','b','s','t','d','c','+','+','\0'};
static const WCHAR S_libstdcPPW[] = {'l','i','b','s','t','d','c','+','+','\0'};
if (filename == NULL || *filename == '\0') return FALSE;
if ((module = module_is_already_loaded(pcs, filename)))
@ -1682,8 +1708,8 @@ struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned
/******************************************************************
* elf_synchronize_module_list
*
* this functions rescans the debuggee module's list and synchronizes it with
* the one from 'pcs', ie:
* this function rescans the debuggee module's list and synchronizes it with
* the one from 'pcs', i.e.:
* - if a module is in debuggee and not in pcs, it's loaded into pcs
* - if a module is in pcs and not in debuggee, it's unloaded from pcs
*/

View file

@ -420,17 +420,32 @@ static BOOL macho_map_file(const WCHAR* filenameW, struct macho_file_map* fmap)
RtlInitializeBitMap(&fmap->sect_is_code, fmap->sect_is_code_buff, MAX_SECT + 1);
len = WideCharToMultiByte(CP_UNIXCP, 0, filenameW, -1, NULL, 0, NULL, NULL);
if (!(filename = HeapAlloc(GetProcessHeap(), 0, len))) return FALSE;
if (!(filename = HeapAlloc(GetProcessHeap(), 0, len)))
{
WARN("failed to allocate filename buffer\n");
return FALSE;
}
WideCharToMultiByte(CP_UNIXCP, 0, filenameW, -1, filename, len, NULL, NULL);
/* check that the file exists */
if (stat(filename, &statbuf) == -1 || S_ISDIR(statbuf.st_mode)) goto done;
if (stat(filename, &statbuf) == -1 || S_ISDIR(statbuf.st_mode))
{
TRACE("stat() failed or %s is directory: %s\n", debugstr_a(filename), strerror(errno));
goto done;
}
/* Now open the file, so that we can mmap() it. */
if ((fmap->fd = open(filename, O_RDONLY)) == -1) goto done;
if ((fmap->fd = open(filename, O_RDONLY)) == -1)
{
TRACE("failed to open file %s: %d\n", debugstr_a(filename), errno);
goto done;
}
if (read(fmap->fd, &fat_header, sizeof(fat_header)) != sizeof(fat_header))
{
TRACE("failed to read fat header: %d\n", errno);
goto done;
}
TRACE("... got possible fat header\n");
/* Fat header is always in big-endian order. */
@ -935,10 +950,36 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
/* Find the dynamic loader's table of images loaded into the process.
*/
if (macho_info->flags & MACHO_INFO_DEBUG_HEADER)
{
PROCESS_BASIC_INFORMATION pbi;
NTSTATUS status;
ret = FALSE;
/* Get address of PEB */
status = NtQueryInformationProcess(pcs->handle, ProcessBasicInformation,
&pbi, sizeof(pbi), NULL);
if (status == STATUS_SUCCESS)
{
ULONG dyld_image_info;
/* Read dyld image info address from PEB */
if (ReadProcessMemory(pcs->handle, &pbi.PebBaseAddress->Reserved,
&dyld_image_info, sizeof(dyld_image_info), NULL))
{
TRACE("got dyld_image_info 0x%08x from PEB %p MacDyldImageInfo %p\n",
dyld_image_info, pbi.PebBaseAddress, &pbi.PebBaseAddress->Reserved);
macho_info->dbg_hdr_addr = dyld_image_info;
ret = TRUE;
}
}
if (!ret)
{
static void* dyld_all_image_infos_addr;
/* This symbol should be in the same place in all processes. */
/* Our next best guess is that dyld was loaded at its base address
and we can find the dyld image infos address by looking up its symbol. */
if (!dyld_all_image_infos_addr)
{
struct nlist nl[2];
@ -949,10 +990,13 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename,
}
if (dyld_all_image_infos_addr)
{
TRACE("got dyld_image_info %p from /usr/lib/dyld symbol table\n",
dyld_all_image_infos_addr);
macho_info->dbg_hdr_addr = (unsigned long)dyld_all_image_infos_addr;
else
ret = FALSE;
TRACE("dbg_hdr_addr = 0x%08lx\n", macho_info->dbg_hdr_addr);
ret = TRUE;
}
}
}
if (macho_info->flags & MACHO_INFO_MODULE)
@ -1011,7 +1055,7 @@ leave:
* macho_load_file_from_path
* Tries to load a Mach-O file from a set of paths (separated by ':')
*/
static BOOL macho_load_file_from_path(HANDLE hProcess,
static BOOL macho_load_file_from_path(struct process* pcs,
const WCHAR* filename,
unsigned long load_addr,
const char* path,
@ -1022,7 +1066,7 @@ static BOOL macho_load_file_from_path(HANDLE hProcess,
WCHAR* pathW = NULL;
unsigned len;
TRACE("(%p, %s, 0x%08lx, %s, %p)\n", hProcess, debugstr_w(filename), load_addr,
TRACE("(%p/%p, %s, 0x%08lx, %s, %p)\n", pcs, pcs->handle, debugstr_w(filename), load_addr,
debugstr_a(path), macho_info);
if (!path) return FALSE;
@ -1041,7 +1085,7 @@ static BOOL macho_load_file_from_path(HANDLE hProcess,
strcpyW(fn, s);
strcatW(fn, S_SlashW);
strcatW(fn, filename);
ret = macho_load_file(hProcess, fn, load_addr, macho_info);
ret = macho_load_file(pcs, fn, load_addr, macho_info);
HeapFree(GetProcessHeap(), 0, fn);
if (ret) break;
s = (t) ? (t+1) : NULL;
@ -1057,7 +1101,7 @@ static BOOL macho_load_file_from_path(HANDLE hProcess,
*
* Tries to load a Mach-O file from the dll path
*/
static BOOL macho_load_file_from_dll_path(HANDLE hProcess,
static BOOL macho_load_file_from_dll_path(struct process* pcs,
const WCHAR* filename,
unsigned long load_addr,
struct macho_info* macho_info)
@ -1066,7 +1110,7 @@ static BOOL macho_load_file_from_dll_path(HANDLE hProcess,
unsigned int index = 0;
const char *path;
TRACE("(%p, %s, 0x%08lx, %p)\n", hProcess, debugstr_w(filename), load_addr,
TRACE("(%p/%p, %s, 0x%08lx, %p)\n", pcs, pcs->handle, debugstr_w(filename), load_addr,
macho_info);
while (!ret && (path = wine_dll_enum_load_path( index++ )))
@ -1083,7 +1127,7 @@ static BOOL macho_load_file_from_dll_path(HANDLE hProcess,
MultiByteToWideChar(CP_UNIXCP, 0, path, -1, name, len);
strcatW( name, S_SlashW );
strcatW( name, filename );
ret = macho_load_file(hProcess, name, load_addr, macho_info);
ret = macho_load_file(pcs, name, load_addr, macho_info);
HeapFree( GetProcessHeap(), 0, name );
}
TRACE(" => %d\n", ret);
@ -1101,7 +1145,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
{
BOOL ret = FALSE;
struct module* module;
static WCHAR S_libstdcPPW[] = {'l','i','b','s','t','d','c','+','+','\0'};
static const WCHAR S_libstdcPPW[] = {'l','i','b','s','t','d','c','+','+','\0'};
const WCHAR* p;
TRACE("(%p/%p, %s, 0x%08lx, %p)\n", pcs, pcs->handle, debugstr_w(filename), load_addr,

View file

@ -23,6 +23,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
#define DLLPREFIX ""
const WCHAR S_ElfW[] = {'<','e','l','f','>','\0'};
const WCHAR S_WineLoaderW[] = {'<','w','i','n','e','-','l','o','a','d','e','r','>','\0'};
static const WCHAR S_DotSoW[] = {'.','s','o','\0'};
@ -47,7 +49,7 @@ static int match_ext(const WCHAR* ptr, size_t len)
for (e = ext; *e; e++)
{
l = strlenW(*e);
if (l >= len) return FALSE;
if (l >= len) return 0;
if (strncmpiW(&ptr[len - l], *e, l)) continue;
return l;
}
@ -96,7 +98,7 @@ void module_set_module(struct module* module, const WCHAR* name)
const WCHAR *get_wine_loader_name(void)
{
static const int is_win64 = sizeof(void *) > sizeof(int); /* FIXME: should depend on target process */
static const BOOL is_win64 = sizeof(void *) > sizeof(int); /* FIXME: should depend on target process */
static const WCHAR wineW[] = {'w','i','n','e',0};
static const WCHAR suffixW[] = {'6','4',0};
static const WCHAR *loader;
@ -420,6 +422,16 @@ static BOOL module_is_container_loaded(const struct process* pcs,
size_t len;
struct module* module;
PCWSTR filename, modname;
static WCHAR* dll_prefix;
static int dll_prefix_len;
if (!dll_prefix)
{
dll_prefix_len = MultiByteToWideChar( CP_UNIXCP, 0, DLLPREFIX, -1, NULL, 0 );
dll_prefix = HeapAlloc( GetProcessHeap(), 0, dll_prefix_len * sizeof(WCHAR) );
MultiByteToWideChar( CP_UNIXCP, 0, DLLPREFIX, -1, dll_prefix, dll_prefix_len );
dll_prefix_len--;
}
if (!base) return FALSE;
filename = get_filename(ImageName, NULL);
@ -432,6 +444,7 @@ static BOOL module_is_container_loaded(const struct process* pcs,
base < module->module.BaseOfImage + module->module.ImageSize)
{
modname = get_filename(module->module.LoadedImageName, NULL);
if (dll_prefix_len && !strncmpW( modname, dll_prefix, dll_prefix_len )) modname += dll_prefix_len;
if (!strncmpiW(modname, filename, len) &&
!memcmp(modname + len, S_DotSoW, 3 * sizeof(WCHAR)))
{

View file

@ -631,7 +631,7 @@ static struct symt* codeview_add_type_array(struct codeview_type_parse* ctp,
return &symt_new_array(ctp->module, 0, -arr_len, elem, index)->symt;
}
static int codeview_add_type_enum_field_list(struct module* module,
static BOOL codeview_add_type_enum_field_list(struct module* module,
struct symt_enum* symt,
const union codeview_reftype* ref_type)
{
@ -1307,12 +1307,12 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp,
default:
FIXME("Unsupported type-id leaf %x\n", type->generic.id);
dump(type, 2 + type->generic.len);
return FALSE;
return NULL;
}
return codeview_add_type(curr_type, symt) ? symt : NULL;
}
static int codeview_parse_type_table(struct codeview_type_parse* ctp)
static BOOL codeview_parse_type_table(struct codeview_type_parse* ctp)
{
unsigned int curr_type = FIRST_DEFINABLE_TYPE;
const union codeview_type* type;
@ -1537,7 +1537,7 @@ static inline void codeview_add_variable(const struct msc_debug_info* msc_dbg,
}
}
static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root,
static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root,
int offset, int size, BOOL do_globals)
{
struct symt_function* curr_func = NULL;
@ -1984,7 +1984,7 @@ static int codeview_snarf(const struct msc_debug_info* msc_dbg, const BYTE* root
return TRUE;
}
static int codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BYTE* root,
static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BYTE* root,
int offset, int size)
{

View file

@ -282,7 +282,7 @@ void* sparse_array_add(struct sparse_array* sa, unsigned long key,
pk2i = sparse_array_lookup(sa, key, &idx);
if (pk2i && pk2i->key == key)
{
FIXME("re adding an existing key\n");
FIXME("re-adding an existing key\n");
return NULL;
}
to = vector_add(&sa->key2index, pool);
@ -353,13 +353,13 @@ void hash_table_destroy(struct hash_table* ht)
variance = (double)sq / ht->num_buckets - mean * mean;
FIXME("STATS: elts[num:%-4u size:%u mean:%f] buckets[min:%-4u variance:%+f max:%-4u]\n",
ht->num_elts, ht->num_buckets, mean, min, variance, max);
#if 1
for (i = 0; i < ht->num_buckets; i++)
{
for (len = 0, elt = ht->buckets[i]; elt; elt = elt->next) len++;
if (len == max)
{
FIXME("Longuest bucket:\n");
FIXME("Longest bucket:\n");
for (elt = ht->buckets[i]; elt; elt = elt->next)
FIXME("\t%s\n", elt->name);
break;
@ -367,7 +367,6 @@ void hash_table_destroy(struct hash_table* ht)
}
#endif
#endif
}
void hash_table_add(struct hash_table* ht, struct hash_table_elt* elt)

View file

@ -24,7 +24,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
WINE_DECLARE_DEBUG_CHANNEL(dbghelp_symt);
static WCHAR starW[] = {'*','\0'};
static const WCHAR starW[] = {'*','\0'};
static inline int cmp_addr(ULONG64 a1, ULONG64 a2)
{
@ -703,8 +703,8 @@ static void symt_fill_sym_info(struct module_pair* pair,
if (sym_info->MaxNameLen)
{
if (sym->tag != SymTagPublicSymbol || !(dbghelp_options & SYMOPT_UNDNAME) ||
(sym_info->NameLen = UnDecorateSymbolName(name, sym_info->Name,
sym_info->MaxNameLen, UNDNAME_NAME_ONLY) == 0))
((sym_info->NameLen = UnDecorateSymbolName(name, sym_info->Name,
sym_info->MaxNameLen, UNDNAME_NAME_ONLY)) == 0))
{
sym_info->NameLen = min(strlen(name), sym_info->MaxNameLen - 1);
memcpy(sym_info->Name, name, sym_info->NameLen);
@ -1236,6 +1236,7 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address,
if ((sym = symt_find_nearest(pair.effective, Address)) == NULL) return FALSE;
symt_fill_sym_info(&pair, NULL, &sym->symt, Symbol);
if (Displacement)
*Displacement = Address - Symbol->Address;
return TRUE;
}
@ -1766,6 +1767,7 @@ DWORD WINAPI UnDecorateSymbolName(PCSTR DecoratedName, PSTR UnDecoratedName,
DWORD UndecoratedLength, DWORD Flags)
{
/* undocumented from msvcrt */
static HANDLE hMsvcrt;
static char* (CDECL *p_undname)(char*, const char*, int, void* (CDECL*)(size_t), void (CDECL*)(void*), unsigned short);
static const WCHAR szMsvcrt[] = {'m','s','v','c','r','t','.','d','l','l',0};

View file

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep register
[
helpstring("HNetCfg.FwMgr"),
progid("HNetCfg.FwMgr"),

View file

@ -18,4 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep regtypelib
#include "netfw.idl"

View file

@ -74,6 +74,7 @@ typedef struct {
IHlinkFrame IHlinkFrame_iface;
ITargetFrame2 ITargetFrame2_iface;
ITargetFramePriv2 ITargetFramePriv2_iface;
IWebBrowserPriv2IE9 IWebBrowserPriv2IE9_iface;
IUnknown *outer;
DocHost *doc_host;

View file

@ -34,9 +34,13 @@ HKCR
{
shellex
{
MayChangeDefaultMenu {}
MayChangeDefaultMenu
}
}
'{8856f961-340a-11d0-a96b-00c04fd705a2}'
{
Control
}
}
'InternetShortcut'
{

View file

@ -16,6 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep regtypelib
#pragma makedep register
#include "exdisp.idl"
[

View file

@ -1437,6 +1437,45 @@ static const ITargetFramePriv2Vtbl TargetFramePriv2Vtbl = {
TargetFramePriv2_AggregatedNavigation2
};
static inline HlinkFrame *impl_from_IWebBrowserPriv2IE9(IWebBrowserPriv2IE9 *iface)
{
return CONTAINING_RECORD(iface, HlinkFrame, IWebBrowserPriv2IE9_iface);
}
static HRESULT WINAPI WebBrowserPriv2IE9_QueryInterface(IWebBrowserPriv2IE9 *iface, REFIID riid, void **ppv)
{
HlinkFrame *This = impl_from_IWebBrowserPriv2IE9(iface);
return IUnknown_QueryInterface(This->outer, riid, ppv);
}
static ULONG WINAPI WebBrowserPriv2IE9_AddRef(IWebBrowserPriv2IE9 *iface)
{
HlinkFrame *This = impl_from_IWebBrowserPriv2IE9(iface);
return IUnknown_AddRef(This->outer);
}
static ULONG WINAPI WebBrowserPriv2IE9_Release(IWebBrowserPriv2IE9 *iface)
{
HlinkFrame *This = impl_from_IWebBrowserPriv2IE9(iface);
return IUnknown_Release(This->outer);
}
static HRESULT WINAPI WebBrowserPriv2IE9_NavigateWithBindCtx2(IWebBrowserPriv2IE9 *iface, IUri *uri, VARIANT *flags,
VARIANT *target_frame, VARIANT *post_data, VARIANT *headers, IBindCtx *bind_ctx, LPOLESTR url_fragment, DWORD unused)
{
HlinkFrame *This = impl_from_IWebBrowserPriv2IE9(iface);
FIXME("(%p)->(%p %s %s %s %s %p %s)\n", This, uri, debugstr_variant(flags), debugstr_variant(target_frame),
debugstr_variant(post_data), debugstr_variant(headers), bind_ctx, debugstr_w(url_fragment));
return E_NOTIMPL;
}
static const IWebBrowserPriv2IE9Vtbl WebBrowserPriv2IE9Vtbl = {
WebBrowserPriv2IE9_QueryInterface,
WebBrowserPriv2IE9_AddRef,
WebBrowserPriv2IE9_Release,
WebBrowserPriv2IE9_NavigateWithBindCtx2
};
BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
{
if(IsEqualGUID(&IID_IHlinkFrame, riid)) {
@ -1451,6 +1490,9 @@ BOOL HlinkFrame_QI(HlinkFrame *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_ITargetFramePriv2, riid)) {
TRACE("(%p)->(IID_ITargetFramePriv2 %p)\n", This, ppv);
*ppv = &This->ITargetFramePriv2_iface;
}else if(IsEqualGUID(&IID_IWebBrowserPriv2IE9, riid)) {
TRACE("(%p)->(IID_IWebBrowserPriv2IE9 %p)\n", This, ppv);
*ppv = &This->IWebBrowserPriv2IE9_iface;
}else {
return FALSE;
}
@ -1464,6 +1506,7 @@ void HlinkFrame_Init(HlinkFrame *This, IUnknown *outer, DocHost *doc_host)
This->IHlinkFrame_iface.lpVtbl = &HlinkFrameVtbl;
This->ITargetFrame2_iface.lpVtbl = &TargetFrame2Vtbl;
This->ITargetFramePriv2_iface.lpVtbl = &TargetFramePriv2Vtbl;
This->IWebBrowserPriv2IE9_iface.lpVtbl = &WebBrowserPriv2IE9Vtbl;
This->outer = outer;
This->doc_host = doc_host;

View file

@ -688,7 +688,7 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
V_VT(params+3) = (VT_BYREF|VT_VARIANT);
V_VARIANTREF(params+3) = &var_frame_name;
V_VT(&var_frame_name) = VT_BSTR;
V_BSTR(&var_frame_name) = NULL;
V_BSTR(&var_frame_name) = lpszFrameName ? SysAllocString(lpszFrameName) : NULL;
V_VT(params+4) = (VT_BYREF|VT_VARIANT);
V_VARIANTREF(params+4) = &var_flags;
@ -709,6 +709,7 @@ static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
SysFreeString(V_BSTR(&var_url));
SysFreeString(V_BSTR(&var_headers));
SysFreeString(V_BSTR(&var_frame_name));
SafeArrayDestroy(post_data);
*pfCancel = !!cancel;

View file

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep register
[
helpstring("Microsoft Active Setup Engine"),
threading(apartment),

View file

@ -480,8 +480,8 @@ SockReenableAsyncSelectEvent (
typedef VOID (*PASYNC_COMPLETION_ROUTINE)(PVOID Context, PIO_STATUS_BLOCK IoStatusBlock);
DWORD
FORCEINLINE
DWORD
MsafdReturnWithErrno(NTSTATUS Status,
LPINT Errno,
DWORD Received,

View file

@ -73,12 +73,14 @@ StartupWindowThread(LPVOID lpParam)
FALSE,
DUPLICATE_SAME_ACCESS))
{
ERR("Duplicating handle failed!\n");
HeapFree(GetProcessHeap(), 0, lpParam);
return FALSE;
}
if(!SetThreadDesktop(hDesk))
{
ERR("Setting thread desktop failed!\n");
HeapFree(GetProcessHeap(), 0, lpParam);
return FALSE;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Before After
Before After

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Before After
Before After

View file

@ -21,8 +21,6 @@ list(APPEND SOURCE
htmlcomment.c
htmlcurstyle.c
htmldoc.c
htmldoc3.c
htmldoc5.c
htmlelem.c
htmlelem2.c
htmlelem3.c

View file

@ -49,6 +49,12 @@ typedef struct {
struct list request_headers;
} nsChannel;
typedef struct {
WCHAR *headers;
HGLOBAL post_data;
ULONG post_data_len;
} request_data_t;
typedef struct BSCallbackVtbl BSCallbackVtbl;
struct BSCallback {
@ -61,9 +67,7 @@ struct BSCallback {
LONG ref;
LPWSTR headers;
HGLOBAL post_data;
ULONG post_data_len;
request_data_t request_data;
ULONG readed;
DWORD bindf;
BOOL bindinfo_ready;
@ -102,6 +106,8 @@ typedef struct {
#define BINDING_REPLACE 0x0002
#define BINDING_FROMHIST 0x0004
#define BINDING_REFRESH 0x0008
#define BINDING_SUBMIT 0x0010
#define BINDING_NOFRAG 0x0020
HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN;
HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN;
@ -116,9 +122,10 @@ HRESULT super_navigate(HTMLOuterWindow*,IUri*,DWORD,const WCHAR*,BYTE*,DWORD) DE
HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN;
HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,IHTMLWindow2**) DECLSPEC_HIDDEN;
HRESULT navigate_url(HTMLOuterWindow*,const WCHAR*,IUri*,DWORD) DECLSPEC_HIDDEN;
HRESULT submit_form(HTMLOuterWindow*,IUri*,nsIInputStream*) DECLSPEC_HIDDEN;
HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC**) DECLSPEC_HIDDEN;
HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN;
HRESULT channelbsc_load_stream(HTMLInnerWindow*,IMoniker*,IStream*) DECLSPEC_HIDDEN;
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;

View file

@ -53,47 +53,81 @@ static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *targ
return hres;
}
static HRESULT navigate_anchor(HTMLAnchorElement *This)
HTMLOuterWindow *get_target_window(HTMLOuterWindow *window, nsAString *target_str, BOOL *use_new_window)
{
nsAString href_str, target_str;
HTMLOuterWindow *window = NULL;
nsresult nsres;
HRESULT hres = E_FAIL;
HTMLOuterWindow *top_window, *ret_window;
const PRUnichar *target;
HRESULT hres;
static const WCHAR _parentW[] = {'p','a','r','e','n','t',0};
static const WCHAR _parentW[] = {'_','p','a','r','e','n','t',0};
static const WCHAR _selfW[] = {'_','s','e','l','f',0};
static const WCHAR _topW[] = {'_','t','o','p',0};
*use_new_window = FALSE;
nsAString_GetData(target_str, &target);
TRACE("%s\n", debugstr_w(target));
if(!*target || !strcmpiW(target, _selfW)) {
IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
return window;
}
if(!strcmpiW(target, _topW)) {
get_top_window(window, &top_window);
IHTMLWindow2_AddRef(&top_window->base.IHTMLWindow2_iface);
return top_window;
}
if(!strcmpiW(target, _parentW)) {
if(!window->parent) {
WARN("Window has no parent\n");
return NULL;
}
IHTMLWindow2_AddRef(&window->parent->base.IHTMLWindow2_iface);
return window->parent;
}
get_top_window(window, &top_window);
hres = get_frame_by_name(top_window, target, TRUE, &ret_window);
if(FAILED(hres) || !ret_window) {
*use_new_window = TRUE;
return NULL;
}
IHTMLWindow2_AddRef(&ret_window->base.IHTMLWindow2_iface);
return ret_window;
}
static HRESULT navigate_anchor(HTMLAnchorElement *This)
{
nsAString href_str, target_str;
HTMLOuterWindow *window;
BOOL use_new_window;
nsresult nsres;
HRESULT hres = E_FAIL;
nsAString_Init(&target_str, NULL);
nsres = nsIDOMHTMLAnchorElement_GetTarget(This->nsanchor, &target_str);
if(NS_SUCCEEDED(nsres)) {
if(NS_FAILED(nsres))
return E_FAIL;
window = get_target_window(This->element.node.doc->basedoc.window, &target_str, &use_new_window);
if(!window && use_new_window) {
const PRUnichar *target;
nsAString_GetData(&target_str, &target);
TRACE("target %s\n", debugstr_w(target));
if(*target && strcmpiW(target, _selfW)) {
if(!strcmpiW(target, _topW)) {
TRACE("target _top\n");
get_top_window(This->element.node.doc->basedoc.window, &window);
}else if(!strcmpiW(target, _parentW)) {
FIXME("Navigating to target _parent is not implemented\n");
nsAString_Finish(&target_str);
return S_OK;
}else {
HTMLOuterWindow *top_window;
get_top_window(This->element.node.doc->basedoc.window, &top_window);
hres = get_frame_by_name(top_window, target, TRUE, &window);
if(FAILED(hres) || !window) {
hres = navigate_anchor_window(This, target);
nsAString_Finish(&target_str);
return hres;
}
}
}
}
nsAString_Finish(&target_str);
if(!window)
return S_OK;
nsAString_Init(&href_str, NULL);
nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str);
@ -102,15 +136,14 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
nsAString_GetData(&href_str, &href);
if(*href) {
if(!window)
window = This->element.node.doc->basedoc.window;
hres = navigate_url(window, href, window->uri, BINDING_NAVIGATED);
hres = navigate_url(window, href, window->uri_nofrag, BINDING_NAVIGATED);
}else {
TRACE("empty href\n");
hres = S_OK;
}
}
nsAString_Finish(&href_str);
IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
return hres;
}

View file

@ -108,7 +108,7 @@ static int loose_hex_to_rgb(const WCHAR *hex)
| comp_value(hex+2*dpc, dpc);
}
static HRESULT nscolor_to_str(LPCWSTR color, BSTR *ret)
HRESULT nscolor_to_str(LPCWSTR color, BSTR *ret)
{
unsigned int i;
int rgb = -1;
@ -139,7 +139,7 @@ static HRESULT nscolor_to_str(LPCWSTR color, BSTR *ret)
return S_OK;
}
static BOOL variant_to_nscolor(const VARIANT *v, nsAString *nsstr)
BOOL variant_to_nscolor(const VARIANT *v, nsAString *nsstr)
{
switch(V_VT(v)) {
case VT_BSTR:
@ -587,18 +587,71 @@ static HRESULT WINAPI HTMLBodyElement_get_onunload(IHTMLBodyElement *iface, VARI
return E_NOTIMPL;
}
static const WCHAR autoW[] = {'a','u','t','o',0};
static const WCHAR hiddenW[] = {'h','i','d','d','e','n',0};
static const WCHAR scrollW[] = {'s','c','r','o','l','l',0};
static const WCHAR visibleW[] = {'v','i','s','i','b','l','e',0};
static const WCHAR yesW[] = {'y','e','s',0};
static const WCHAR noW[] = {'n','o',0};
static HRESULT WINAPI HTMLBodyElement_put_scroll(IHTMLBodyElement *iface, BSTR v)
{
HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
static const WCHAR *val;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
/* Emulate with CSS visibility attribute */
if(!strcmpW(v, yesW)) {
val = scrollW;
}else if(!strcmpW(v, autoW)) {
val = visibleW;
}else if(!strcmpW(v, noW)) {
val = hiddenW;
}else {
WARN("Invalid argument %s\n", debugstr_w(v));
return E_INVALIDARG;
}
return set_elem_style(&This->textcont.element, STYLEID_OVERFLOW, val);
}
static HRESULT WINAPI HTMLBodyElement_get_scroll(IHTMLBodyElement *iface, BSTR *p)
{
HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
const WCHAR *ret = NULL;
BSTR overflow;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
/* Emulate with CSS visibility attribute */
hres = get_elem_style(&This->textcont.element, STYLEID_OVERFLOW, &overflow);
if(FAILED(hres))
return hres;
if(!overflow || !*overflow) {
*p = NULL;
hres = S_OK;
}else if(!strcmpW(overflow, visibleW) || !strcmpW(overflow, autoW)) {
ret = autoW;
}else if(!strcmpW(overflow, scrollW)) {
ret = yesW;
}else if(!strcmpW(overflow, hiddenW)) {
ret = noW;
}else {
TRACE("Defaulting %s to NULL\n", debugstr_w(overflow));
*p = NULL;
hres = S_OK;
}
SysFreeString(overflow);
if(ret) {
*p = SysAllocString(ret);
hres = *p ? S_OK : E_OUTOFMEMORY;
}
return hres;
}
static HRESULT WINAPI HTMLBodyElement_put_onselect(IHTMLBodyElement *iface, VARIANT v)

File diff suppressed because it is too large Load diff

View file

@ -1,837 +0,0 @@
/*
* Copyright 2005 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "mshtml_private.h"
HRESULT get_doc_elem_by_id(HTMLDocumentNode *doc, const WCHAR *id, HTMLElement **ret)
{
nsIDOMNodeList *nsnode_list;
nsIDOMElement *nselem;
nsIDOMNode *nsnode;
nsAString id_str;
nsresult nsres;
HRESULT hres;
if(!doc->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsAString_InitDepend(&id_str, id);
/* get element by id attribute */
nsres = nsIDOMHTMLDocument_GetElementById(doc->nsdoc, &id_str, &nselem);
if(FAILED(nsres)) {
ERR("GetElementById failed: %08x\n", nsres);
nsAString_Finish(&id_str);
return E_FAIL;
}
/* get first element by name attribute */
nsres = nsIDOMHTMLDocument_GetElementsByName(doc->nsdoc, &id_str, &nsnode_list);
nsAString_Finish(&id_str);
if(FAILED(nsres)) {
ERR("getElementsByName failed: %08x\n", nsres);
if(nselem)
nsIDOMElement_Release(nselem);
return E_FAIL;
}
nsres = nsIDOMNodeList_Item(nsnode_list, 0, &nsnode);
nsIDOMNodeList_Release(nsnode_list);
assert(nsres == NS_OK);
if(nsnode && nselem) {
UINT16 pos;
nsres = nsIDOMNode_CompareDocumentPosition(nsnode, (nsIDOMNode*)nselem, &pos);
if(NS_FAILED(nsres)) {
FIXME("CompareDocumentPosition failed: 0x%08x\n", nsres);
nsIDOMNode_Release(nsnode);
nsIDOMElement_Release(nselem);
return E_FAIL;
}
TRACE("CompareDocumentPosition gave: 0x%x\n", pos);
if(!(pos & (DOCUMENT_POSITION_PRECEDING | DOCUMENT_POSITION_CONTAINS))) {
nsIDOMElement_Release(nselem);
nselem = NULL;
}
}
if(nsnode) {
if(!nselem) {
nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMElement, (void**)&nselem);
assert(nsres == NS_OK);
}
nsIDOMNode_Release(nsnode);
}
if(!nselem) {
*ret = NULL;
return S_OK;
}
hres = get_elem(doc, nselem, ret);
nsIDOMElement_Release(nselem);
return hres;
}
static inline HTMLDocument *impl_from_IHTMLDocument3(IHTMLDocument3 *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument3_iface);
}
static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface,
REFIID riid, void **ppv)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
}
static HRESULT WINAPI HTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
rgDispId);
}
static HRESULT WINAPI HTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLDocument3_releaseCapture(IHTMLDocument3 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%x)\n", This, fForce);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR text,
IHTMLDOMNode **newTextNode)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
nsIDOMText *nstext;
HTMLDOMNode *node;
nsAString text_str;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(text), newTextNode);
if(!This->doc_node->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsAString_InitDepend(&text_str, text);
nsres = nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &text_str, &nstext);
nsAString_Finish(&text_str);
if(NS_FAILED(nsres)) {
ERR("CreateTextNode failed: %08x\n", nsres);
return E_FAIL;
}
hres = HTMLDOMTextNode_Create(This->doc_node, (nsIDOMNode*)nstext, &node);
nsIDOMText_Release(nstext);
if(FAILED(hres))
return hres;
*newTextNode = &node->IHTMLDOMNode_iface;
return S_OK;
}
static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
nsIDOMElement *nselem = NULL;
HTMLDOMNode *node;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, p);
if(This->window->readystate == READYSTATE_UNINITIALIZED) {
*p = NULL;
return S_OK;
}
if(!This->doc_node->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsres = nsIDOMHTMLDocument_GetDocumentElement(This->doc_node->nsdoc, &nselem);
if(NS_FAILED(nsres)) {
ERR("GetDocumentElement failed: %08x\n", nsres);
return E_FAIL;
}
if(!nselem) {
*p = NULL;
return S_OK;
}
hres = get_node(This->doc_node, (nsIDOMNode *)nselem, TRUE, &node);
nsIDOMElement_Release(nselem);
if(FAILED(hres))
return hres;
hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);
node_release(node);
return hres;
}
static HRESULT WINAPI HTMLDocument3_uniqueID(IHTMLDocument3 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
IDispatch* pDisp, VARIANT_BOOL *pfResult)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
return attach_event(&This->doc_node->node.event_target, This->doc_node->node.nsnode, This, event, pDisp, pfResult);
}
static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event,
IDispatch *pDisp)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
return detach_event(This->doc_node->node.event_target, This, event, pDisp);
}
static HRESULT WINAPI HTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
TRACE("(%p)->()\n", This);
return set_doc_event(This, EVENTID_CONTEXTMENU, &v);
}
static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_CONTEXTMENU, p);
}
static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface,
IHTMLDocument2 **ppNewDoc)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
nsIDOMDocumentFragment *doc_frag;
HTMLDocumentNode *docnode;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, ppNewDoc);
if(!This->doc_node->nsdoc) {
FIXME("NULL nsdoc\n");
return E_NOTIMPL;
}
nsres = nsIDOMHTMLDocument_CreateDocumentFragment(This->doc_node->nsdoc, &doc_frag);
if(NS_FAILED(nsres)) {
ERR("CreateDocumentFragment failed: %08x\n", nsres);
return E_FAIL;
}
hres = create_document_fragment((nsIDOMNode*)doc_frag, This->doc_node, &docnode);
nsIDOMDocumentFragment_Release(doc_frag);
if(FAILED(hres))
return hres;
*ppNewDoc = &docnode->basedoc.IHTMLDocument2_iface;
return S_OK;
}
static HRESULT WINAPI HTMLDocument3_get_parentDocument(IHTMLDocument3 *iface,
IHTMLDocument2 **p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_enableDownload(IHTMLDocument3 *iface,
VARIANT_BOOL v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_enableDownload(IHTMLDocument3 *iface,
VARIANT_BOOL *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
TRACE("(%p)->(%p)\n", This, p);
return IHTMLDOMNode_get_childNodes(&This->doc_node->node.IHTMLDOMNode_iface, p);
}
static HRESULT WINAPI HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface,
VARIANT_BOOL v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface,
VARIANT_BOOL *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v,
IHTMLElementCollection **ppelColl)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppelColl);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v,
IHTMLElement **pel)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
HTMLElement *elem;
HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
hres = get_doc_elem_by_id(This->doc_node, v, &elem);
if(FAILED(hres) || !elem) {
*pel = NULL;
return hres;
}
*pel = &elem->IHTMLElement_iface;
return S_OK;
}
static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v,
IHTMLElementCollection **pelColl)
{
HTMLDocument *This = impl_from_IHTMLDocument3(iface);
nsIDOMNodeList *nslist;
nsAString id_str;
nsresult nsres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
if(!This->doc_node->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsAString_InitDepend(&id_str, v);
nsres = nsIDOMHTMLDocument_GetElementsByTagName(This->doc_node->nsdoc, &id_str, &nslist);
nsAString_Finish(&id_str);
if(FAILED(nsres)) {
ERR("GetElementByName failed: %08x\n", nsres);
return E_FAIL;
}
*pelColl = create_collection_from_nodelist(This->doc_node, nslist);
nsIDOMNodeList_Release(nslist);
return S_OK;
}
static const IHTMLDocument3Vtbl HTMLDocument3Vtbl = {
HTMLDocument3_QueryInterface,
HTMLDocument3_AddRef,
HTMLDocument3_Release,
HTMLDocument3_GetTypeInfoCount,
HTMLDocument3_GetTypeInfo,
HTMLDocument3_GetIDsOfNames,
HTMLDocument3_Invoke,
HTMLDocument3_releaseCapture,
HTMLDocument3_recalc,
HTMLDocument3_createTextNode,
HTMLDocument3_get_documentElement,
HTMLDocument3_uniqueID,
HTMLDocument3_attachEvent,
HTMLDocument3_detachEvent,
HTMLDocument3_put_onrowsdelete,
HTMLDocument3_get_onrowsdelete,
HTMLDocument3_put_onrowsinserted,
HTMLDocument3_get_onrowsinserted,
HTMLDocument3_put_oncellchange,
HTMLDocument3_get_oncellchange,
HTMLDocument3_put_ondatasetchanged,
HTMLDocument3_get_ondatasetchanged,
HTMLDocument3_put_ondataavailable,
HTMLDocument3_get_ondataavailable,
HTMLDocument3_put_ondatasetcomplete,
HTMLDocument3_get_ondatasetcomplete,
HTMLDocument3_put_onpropertychange,
HTMLDocument3_get_onpropertychange,
HTMLDocument3_put_dir,
HTMLDocument3_get_dir,
HTMLDocument3_put_oncontextmenu,
HTMLDocument3_get_oncontextmenu,
HTMLDocument3_put_onstop,
HTMLDocument3_get_onstop,
HTMLDocument3_createDocumentFragment,
HTMLDocument3_get_parentDocument,
HTMLDocument3_put_enableDownload,
HTMLDocument3_get_enableDownload,
HTMLDocument3_put_baseUrl,
HTMLDocument3_get_baseUrl,
HTMLDocument3_get_childNodes,
HTMLDocument3_put_inheritStyleSheets,
HTMLDocument3_get_inheritStyleSheets,
HTMLDocument3_put_onbeforeeditfocus,
HTMLDocument3_get_onbeforeeditfocus,
HTMLDocument3_getElementsByName,
HTMLDocument3_getElementById,
HTMLDocument3_getElementsByTagName
};
static inline HTMLDocument *impl_from_IHTMLDocument4(IHTMLDocument4 *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument4_iface);
}
static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface,
REFIID riid, void **ppv)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
}
static HRESULT WINAPI HTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
rgDispId);
}
static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
nsIDOMHTMLElement *nsbody;
nsresult nsres;
TRACE("(%p)->()\n", This);
nsres = nsIDOMHTMLDocument_GetBody(This->doc_node->nsdoc, &nsbody);
if(NS_FAILED(nsres) || !nsbody) {
ERR("GetBody failed: %08x\n", nsres);
return E_FAIL;
}
nsres = nsIDOMHTMLElement_Focus(nsbody);
nsIDOMHTMLElement_Release(nsbody);
if(NS_FAILED(nsres)) {
ERR("Focus failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
}
static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, pfFocus);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_get_namespace(IHTMLDocument4 *iface, IDispatch **p)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl,
BSTR bstrOptions, IHTMLDocument2 **newDoc)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrUrl), debugstr_w(bstrOptions), newDoc);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_createEventObject(IHTMLDocument4 *iface,
VARIANT *pvarEventObject, IHTMLEventObj **ppEventObj)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_variant(pvarEventObject), ppEventObj);
if(pvarEventObject && V_VT(pvarEventObject) != VT_ERROR && V_VT(pvarEventObject) != VT_EMPTY) {
FIXME("unsupported pvarEventObject %s\n", debugstr_variant(pvarEventObject));
return E_NOTIMPL;
}
return create_event_obj(ppEventObj);
}
static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEventName,
VARIANT *pvarEventObject, VARIANT_BOOL *pfCanceled)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCanceled);
return dispatch_event(&This->doc_node->node, bstrEventName, pvarEventObject, pfCanceled);
}
static HRESULT WINAPI HTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v,
IHTMLRenderStyle **ppIHTMLRenderStyle)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppIHTMLRenderStyle);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_get_oncontrolselect(IHTMLDocument4 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument4_get_URLEncoded(IHTMLDocument4 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument4(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static const IHTMLDocument4Vtbl HTMLDocument4Vtbl = {
HTMLDocument4_QueryInterface,
HTMLDocument4_AddRef,
HTMLDocument4_Release,
HTMLDocument4_GetTypeInfoCount,
HTMLDocument4_GetTypeInfo,
HTMLDocument4_GetIDsOfNames,
HTMLDocument4_Invoke,
HTMLDocument4_focus,
HTMLDocument4_hasFocus,
HTMLDocument4_put_onselectionchange,
HTMLDocument4_get_onselectionchange,
HTMLDocument4_get_namespace,
HTMLDocument4_createDocumentFromUrl,
HTMLDocument4_put_media,
HTMLDocument4_get_media,
HTMLDocument4_createEventObject,
HTMLDocument4_fireEvent,
HTMLDocument4_createRenderStyle,
HTMLDocument4_put_oncontrolselect,
HTMLDocument4_get_oncontrolselect,
HTMLDocument4_get_URLEncoded
};
void HTMLDocument_HTMLDocument3_Init(HTMLDocument *This)
{
This->IHTMLDocument3_iface.lpVtbl = &HTMLDocument3Vtbl;
This->IHTMLDocument4_iface.lpVtbl = &HTMLDocument4Vtbl;
}

View file

@ -1,427 +0,0 @@
/*
* Copyright 2007 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "mshtml_private.h"
static inline HTMLDocument *impl_from_IHTMLDocument5(IHTMLDocument5 *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument5_iface);
}
static HRESULT WINAPI HTMLDocument5_QueryInterface(IHTMLDocument5 *iface,
REFIID riid, void **ppv)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI HTMLDocument5_AddRef(IHTMLDocument5 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI HTMLDocument5_Release(IHTMLDocument5 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI HTMLDocument5_GetTypeInfoCount(IHTMLDocument5 *iface, UINT *pctinfo)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
}
static HRESULT WINAPI HTMLDocument5_GetTypeInfo(IHTMLDocument5 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLDocument5_GetIDsOfNames(IHTMLDocument5 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
rgDispId);
}
static HRESULT WINAPI HTMLDocument5_Invoke(IHTMLDocument5 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLDocument5_put_onmousewheel(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onmousewheel(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_doctype(IHTMLDocument5 *iface, IHTMLDOMNode **p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_implementation(IHTMLDocument5 *iface, IHTMLDOMImplementation **p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_createAttribute(IHTMLDocument5 *iface, BSTR bstrattrName,
IHTMLDOMAttribute **ppattribute)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
HTMLDOMAttribute *attr;
HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrattrName), ppattribute);
hres = HTMLDOMAttribute_Create(bstrattrName, NULL, 0, &attr);
if(FAILED(hres))
return hres;
*ppattribute = &attr->IHTMLDOMAttribute_iface;
return S_OK;
}
static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bstrdata,
IHTMLDOMNode **ppRetNode)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
nsIDOMComment *nscomment;
HTMLElement *elem;
nsAString str;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrdata), ppRetNode);
if(!This->doc_node->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsAString_InitDepend(&str, bstrdata);
nsres = nsIDOMHTMLDocument_CreateComment(This->doc_node->nsdoc, &str, &nscomment);
nsAString_Finish(&str);
if(NS_FAILED(nsres)) {
ERR("CreateTextNode failed: %08x\n", nsres);
return E_FAIL;
}
hres = HTMLCommentElement_Create(This->doc_node, (nsIDOMNode*)nscomment, &elem);
nsIDOMComment_Release(nscomment);
if(FAILED(hres))
return hres;
*ppRetNode = &elem->node.IHTMLDOMNode_iface;
return S_OK;
}
static HRESULT WINAPI HTMLDocument5_put_onfocusin(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onfocusin(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_put_onfocusout(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onfocusout(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_put_onactivate(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onactivate(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_put_ondeactivate(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_ondeactivate(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_put_onbeforeactivate(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onbeforeactivate(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_put_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface, VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument5_get_compatMode(IHTMLDocument5 *iface, BSTR *p)
{
HTMLDocument *This = impl_from_IHTMLDocument5(iface);
nsAString mode_str;
const PRUnichar *mode;
TRACE("(%p)->(%p)\n", This, p);
if(!This->doc_node->nsdoc) {
WARN("NULL nsdoc\n");
return E_UNEXPECTED;
}
nsAString_Init(&mode_str, NULL);
nsIDOMHTMLDocument_GetCompatMode(This->doc_node->nsdoc, &mode_str);
nsAString_GetData(&mode_str, &mode);
*p = SysAllocString(mode);
nsAString_Finish(&mode_str);
return S_OK;
}
static const IHTMLDocument5Vtbl HTMLDocument5Vtbl = {
HTMLDocument5_QueryInterface,
HTMLDocument5_AddRef,
HTMLDocument5_Release,
HTMLDocument5_GetTypeInfoCount,
HTMLDocument5_GetTypeInfo,
HTMLDocument5_GetIDsOfNames,
HTMLDocument5_Invoke,
HTMLDocument5_put_onmousewheel,
HTMLDocument5_get_onmousewheel,
HTMLDocument5_get_doctype,
HTMLDocument5_get_implementation,
HTMLDocument5_createAttribute,
HTMLDocument5_createComment,
HTMLDocument5_put_onfocusin,
HTMLDocument5_get_onfocusin,
HTMLDocument5_put_onfocusout,
HTMLDocument5_get_onfocusout,
HTMLDocument5_put_onactivate,
HTMLDocument5_get_onactivate,
HTMLDocument5_put_ondeactivate,
HTMLDocument5_get_ondeactivate,
HTMLDocument5_put_onbeforeactivate,
HTMLDocument5_get_onbeforeactivate,
HTMLDocument5_put_onbeforedeactivate,
HTMLDocument5_get_onbeforedeactivate,
HTMLDocument5_get_compatMode
};
static inline HTMLDocument *impl_from_IHTMLDocument6(IHTMLDocument6 *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IHTMLDocument6_iface);
}
static HRESULT WINAPI HTMLDocument6_QueryInterface(IHTMLDocument6 *iface,
REFIID riid, void **ppv)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return htmldoc_query_interface(This, riid, ppv);
}
static ULONG WINAPI HTMLDocument6_AddRef(IHTMLDocument6 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return htmldoc_addref(This);
}
static ULONG WINAPI HTMLDocument6_Release(IHTMLDocument6 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return htmldoc_release(This);
}
static HRESULT WINAPI HTMLDocument6_GetTypeInfoCount(IHTMLDocument6 *iface, UINT *pctinfo)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return IDispatchEx_GetTypeInfoCount(&This->IDispatchEx_iface, pctinfo);
}
static HRESULT WINAPI HTMLDocument6_GetTypeInfo(IHTMLDocument6 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return IDispatchEx_GetTypeInfo(&This->IDispatchEx_iface, iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLDocument6_GetIDsOfNames(IHTMLDocument6 *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return IDispatchEx_GetIDsOfNames(&This->IDispatchEx_iface, riid, rgszNames, cNames, lcid,
rgDispId);
}
static HRESULT WINAPI HTMLDocument6_Invoke(IHTMLDocument6 *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
return IDispatchEx_Invoke(&This->IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLDocument6_get_compatible(IHTMLDocument6 *iface,
IHTMLDocumentCompatibleInfoCollection **p)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_get_documentMode(IHTMLDocument6 *iface,
VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_get_onstorage(IHTMLDocument6 *iface,
VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_put_onstorage(IHTMLDocument6 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_get_onstoragecommit(IHTMLDocument6 *iface,
VARIANT *p)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_put_onstoragecommit(IHTMLDocument6 *iface, VARIANT v)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_getElementById(IHTMLDocument6 *iface,
BSTR bstrId, IHTMLElement2 **p)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrId), p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLDocument6_updateSettings(IHTMLDocument6 *iface)
{
HTMLDocument *This = impl_from_IHTMLDocument6(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
}
static const IHTMLDocument6Vtbl HTMLDocument6Vtbl = {
HTMLDocument6_QueryInterface,
HTMLDocument6_AddRef,
HTMLDocument6_Release,
HTMLDocument6_GetTypeInfoCount,
HTMLDocument6_GetTypeInfo,
HTMLDocument6_GetIDsOfNames,
HTMLDocument6_Invoke,
HTMLDocument6_get_compatible,
HTMLDocument6_get_documentMode,
HTMLDocument6_put_onstorage,
HTMLDocument6_get_onstorage,
HTMLDocument6_put_onstoragecommit,
HTMLDocument6_get_onstoragecommit,
HTMLDocument6_getElementById,
HTMLDocument6_updateSettings
};
void HTMLDocument_HTMLDocument5_Init(HTMLDocument *This)
{
This->IHTMLDocument5_iface.lpVtbl = &HTMLDocument5Vtbl;
This->IHTMLDocument6_iface.lpVtbl = &HTMLDocument6Vtbl;
}

View file

@ -1710,8 +1710,8 @@ static HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
static HRESULT HTMLElement_populate_props(DispatchEx *dispex)
{
HTMLElement *This = impl_from_DispatchEx(dispex);
nsIDOMNamedNodeMap *attrs;
nsIDOMNode *node;
nsIDOMMozNamedAttrMap *attrs;
nsIDOMAttr *attr;
nsAString nsstr;
const PRUnichar *str;
BSTR name;
@ -1729,40 +1729,40 @@ static HRESULT HTMLElement_populate_props(DispatchEx *dispex)
if(NS_FAILED(nsres))
return E_FAIL;
nsres = nsIDOMNamedNodeMap_GetLength(attrs, &len);
nsres = nsIDOMMozNamedAttrMap_GetLength(attrs, &len);
if(NS_FAILED(nsres)) {
nsIDOMNamedNodeMap_Release(attrs);
nsIDOMMozNamedAttrMap_Release(attrs);
return E_FAIL;
}
nsAString_Init(&nsstr, NULL);
for(i=0; i<len; i++) {
nsres = nsIDOMNamedNodeMap_Item(attrs, i, &node);
nsres = nsIDOMMozNamedAttrMap_Item(attrs, i, &attr);
if(NS_FAILED(nsres))
continue;
nsres = nsIDOMNode_GetNodeName(node, &nsstr);
nsres = nsIDOMAttr_GetNodeName(attr, &nsstr);
if(NS_FAILED(nsres)) {
nsIDOMNode_Release(node);
nsIDOMAttr_Release(attr);
continue;
}
nsAString_GetData(&nsstr, &str);
name = SysAllocString(str);
if(!name) {
nsIDOMNode_Release(node);
nsIDOMAttr_Release(attr);
continue;
}
hres = IDispatchEx_GetDispID(&dispex->IDispatchEx_iface, name, fdexNameCaseInsensitive, &id);
if(hres != DISP_E_UNKNOWNNAME) {
nsIDOMNode_Release(node);
nsIDOMAttr_Release(attr);
SysFreeString(name);
continue;
}
nsres = nsIDOMNode_GetNodeValue(node, &nsstr);
nsIDOMNode_Release(node);
nsres = nsIDOMAttr_GetNodeValue(attr, &nsstr);
nsIDOMAttr_Release(attr);
if(NS_FAILED(nsres)) {
SysFreeString(name);
continue;
@ -1785,7 +1785,7 @@ static HRESULT HTMLElement_populate_props(DispatchEx *dispex)
}
nsAString_Finish(&nsstr);
nsIDOMNamedNodeMap_Release(attrs);
nsIDOMMozNamedAttrMap_Release(attrs);
return S_OK;
}

View file

@ -847,7 +847,7 @@ static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
return attach_event(get_node_event_target(&This->node), This->node.nsnode, &This->node.doc->basedoc, event, pDisp, pfResult);
return attach_event(get_node_event_target(&This->node), &This->node.doc->basedoc, event, pDisp, pfResult);
}
static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)

View file

@ -25,7 +25,6 @@ typedef struct {
} handler_vector_t;
struct event_target_t {
DWORD node_handlers_mask;
handler_vector_t *event_table[EVENTID_LAST];
};
@ -142,13 +141,13 @@ typedef struct {
#define EVENT_DEFAULTLISTENER 0x0001
#define EVENT_BUBBLE 0x0002
#define EVENT_FORWARDBODY 0x0004
#define EVENT_NODEHANDLER 0x0008
#define EVENT_BIND_TO_BODY 0x0008
#define EVENT_CANCELABLE 0x0010
#define EVENT_HASDEFAULTHANDLERS 0x0020
static const event_info_t event_info[] = {
{abortW, onabortW, EVENTT_NONE, DISPID_EVMETH_ONABORT,
EVENT_NODEHANDLER},
EVENT_BIND_TO_BODY},
{beforeunloadW, onbeforeunloadW, EVENTT_NONE, DISPID_EVMETH_ONBEFOREUNLOAD,
EVENT_DEFAULTLISTENER|EVENT_FORWARDBODY},
{blurW, onblurW, EVENTT_HTML, DISPID_EVMETH_ONBLUR,
@ -168,7 +167,7 @@ static const event_info_t event_info[] = {
{dragstartW, ondragstartW, EVENTT_MOUSE, DISPID_EVMETH_ONDRAGSTART,
EVENT_CANCELABLE},
{errorW, onerrorW, EVENTT_NONE, DISPID_EVMETH_ONERROR,
EVENT_NODEHANDLER},
EVENT_BIND_TO_BODY},
{focusW, onfocusW, EVENTT_HTML, DISPID_EVMETH_ONFOCUS,
EVENT_DEFAULTLISTENER},
{helpW, onhelpW, EVENTT_KEY, DISPID_EVMETH_ONHELP,
@ -180,7 +179,7 @@ static const event_info_t event_info[] = {
{keyupW, onkeyupW, EVENTT_KEY, DISPID_EVMETH_ONKEYUP,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{loadW, onloadW, EVENTT_HTML, DISPID_EVMETH_ONLOAD,
EVENT_NODEHANDLER},
EVENT_BIND_TO_BODY},
{mousedownW, onmousedownW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEDOWN,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{mousemoveW, onmousemoveW, EVENTT_MOUSE, DISPID_EVMETH_ONMOUSEMOVE,
@ -205,8 +204,6 @@ static const event_info_t event_info[] = {
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE}
};
static const eventid_t node_handled_list[] = { EVENTID_ABORT, EVENTID_ERROR, EVENTID_LOAD };
eventid_t str_to_eid(LPCWSTR str)
{
int i;
@ -232,19 +229,6 @@ static eventid_t attr_to_eid(LPCWSTR str)
return EVENTID_LAST;
}
static DWORD get_node_handler_mask(eventid_t eid)
{
DWORD i;
for(i=0; i<sizeof(node_handled_list)/sizeof(*node_handled_list); i++) {
if(node_handled_list[i] == eid)
return 1 << i;
}
ERR("Invalid eid %d\n", eid);
return ~0;
}
typedef struct {
DispatchEx dispex;
IHTMLEventObj IHTMLEventObj_iface;
@ -605,20 +589,48 @@ static HRESULT WINAPI HTMLEventObj_get_reason(IHTMLEventObj *iface, LONG *p)
static HRESULT WINAPI HTMLEventObj_get_x(IHTMLEventObj *iface, LONG *p)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
LONG x = 0;
FIXME("(%p)->(%p)\n", This, p);
TRACE("(%p)->(%p)\n", This, p);
*p = -1;
if(This->nsevent) {
nsIDOMUIEvent *ui_event;
nsresult nsres;
nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMUIEvent, (void**)&ui_event);
if(NS_SUCCEEDED(nsres)) {
/* NOTE: pageX is not exactly right here. */
nsres = nsIDOMUIEvent_GetPageX(ui_event, &x);
assert(nsres == NS_OK);
nsIDOMUIEvent_Release(ui_event);
}
}
*p = x;
return S_OK;
}
static HRESULT WINAPI HTMLEventObj_get_y(IHTMLEventObj *iface, LONG *p)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
LONG y = 0;
FIXME("(%p)->(%p)\n", This, p);
TRACE("(%p)->(%p)\n", This, p);
*p = -1;
if(This->nsevent) {
nsIDOMUIEvent *ui_event;
nsresult nsres;
nsres = nsIDOMEvent_QueryInterface(This->nsevent, &IID_nsIDOMUIEvent, (void**)&ui_event);
if(NS_SUCCEEDED(nsres)) {
/* NOTE: pageY is not exactly right here. */
nsres = nsIDOMUIEvent_GetPageY(ui_event, &y);
assert(nsres == NS_OK);
nsIDOMUIEvent_Release(ui_event);
}
}
*p = y;
return S_OK;
}
@ -1292,31 +1304,33 @@ static BOOL alloc_handler_vector(event_target_t *event_target, eventid_t eid, in
return TRUE;
}
static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, event_target_t *event_target, nsIDOMNode *nsnode, eventid_t eid)
static HRESULT ensure_nsevent_handler(HTMLDocumentNode *doc, event_target_t *event_target, eventid_t eid)
{
if(!doc->nsdoc)
nsIDOMNode *nsnode = NULL;
TRACE("%s\n", debugstr_w(event_info[eid].name));
if(!doc->nsdoc || doc->event_vector[eid] || !(event_info[eid].flags & (EVENT_DEFAULTLISTENER|EVENT_BIND_TO_BODY)))
return S_OK;
if(event_info[eid].flags & EVENT_NODEHANDLER) {
DWORD mask;
if(event_info[eid].flags & EVENT_BIND_TO_BODY) {
nsIDOMHTMLElement *nsbody;
nsresult nsres;
mask = get_node_handler_mask(eid);
if(event_target->node_handlers_mask & mask)
return S_OK;
add_nsevent_listener(doc, nsnode, event_info[eid].name);
event_target->node_handlers_mask |= mask;
return S_OK;
nsres = nsIDOMHTMLDocument_GetBody(doc->nsdoc, &nsbody);
if(NS_SUCCEEDED(nsres) && nsbody) {
nsnode = (nsIDOMNode*)nsbody;
}else {
ERR("GetBody failed: %08x\n", nsres);
return E_UNEXPECTED;
}
}
if(!(event_info[eid].flags & EVENT_DEFAULTLISTENER))
return S_OK;
if(!doc->event_vector[eid]) {
doc->event_vector[eid] = TRUE;
add_nsevent_listener(doc, NULL, event_info[eid].name);
}
add_nsevent_listener(doc, nsnode, event_info[eid].name);
if(nsnode)
nsIDOMNode_Release(nsnode);
return S_OK;
}
@ -1347,7 +1361,7 @@ static HRESULT remove_event_handler(event_target_t **event_target, eventid_t eid
return S_OK;
}
static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, nsIDOMNode *nsnode, HTMLDocumentNode *doc,
static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, HTMLDocumentNode *doc,
eventid_t eid, IDispatch *disp)
{
event_target_t *event_target;
@ -1368,17 +1382,17 @@ static HRESULT set_event_handler_disp(event_target_t **event_target_ptr, nsIDOMN
event_target->event_table[eid]->handler_prop = disp;
IDispatch_AddRef(disp);
return ensure_nsevent_handler(doc, event_target, nsnode, eid);
return ensure_nsevent_handler(doc, event_target, eid);
}
HRESULT set_event_handler(event_target_t **event_target, nsIDOMNode *nsnode, HTMLDocumentNode *doc, eventid_t eid, VARIANT *var)
HRESULT set_event_handler(event_target_t **event_target, HTMLDocumentNode *doc, eventid_t eid, VARIANT *var)
{
switch(V_VT(var)) {
case VT_NULL:
return remove_event_handler(event_target, eid);
case VT_DISPATCH:
return set_event_handler_disp(event_target, nsnode, doc, eid, V_DISPATCH(var));
return set_event_handler_disp(event_target, doc, eid, V_DISPATCH(var));
default:
FIXME("not handler %s\n", debugstr_variant(var));
@ -1403,7 +1417,7 @@ HRESULT get_event_handler(event_target_t **event_target, eventid_t eid, VARIANT
return S_OK;
}
HRESULT attach_event(event_target_t **event_target_ptr, nsIDOMNode *nsnode, HTMLDocument *doc, BSTR name,
HRESULT attach_event(event_target_t **event_target_ptr, HTMLDocument *doc, BSTR name,
IDispatch *disp, VARIANT_BOOL *res)
{
event_target_t *event_target;
@ -1434,7 +1448,7 @@ HRESULT attach_event(event_target_t **event_target_ptr, nsIDOMNode *nsnode, HTML
event_target->event_table[eid]->handlers[i] = disp;
*res = VARIANT_TRUE;
return ensure_nsevent_handler(doc->doc_node, event_target, nsnode, eid);
return ensure_nsevent_handler(doc->doc_node, event_target, eid);
}
HRESULT detach_event(event_target_t *event_target, HTMLDocument *doc, BSTR name, IDispatch *disp)
@ -1465,11 +1479,11 @@ HRESULT detach_event(event_target_t *event_target, HTMLDocument *doc, BSTR name,
return S_OK;
}
void bind_elem_event(HTMLDocumentNode *doc, HTMLElement *elem, const WCHAR *event, IDispatch *disp)
void bind_node_event(HTMLDocumentNode *doc, event_target_t **event_target, HTMLDOMNode *node, const WCHAR *event, IDispatch *disp)
{
eventid_t eid;
TRACE("(%p %p %s %p)\n", doc, elem, debugstr_w(event), disp);
TRACE("(%p %p %p %s %p)\n", doc, event_target, node, debugstr_w(event), disp);
eid = attr_to_eid(event);
if(eid == EVENTID_LAST) {
@ -1477,10 +1491,10 @@ void bind_elem_event(HTMLDocumentNode *doc, HTMLElement *elem, const WCHAR *even
return;
}
set_event_handler_disp(&elem->node.event_target, elem->node.nsnode, doc, eid, disp);
set_event_handler_disp(event_target, doc, eid, disp);
}
void update_cp_events(HTMLInnerWindow *window, event_target_t **event_target_ptr, cp_static_data_t *cp, nsIDOMNode *nsnode)
void update_cp_events(HTMLInnerWindow *window, event_target_t **event_target_ptr, cp_static_data_t *cp)
{
event_target_t *event_target;
int i;
@ -1491,7 +1505,7 @@ void update_cp_events(HTMLInnerWindow *window, event_target_t **event_target_ptr
for(i=0; i < EVENTID_LAST; i++) {
if((event_info[i].flags & EVENT_DEFAULTLISTENER) && is_cp_event(cp, event_info[i].dispid))
ensure_nsevent_handler(window->doc, event_target, nsnode, i);
ensure_nsevent_handler(window->doc, event_target, i);
}
}
@ -1522,7 +1536,7 @@ void check_event_attr(HTMLDocumentNode *doc, nsIDOMElement *nselem)
if(disp) {
hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node);
if(SUCCEEDED(hres)) {
set_event_handler_disp(get_node_event_target(node), node->nsnode, node->doc, i, disp);
set_event_handler_disp(get_node_event_target(node), node->doc, i, disp);
node_release(node);
}
IDispatch_Release(disp);
@ -1547,7 +1561,7 @@ HRESULT doc_init_events(HTMLDocumentNode *doc)
for(i=0; i < EVENTID_LAST; i++) {
if(event_info[i].flags & EVENT_HASDEFAULTHANDLERS) {
hres = ensure_nsevent_handler(doc, NULL, NULL, i);
hres = ensure_nsevent_handler(doc, NULL, i);
if(FAILED(hres))
return hres;
}

View file

@ -52,17 +52,17 @@ eventid_t str_to_eid(LPCWSTR) DECLSPEC_HIDDEN;
void check_event_attr(HTMLDocumentNode*,nsIDOMElement*) DECLSPEC_HIDDEN;
void release_event_target(event_target_t*) DECLSPEC_HIDDEN;
void fire_event(HTMLDocumentNode*,eventid_t,BOOL,nsIDOMNode*,nsIDOMEvent*,IDispatch*) DECLSPEC_HIDDEN;
HRESULT set_event_handler(event_target_t**,nsIDOMNode*,HTMLDocumentNode*,eventid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT set_event_handler(event_target_t**,HTMLDocumentNode*,eventid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT get_event_handler(event_target_t**,eventid_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT attach_event(event_target_t**,nsIDOMNode*,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT attach_event(event_target_t**,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT detach_event(event_target_t*,HTMLDocument*,BSTR,IDispatch*) DECLSPEC_HIDDEN;
HRESULT dispatch_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*) DECLSPEC_HIDDEN;
HRESULT call_fire_event(HTMLDOMNode*,eventid_t) DECLSPEC_HIDDEN;
void update_cp_events(HTMLInnerWindow*,event_target_t**,cp_static_data_t*,nsIDOMNode*) DECLSPEC_HIDDEN;
void update_cp_events(HTMLInnerWindow*,event_target_t**,cp_static_data_t*) DECLSPEC_HIDDEN;
HRESULT doc_init_events(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void detach_events(HTMLDocumentNode *doc) DECLSPEC_HIDDEN;
HRESULT create_event_obj(IHTMLEventObj**) DECLSPEC_HIDDEN;
void bind_elem_event(HTMLDocumentNode*,HTMLElement*,const WCHAR*,IDispatch*) DECLSPEC_HIDDEN;
void bind_node_event(HTMLDocumentNode*,event_target_t**,HTMLDOMNode*,const WCHAR*,IDispatch*) DECLSPEC_HIDDEN;
void init_nsevents(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void release_nsevents(HTMLDocumentNode*) DECLSPEC_HIDDEN;
@ -76,7 +76,7 @@ static inline event_target_t **get_node_event_target(HTMLDOMNode *node)
static inline HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
{
return set_event_handler(get_node_event_target(node), node->nsnode, node->doc, eid, var);
return set_event_handler(get_node_event_target(node), node->doc, eid, var);
}
static inline HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)

View file

@ -346,11 +346,44 @@ static HRESULT WINAPI HTMLFormElement_get_onreset(IHTMLFormElement *iface, VARIA
static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
HTMLOuterWindow *window = NULL, *this_window = NULL;
nsIInputStream *post_stream;
nsAString action_uri_str, target_str;
IUri *uri;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->()\n", This);
if(This->element.node.doc) {
HTMLDocumentNode *doc = This->element.node.doc;
if(doc->window && doc->window->base.outer_window)
this_window = doc->window->base.outer_window;
}
if(!this_window) {
TRACE("No outer window\n");
return S_OK;
}
nsAString_Init(&target_str, NULL);
nsres = nsIDOMHTMLFormElement_GetTarget(This->nsform, &target_str);
if(NS_SUCCEEDED(nsres)) {
BOOL use_new_window;
window = get_target_window(this_window, &target_str, &use_new_window);
if(use_new_window)
FIXME("submit to new window is not supported\n");
}
nsAString_Finish(&target_str);
if(!window)
return S_OK;
/*
* FIXME: We currently don't use our submit implementation for sub-windows because
* load_nsuri can't support post data. We should fix it.
*/
if(!window->doc_obj || window->doc_obj->basedoc.window != window) {
nsres = nsIDOMHTMLFormElement_Submit(This->nsform);
IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
if(NS_FAILED(nsres)) {
ERR("Submit failed: %08x\n", nsres);
return E_FAIL;
@ -359,6 +392,31 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
return S_OK;
}
nsAString_Init(&action_uri_str, NULL);
nsres = nsIDOMHTMLFormElement_GetFormData(This->nsform, NULL, &action_uri_str, &post_stream);
if(NS_SUCCEEDED(nsres)) {
const PRUnichar *action_uri;
nsAString_GetData(&action_uri_str, &action_uri);
hres = create_uri(action_uri, 0, &uri);
}else {
ERR("GetFormData failed: %08x\n", nsres);
hres = E_FAIL;
}
nsAString_Finish(&action_uri_str);
if(SUCCEEDED(hres)) {
window->readystate_locked++;
hres = submit_form(window, uri, post_stream);
window->readystate_locked--;
IUri_Release(uri);
}
IHTMLWindow2_Release(&window->base.IHTMLWindow2_iface);
if(post_stream)
nsIInputStream_Release(post_stream);
return hres;
}
static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);

View file

@ -578,15 +578,19 @@ static HRESULT WINAPI HTMLFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface, I
static HRESULT WINAPI HTMLFrameBase2_put_onload(IHTMLFrameBase2 *iface, VARIANT v)
{
HTMLFrameBase *This = impl_from_IHTMLFrameBase2(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
return set_node_event(&This->element.node, EVENTID_LOAD, &v);
}
static HRESULT WINAPI HTMLFrameBase2_get_onload(IHTMLFrameBase2 *iface, VARIANT *p)
{
HTMLFrameBase *This = impl_from_IHTMLFrameBase2(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_node_event(&This->element.node, EVENTID_LOAD, p);
}
static HRESULT WINAPI HTMLFrameBase2_put_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT v)

View file

@ -141,15 +141,28 @@ static HRESULT WINAPI HTMLSelectElement_get_size(IHTMLSelectElement *iface, LONG
static HRESULT WINAPI HTMLSelectElement_put_multiple(IHTMLSelectElement *iface, VARIANT_BOOL v)
{
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
nsresult nsres;
TRACE("(%p)->(%x)\n", This, v);
nsres = nsIDOMHTMLSelectElement_SetMultiple(This->nsselect, !!v);
assert(nsres == NS_OK);
return S_OK;
}
static HRESULT WINAPI HTMLSelectElement_get_multiple(IHTMLSelectElement *iface, VARIANT_BOOL *p)
{
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
cpp_bool val;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsres = nsIDOMHTMLSelectElement_GetMultiple(This->nsselect, &val);
assert(nsres == NS_OK);
*p = val ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI HTMLSelectElement_put_name(IHTMLSelectElement *iface, BSTR v)

View file

@ -74,6 +74,9 @@ static const WCHAR attrBorderWidth[] =
{'b','o','r','d','e','r','-','w','i','d','t','h',0};
static const WCHAR attrBottom[] =
{'b','o','t','t','o','m',0};
/* FIXME: Use unprefixed version (requires Gecko changes). */
static const WCHAR attrBoxSizing[] =
{'-','m','o','z','-','b','o','x','-','s','i','z','i','n','g',0};
static const WCHAR attrClear[] =
{'c','l','e','a','r',0};
static const WCHAR attrClip[] =
@ -106,6 +109,8 @@ static const WCHAR attrLetterSpacing[] =
{'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
static const WCHAR attrLineHeight[] =
{'l','i','n','e','-','h','e','i','g','h','t',0};
static const WCHAR attrListStyleType[] =
{'l','i','s','t','-','s','t','y','l','e','-','t','y','p','e',0};
static const WCHAR attrMargin[] =
{'m','a','r','g','i','n',0};
static const WCHAR attrMarginBottom[] =
@ -118,6 +123,8 @@ static const WCHAR attrMarginTop[] =
{'m','a','r','g','i','n','-','t','o','p',0};
static const WCHAR attrMinHeight[] =
{'m','i','n','-','h','e','i','g','h','t',0};
static const WCHAR attrOutline[] =
{'o','u','t','l','i','n','e',0};
static const WCHAR attrOverflow[] =
{'o','v','e','r','f','l','o','w',0};
static const WCHAR attrOverflowX[] =
@ -202,6 +209,7 @@ static const style_tbl_entry_t style_tbl[] = {
{attrBorderTopWidth, DISPID_IHTMLSTYLE_BORDERTOPWIDTH},
{attrBorderWidth, DISPID_IHTMLSTYLE_BORDERWIDTH},
{attrBottom, DISPID_IHTMLSTYLE2_BOTTOM},
{attrBoxSizing, DISPID_IHTMLSTYLE6_BOXSIZING},
{attrClear, DISPID_IHTMLSTYLE_CLEAR},
{attrClip, DISPID_IHTMLSTYLE_CLIP},
{attrColor, DISPID_IHTMLSTYLE_COLOR},
@ -218,12 +226,14 @@ static const style_tbl_entry_t style_tbl[] = {
{attrLeft, DISPID_IHTMLSTYLE_LEFT},
{attrLetterSpacing, DISPID_IHTMLSTYLE_LETTERSPACING},
{attrLineHeight, DISPID_IHTMLSTYLE_LINEHEIGHT},
{attrListStyleType, DISPID_IHTMLSTYLE_LISTSTYLETYPE},
{attrMargin, DISPID_IHTMLSTYLE_MARGIN},
{attrMarginBottom, DISPID_IHTMLSTYLE_MARGINBOTTOM},
{attrMarginLeft, DISPID_IHTMLSTYLE_MARGINLEFT},
{attrMarginRight, DISPID_IHTMLSTYLE_MARGINRIGHT},
{attrMarginTop, DISPID_IHTMLSTYLE_MARGINTOP},
{attrMinHeight, DISPID_IHTMLSTYLE4_MINHEIGHT},
{attrOutline, DISPID_IHTMLSTYLE6_OUTLINE},
{attrOverflow, DISPID_IHTMLSTYLE_OVERFLOW},
{attrOverflowX, DISPID_IHTMLSTYLE2_OVERFLOWX},
{attrOverflowY, DISPID_IHTMLSTYLE2_OVERFLOWY},
@ -447,7 +457,7 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
DWORD len;
if(!*val) {
*p = NULL;
*p = (flags & ATTR_NO_NULL) ? SysAllocStringLen(NULL, 0) : NULL;
return S_OK;
}
@ -2144,15 +2154,19 @@ static HRESULT WINAPI HTMLStyle_get_visibility(IHTMLStyle *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle_put_listStyleType(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_style_attr(This, STYLEID_LISTSTYLETYPE, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_style_attr(This, STYLEID_LISTSTYLETYPE, p);
}
static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v)
@ -3091,11 +3105,9 @@ static dispex_static_data_t HTMLStyle_dispex = {
HTMLStyle_iface_tids
};
HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret)
static HRESULT get_style_from_elem(HTMLElement *elem, nsIDOMCSSStyleDeclaration **ret)
{
nsIDOMElementCSSInlineStyle *nselemstyle;
nsIDOMCSSStyleDeclaration *nsstyle;
HTMLStyle *style;
nsresult nsres;
if(!elem->nselem) {
@ -3107,13 +3119,26 @@ HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret)
(void**)&nselemstyle);
assert(nsres == NS_OK);
nsres = nsIDOMElementCSSInlineStyle_GetStyle(nselemstyle, &nsstyle);
nsres = nsIDOMElementCSSInlineStyle_GetStyle(nselemstyle, ret);
nsIDOMElementCSSInlineStyle_Release(nselemstyle);
if(NS_FAILED(nsres)) {
ERR("GetStyle failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
}
HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret)
{
nsIDOMCSSStyleDeclaration *nsstyle;
HTMLStyle *style;
HRESULT hres;
hres = get_style_from_elem(elem, &nsstyle);
if(FAILED(hres))
return hres;
style = heap_alloc_zero(sizeof(HTMLStyle));
if(!style) {
nsIDOMCSSStyleDeclaration_Release(nsstyle);
@ -3134,3 +3159,31 @@ HRESULT HTMLStyle_Create(HTMLElement *elem, HTMLStyle **ret)
*ret = style;
return S_OK;
}
HRESULT get_elem_style(HTMLElement *elem, styleid_t styleid, BSTR *ret)
{
nsIDOMCSSStyleDeclaration *style;
HRESULT hres;
hres = get_style_from_elem(elem, &style);
if(FAILED(hres))
return hres;
hres = get_nsstyle_attr(style, styleid, ret, 0);
nsIDOMCSSStyleDeclaration_Release(style);
return hres;
}
HRESULT set_elem_style(HTMLElement *elem, styleid_t styleid, const WCHAR *val)
{
nsIDOMCSSStyleDeclaration *style;
HRESULT hres;
hres = get_style_from_elem(elem, &style);
if(FAILED(hres))
return hres;
hres = set_nsstyle_attr(style, styleid, val, 0);
nsIDOMCSSStyleDeclaration_Release(style);
return hres;
}

View file

@ -61,6 +61,7 @@ typedef enum {
STYLEID_BORDER_TOP_WIDTH,
STYLEID_BORDER_WIDTH,
STYLEID_BOTTOM,
STYLEID_BOX_SIZING,
STYLEID_CLEAR,
STYLEID_CLIP,
STYLEID_COLOR,
@ -77,12 +78,14 @@ typedef enum {
STYLEID_LEFT,
STYLEID_LETTER_SPACING,
STYLEID_LINE_HEIGHT,
STYLEID_LISTSTYLETYPE,
STYLEID_MARGIN,
STYLEID_MARGIN_BOTTOM,
STYLEID_MARGIN_LEFT,
STYLEID_MARGIN_RIGHT,
STYLEID_MARGIN_TOP,
STYLEID_MIN_HEIGHT,
STYLEID_OUTLINE,
STYLEID_OVERFLOW,
STYLEID_OVERFLOW_X,
STYLEID_OVERFLOW_Y,
@ -118,8 +121,12 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration*,styleid_t,LPCWSTR,DWORD) DEC
HRESULT set_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *value, DWORD flags) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_attr_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p, DWORD flags) DECLSPEC_HIDDEN;
HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
#define ATTR_FIX_PX 0x0001
#define ATTR_FIX_URL 0x0002
#define ATTR_STR_TO_INT 0x0004
#define ATTR_HEX_INT 0x0008
#define ATTR_REMOVE_COMMA 0x0010
#define ATTR_NO_NULL 0x0020

View file

@ -688,15 +688,19 @@ static HRESULT WINAPI HTMLStyle6_get_counterReset(IHTMLStyle6 *iface, BSTR *p)
static HRESULT WINAPI HTMLStyle6_put_outline(IHTMLStyle6 *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_nsstyle_attr(This->nsstyle, STYLEID_OUTLINE, v, 0);
}
static HRESULT WINAPI HTMLStyle6_get_outline(IHTMLStyle6 *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_OUTLINE, p, ATTR_NO_NULL);
}
static HRESULT WINAPI HTMLStyle6_put_outlineWidth(IHTMLStyle6 *iface, VARIANT v)
@ -744,15 +748,19 @@ static HRESULT WINAPI HTMLStyle6_get_outlineColor(IHTMLStyle6 *iface, VARIANT *p
static HRESULT WINAPI HTMLStyle6_put_boxSizing(IHTMLStyle6 *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
TRACE("(%p)->(%s)\n", This, debugstr_w(v));
return set_nsstyle_attr(This->nsstyle, STYLEID_BOX_SIZING, v, 0);
}
static HRESULT WINAPI HTMLStyle6_get_boxSizing(IHTMLStyle6 *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle6(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_nsstyle_attr(This->nsstyle, STYLEID_BOX_SIZING, p, 0);
}
static HRESULT WINAPI HTMLStyle6_put_boxSpacing(IHTMLStyle6 *iface, BSTR v)

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