mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.
This commit is contained in:
parent
ec0853ba70
commit
3c722e35b1
|
@ -380,12 +380,12 @@ MainWndCommand(PMAIN_WND_INFO Info,
|
||||||
WORD CmdId,
|
WORD CmdId,
|
||||||
HWND hControl)
|
HWND hControl)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(hControl);
|
|
||||||
|
|
||||||
WCHAR szAppName[256];
|
WCHAR szAppName[256];
|
||||||
WCHAR szAppAuthors[256];
|
WCHAR szAppAuthors[256];
|
||||||
HICON hIcon;
|
HICON hIcon;
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(hControl);
|
||||||
|
|
||||||
switch (CmdId)
|
switch (CmdId)
|
||||||
{
|
{
|
||||||
case ID_PROP:
|
case ID_PROP:
|
||||||
|
|
|
@ -409,11 +409,13 @@ INT Batch(LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd)
|
||||||
/* Perform top-level batch initialization */
|
/* Perform top-level batch initialization */
|
||||||
if (bTopLevel)
|
if (bTopLevel)
|
||||||
{
|
{
|
||||||
|
TCHAR *dot;
|
||||||
|
|
||||||
/* Default the top-level batch context type to .BAT */
|
/* Default the top-level batch context type to .BAT */
|
||||||
BatType = BAT_TYPE;
|
BatType = BAT_TYPE;
|
||||||
|
|
||||||
/* If this is a .CMD file, adjust the type */
|
/* If this is a .CMD file, adjust the type */
|
||||||
TCHAR *dot = _tcsrchr(bc->BatchFilePath, _T('.'));
|
dot = _tcsrchr(bc->BatchFilePath, _T('.'));
|
||||||
if (dot && (!_tcsicmp(dot, _T(".cmd"))))
|
if (dot && (!_tcsicmp(dot, _T(".cmd"))))
|
||||||
{
|
{
|
||||||
BatType = CMD_TYPE;
|
BatType = CMD_TYPE;
|
||||||
|
|
|
@ -474,6 +474,7 @@ RecycleBin5_RecycleBin5_Restore(
|
||||||
DELETED_FILE_RECORD *pRecord, *pLast;
|
DELETED_FILE_RECORD *pRecord, *pLast;
|
||||||
DWORD dwEntries, i;
|
DWORD dwEntries, i;
|
||||||
SHFILEOPSTRUCTW op;
|
SHFILEOPSTRUCTW op;
|
||||||
|
int res;
|
||||||
|
|
||||||
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
|
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
|
||||||
|
|
||||||
|
@ -503,7 +504,7 @@ RecycleBin5_RecycleBin5_Restore(
|
||||||
op.pFrom = pDeletedFileName;
|
op.pFrom = pDeletedFileName;
|
||||||
op.pTo = pDeletedFile->FileNameW;
|
op.pTo = pDeletedFile->FileNameW;
|
||||||
|
|
||||||
int res = SHFileOperationW(&op);
|
res = SHFileOperationW(&op);
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
ERR("SHFileOperationW failed with 0x%x\n", res);
|
ERR("SHFileOperationW failed with 0x%x\n", res);
|
||||||
|
|
|
@ -1486,8 +1486,8 @@ BOOL WINAPI SHRunControlPanel (_In_ LPCWSTR commandLine, _In_opt_ HWND parent)
|
||||||
* However we need to keep it "alive" even when ReactOS is compliled as NT6+
|
* However we need to keep it "alive" even when ReactOS is compliled as NT6+
|
||||||
* in order to keep control panel elements launch commands.
|
* in order to keep control panel elements launch commands.
|
||||||
*/
|
*/
|
||||||
TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
|
|
||||||
WCHAR parameters[MAX_PATH] = L"shell32.dll,Control_RunDLL ";
|
WCHAR parameters[MAX_PATH] = L"shell32.dll,Control_RunDLL ";
|
||||||
|
TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
|
||||||
wcscat(parameters, commandLine);
|
wcscat(parameters, commandLine);
|
||||||
|
|
||||||
return ((INT_PTR)ShellExecuteW(parent, L"open", L"rundll32.exe", parameters, NULL, SW_SHOWNORMAL) > 32);
|
return ((INT_PTR)ShellExecuteW(parent, L"open", L"rundll32.exe", parameters, NULL, SW_SHOWNORMAL) > 32);
|
||||||
|
|
|
@ -16,6 +16,7 @@ static void execute_test(LPCWSTR DllFile)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
HANDLE hEvent;
|
HANDLE hEvent;
|
||||||
DWORD dwRet;
|
DWORD dwRet;
|
||||||
|
HMODULE mod;
|
||||||
|
|
||||||
hEvent = CreateEventA(NULL, TRUE, FALSE, "Local\\shlwapi_apitest_evt");
|
hEvent = CreateEventA(NULL, TRUE, FALSE, "Local\\shlwapi_apitest_evt");
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ static void execute_test(LPCWSTR DllFile)
|
||||||
ok_hex(dwRet, WAIT_TIMEOUT);
|
ok_hex(dwRet, WAIT_TIMEOUT);
|
||||||
|
|
||||||
// Ensure the module is not loaded yet...
|
// Ensure the module is not loaded yet...
|
||||||
HMODULE mod = GetModuleHandleW(DllFile);
|
mod = GetModuleHandleW(DllFile);
|
||||||
if (mod != NULL)
|
if (mod != NULL)
|
||||||
{
|
{
|
||||||
CloseHandle(hEvent);
|
CloseHandle(hEvent);
|
||||||
|
|
|
@ -61,26 +61,26 @@ static void test_Sid_Null(void)
|
||||||
START_TEST(CachedGetUserFromSid)
|
START_TEST(CachedGetUserFromSid)
|
||||||
{
|
{
|
||||||
const char szFunction[] = "CachedGetUserFromSid";
|
const char szFunction[] = "CachedGetUserFromSid";
|
||||||
|
void* pFunction;
|
||||||
|
|
||||||
// TODO: Dynamically checking, until ReactOS implements this dll.
|
// TODO: Dynamically checking, until ReactOS implements this dll.
|
||||||
HMODULE hModule = LoadLibraryW(L"utildll.dll");
|
HMODULE hModule;
|
||||||
DWORD dwLE = GetLastError();
|
DWORD dwLE;
|
||||||
|
|
||||||
|
hModule = LoadLibraryW(L"utildll.dll");
|
||||||
if (!hModule)
|
if (!hModule)
|
||||||
{
|
{
|
||||||
|
dwLE = GetLastError();
|
||||||
ok(FALSE, "LoadLibraryW(\"%S\") failed! (dwLE = %lu)\n", L"utildll.dll", dwLE);
|
ok(FALSE, "LoadLibraryW(\"%S\") failed! (dwLE = %lu)\n", L"utildll.dll", dwLE);
|
||||||
|
|
||||||
skip("No DLL\n");
|
skip("No DLL\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *pFunction = (void *)GetProcAddress(hModule, szFunction);
|
pFunction = (void*)GetProcAddress(hModule, szFunction);
|
||||||
dwLE = GetLastError();
|
|
||||||
|
|
||||||
if (!pFunction)
|
if (!pFunction)
|
||||||
{
|
{
|
||||||
|
dwLE = GetLastError();
|
||||||
ok(FALSE, "GetProcAddress(\"%s\") failed! (dwLE = %lu)\n", szFunction, dwLE);
|
ok(FALSE, "GetProcAddress(\"%s\") failed! (dwLE = %lu)\n", szFunction, dwLE);
|
||||||
|
|
||||||
skip("No function\n");
|
skip("No function\n");
|
||||||
FreeLibrary(hModule);
|
FreeLibrary(hModule);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2404,6 +2404,8 @@ PipDeviceActionWorker(
|
||||||
PLIST_ENTRY ListEntry;
|
PLIST_ENTRY ListEntry;
|
||||||
PDEVICE_ACTION_REQUEST Request;
|
PDEVICE_ACTION_REQUEST Request;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
PDEVICE_NODE deviceNode;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
KeAcquireSpinLock(&IopDeviceActionLock, &OldIrql);
|
KeAcquireSpinLock(&IopDeviceActionLock, &OldIrql);
|
||||||
while (!IsListEmpty(&IopDeviceActionRequestList))
|
while (!IsListEmpty(&IopDeviceActionRequestList))
|
||||||
|
@ -2414,10 +2416,10 @@ PipDeviceActionWorker(
|
||||||
|
|
||||||
ASSERT(Request->DeviceObject);
|
ASSERT(Request->DeviceObject);
|
||||||
|
|
||||||
PDEVICE_NODE deviceNode = IopGetDeviceNode(Request->DeviceObject);
|
deviceNode = IopGetDeviceNode(Request->DeviceObject);
|
||||||
ASSERT(deviceNode);
|
ASSERT(deviceNode);
|
||||||
|
|
||||||
NTSTATUS status = STATUS_SUCCESS;
|
status = STATUS_SUCCESS;
|
||||||
|
|
||||||
DPRINT("Processing PnP request %p: DeviceObject - %p, Action - %s\n",
|
DPRINT("Processing PnP request %p: DeviceObject - %p, Action - %s\n",
|
||||||
Request, Request->DeviceObject, ActionToStr(Request->Action));
|
Request, Request->DeviceObject, ActionToStr(Request->Action));
|
||||||
|
|
|
@ -435,9 +435,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
|
JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
|
||||||
JOB_INFO_1W *info1W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info1W));
|
JOB_INFO_1W *info1W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info1W));
|
||||||
ZeroMemory( info1W, sizeof(JOB_INFO_1W) );
|
ZeroMemory( info1W, sizeof(JOB_INFO_1W) );
|
||||||
JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
|
|
||||||
|
|
||||||
JobW = (LPBYTE)info1W;
|
JobW = (LPBYTE)info1W;
|
||||||
info1W->pUserName = AsciiToUnicode(&usBuffer, info1A->pUserName);
|
info1W->pUserName = AsciiToUnicode(&usBuffer, info1A->pUserName);
|
||||||
|
@ -452,9 +452,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
|
JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
|
||||||
JOB_INFO_2W *info2W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info2W));
|
JOB_INFO_2W *info2W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info2W));
|
||||||
ZeroMemory( info2W, sizeof(JOB_INFO_2W) );
|
ZeroMemory( info2W, sizeof(JOB_INFO_2W) );
|
||||||
JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
|
|
||||||
|
|
||||||
JobW = (LPBYTE)info2W;
|
JobW = (LPBYTE)info2W;
|
||||||
info2W->pUserName = AsciiToUnicode(&usBuffer, info2A->pUserName);
|
info2W->pUserName = AsciiToUnicode(&usBuffer, info2A->pUserName);
|
||||||
|
|
Loading…
Reference in a new issue