[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.

This commit is contained in:
Hermès Bélusca-Maïto 2020-08-20 17:47:40 +02:00
parent ec0853ba70
commit 3c722e35b1
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
8 changed files with 23 additions and 17 deletions

View file

@ -380,12 +380,12 @@ MainWndCommand(PMAIN_WND_INFO Info,
WORD CmdId,
HWND hControl)
{
UNREFERENCED_PARAMETER(hControl);
WCHAR szAppName[256];
WCHAR szAppAuthors[256];
HICON hIcon;
UNREFERENCED_PARAMETER(hControl);
switch (CmdId)
{
case ID_PROP:

View file

@ -409,11 +409,13 @@ INT Batch(LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd)
/* Perform top-level batch initialization */
if (bTopLevel)
{
TCHAR *dot;
/* Default the top-level batch context type to .BAT */
BatType = BAT_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"))))
{
BatType = CMD_TYPE;

View file

@ -474,6 +474,7 @@ RecycleBin5_RecycleBin5_Restore(
DELETED_FILE_RECORD *pRecord, *pLast;
DWORD dwEntries, i;
SHFILEOPSTRUCTW op;
int res;
TRACE("(%p, %s, %p)\n", This, debugstr_w(pDeletedFileName), pDeletedFile);
@ -503,7 +504,7 @@ RecycleBin5_RecycleBin5_Restore(
op.pFrom = pDeletedFileName;
op.pTo = pDeletedFile->FileNameW;
int res = SHFileOperationW(&op);
res = SHFileOperationW(&op);
if (res)
{
ERR("SHFileOperationW failed with 0x%x\n", res);

View file

@ -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+
* 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 ";
TRACE("(%s, %p)n", debugstr_w(commandLine), parent);
wcscat(parameters, commandLine);
return ((INT_PTR)ShellExecuteW(parent, L"open", L"rundll32.exe", parameters, NULL, SW_SHOWNORMAL) > 32);

View file

@ -16,6 +16,7 @@ static void execute_test(LPCWSTR DllFile)
HRESULT hr;
HANDLE hEvent;
DWORD dwRet;
HMODULE mod;
hEvent = CreateEventA(NULL, TRUE, FALSE, "Local\\shlwapi_apitest_evt");
@ -24,7 +25,7 @@ static void execute_test(LPCWSTR DllFile)
ok_hex(dwRet, WAIT_TIMEOUT);
// Ensure the module is not loaded yet...
HMODULE mod = GetModuleHandleW(DllFile);
mod = GetModuleHandleW(DllFile);
if (mod != NULL)
{
CloseHandle(hEvent);

View file

@ -61,26 +61,26 @@ static void test_Sid_Null(void)
START_TEST(CachedGetUserFromSid)
{
const char szFunction[] = "CachedGetUserFromSid";
void* pFunction;
// TODO: Dynamically checking, until ReactOS implements this dll.
HMODULE hModule = LoadLibraryW(L"utildll.dll");
DWORD dwLE = GetLastError();
HMODULE hModule;
DWORD dwLE;
hModule = LoadLibraryW(L"utildll.dll");
if (!hModule)
{
dwLE = GetLastError();
ok(FALSE, "LoadLibraryW(\"%S\") failed! (dwLE = %lu)\n", L"utildll.dll", dwLE);
skip("No DLL\n");
return;
}
void *pFunction = (void *)GetProcAddress(hModule, szFunction);
dwLE = GetLastError();
pFunction = (void*)GetProcAddress(hModule, szFunction);
if (!pFunction)
{
dwLE = GetLastError();
ok(FALSE, "GetProcAddress(\"%s\") failed! (dwLE = %lu)\n", szFunction, dwLE);
skip("No function\n");
FreeLibrary(hModule);
return;

View file

@ -2404,6 +2404,8 @@ PipDeviceActionWorker(
PLIST_ENTRY ListEntry;
PDEVICE_ACTION_REQUEST Request;
KIRQL OldIrql;
PDEVICE_NODE deviceNode;
NTSTATUS status;
KeAcquireSpinLock(&IopDeviceActionLock, &OldIrql);
while (!IsListEmpty(&IopDeviceActionRequestList))
@ -2414,10 +2416,10 @@ PipDeviceActionWorker(
ASSERT(Request->DeviceObject);
PDEVICE_NODE deviceNode = IopGetDeviceNode(Request->DeviceObject);
deviceNode = IopGetDeviceNode(Request->DeviceObject);
ASSERT(deviceNode);
NTSTATUS status = STATUS_SUCCESS;
status = STATUS_SUCCESS;
DPRINT("Processing PnP request %p: DeviceObject - %p, Action - %s\n",
Request, Request->DeviceObject, ActionToStr(Request->Action));

View file

@ -435,9 +435,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command
break;
case 1:
{
JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
JOB_INFO_1W *info1W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info1W));
ZeroMemory( info1W, sizeof(JOB_INFO_1W) );
JOB_INFO_1A *info1A = (JOB_INFO_1A*)pJobInfo;
JobW = (LPBYTE)info1W;
info1W->pUserName = AsciiToUnicode(&usBuffer, info1A->pUserName);
@ -452,9 +452,9 @@ SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command
}
case 2:
{
JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
JOB_INFO_2W *info2W = HeapAlloc(GetProcessHeap(), 0, sizeof(*info2W));
ZeroMemory( info2W, sizeof(JOB_INFO_2W) );
JOB_INFO_2A *info2A = (JOB_INFO_2A*)pJobInfo;
JobW = (LPBYTE)info2W;
info2W->pUserName = AsciiToUnicode(&usBuffer, info2A->pUserName);