/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
}
broken:
- DPRINT("InternalIsOS2OrOldWin(): Binary file seems to be broken\n");
+ WARN("InternalIsOS2OrOldWin(): Binary file seems to be broken\n");
done:
HeapFree(GetProcessHeap(), 0, modtab);
}
}
- DPRINT1("Invalid binary type returned!\n", BinType);
+ ERR("Invalid binary type returned!\n", BinType);
return FALSE;
}
*/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/*
* @implemented
/* INCLUDES ****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
switch (ProgressResult)
{
case PROGRESS_CANCEL:
- DPRINT("Progress callback requested cancel\n");
+ TRACE("Progress callback requested cancel\n");
errCode = STATUS_REQUEST_ABORTED;
break;
case PROGRESS_STOP:
- DPRINT("Progress callback requested stop\n");
+ TRACE("Progress callback requested stop\n");
errCode = STATUS_REQUEST_ABORTED;
*KeepDest = TRUE;
break;
}
else
{
- DPRINT("Error 0x%08x reading writing to dest\n", errCode);
+ WARN("Error 0x%08x reading writing to dest\n", errCode);
}
}
else if (!NT_SUCCESS(errCode))
}
else
{
- DPRINT("Error 0x%08x reading from source\n", errCode);
+ WARN("Error 0x%08x reading from source\n", errCode);
}
}
}
if (! EndOfFileFound && (NULL != pbCancel && *pbCancel))
{
- DPRINT("User requested cancel\n");
+ TRACE("User requested cancel\n");
errCode = STATUS_REQUEST_ABORTED;
}
}
else
{
- DPRINT("Error 0x%08x allocating buffer of %d bytes\n", errCode, RegionSize);
+ TRACE("Error 0x%08x allocating buffer of %d bytes\n", errCode, RegionSize);
}
return errCode;
FileBasicInformation);
if (!NT_SUCCESS(errCode))
{
- DPRINT("Error 0x%08x obtaining FileBasicInformation\n", errCode);
+ WARN("Error 0x%08x obtaining FileBasicInformation\n", errCode);
}
else
{
FileBasicInformation);
if (!NT_SUCCESS(errCode))
{
- DPRINT("Error 0x%0x setting LastWriteTime\n", errCode);
+ WARN("Error 0x%0x setting LastWriteTime\n", errCode);
}
}
FileStandardInformation);
if (!NT_SUCCESS(errCode))
{
- DPRINT("Status 0x%08x obtaining FileStandardInformation for source\n", errCode);
+ TRACE("Status 0x%08x obtaining FileStandardInformation for source\n", errCode);
SetLastErrorByStatus(errCode);
}
else
FileBasicInformation);
if (!NT_SUCCESS(errCode))
{
- DPRINT("Status 0x%08x obtaining FileBasicInformation for source\n", errCode);
+ TRACE("Status 0x%08x obtaining FileBasicInformation for source\n", errCode);
SetLastErrorByStatus(errCode);
}
else
}
else
{
- DPRINT("Error %d during opening of dest file\n", GetLastError());
+ WARN("Error %d during opening of dest file\n", GetLastError());
}
}
}
}
else
{
- DPRINT("Error %d during opening of source file\n", GetLastError());
+ WARN("Error %d during opening of source file\n", GetLastError());
}
return RC;
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
#define SYMLINK_FLAG_RELATIVE 1
PWCHAR FileNameW;
HANDLE FileHandle;
- DPRINT("CreateFileA(lpFileName %s)\n",lpFileName);
+ TRACE("CreateFileA(lpFileName %s)\n",lpFileName);
if (!(FileNameW = FilenameA2W(lpFileName, FALSE)))
return INVALID_HANDLE_VALUE;
PVOID EaBuffer = NULL;
ULONG EaLength = 0;
- DPRINT("CreateFileW(lpFileName %S)\n",lpFileName);
+ TRACE("CreateFileW(lpFileName %S)\n",lpFileName);
/* validate & translate the creation disposition */
switch (dwCreationDisposition)
NULL,
NULL))
{
- DPRINT("Invalid path\n");
+ WARN("Invalid path\n");
SetLastError(ERROR_PATH_NOT_FOUND);
return INVALID_HANDLE_VALUE;
}
- DPRINT("NtPathU \'%wZ\'\n", &NtPathU);
+ TRACE("NtPathU \'%wZ\'\n", &NtPathU);
if (hTemplateFile != NULL)
{
/* INCLUDES ******************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* GLOBAL VARIABLES **********************************************************/
{
PWCHAR PathNameW;
- DPRINT("setcurrdir: %s\n",lpPathName);
+ TRACE("setcurrdir: %s\n",lpPathName);
if (!(PathNameW = FilenameA2W(lpPathName, FALSE)))
return FALSE;
WCHAR tmp_full_path[MAX_PATH];
UINT ret;
- DPRINT("GetTempPathW(%lu,%p)\n", count, path);
+ TRACE("GetTempPathW(%lu,%p)\n", count, path);
if (!(ret = GetEnvironmentVariableW( L"TMP", tmp_path, MAX_PATH )))
if (!(ret = GetEnvironmentVariableW( L"TEMP", tmp_path, MAX_PATH )))
path[0] = 0; /* avoid returning ambiguous "X:" */
}
- DPRINT("GetTempPathW returning %u, %s\n", ret, path);
+ TRACE("GetTempPathW returning %u, %s\n", ret, path);
return ret;
}
)
{
#ifdef _WIN64
- DPRINT1("GetSystemWow64DirectoryW is UNIMPLEMENTED!\n");
+ ERR("GetSystemWow64DirectoryW is UNIMPLEMENTED!\n");
return 0;
#else
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
/* INCLUDES ****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
HANDLE FileHandle;
NTSTATUS Status;
- DPRINT("DeleteFileW (lpFileName %S)\n",lpFileName);
+ TRACE("DeleteFileW (lpFileName %S)\n",lpFileName);
if (!RtlDosPathNameToNtPathName_U (lpFileName,
&NtPathU,
return FALSE;
}
- DPRINT("NtPathU \'%wZ\'\n", &NtPathU);
+ TRACE("NtPathU \'%wZ\'\n", &NtPathU);
InitializeObjectAttributes(&ObjectAttributes,
&NtPathU,
if (!NT_SUCCESS(Status))
{
- CHECKPOINT;
+ WARN("Status 0x%08x\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
FileDispositionInformation);
if (!NT_SUCCESS(Status))
{
- CHECKPOINT;
+ WARN("Status 0x%08x\n", Status);
NtClose (FileHandle);
SetLastErrorByStatus (Status);
return FALSE;
Status = NtClose (FileHandle);
if (!NT_SUCCESS (Status))
{
- CHECKPOINT;
+ WARN("Status 0x%08x\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
*/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/*
* @implemented
if (WaitStatus == WAIT_FAILED)
{
- DPRINT("Wait failed!\n");
+ WARN("Wait failed!\n");
/* WaitForSingleObjectEx sets the last error */
return FALSE;
}
/* INCLUDES ******************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
UNICODE_STRING DllDirectory = {0, 0, NULL};
HANDLE DirectoryHandle = NULL;
NTSTATUS Status;
- DPRINT ("lpPathName %S lpSecurityAttributes %p\n",
+ TRACE ("lpPathName %S lpSecurityAttributes %p\n",
lpPathName, lpSecurityAttributes);
if (!RtlDosPathNameToNtPathName_U (lpPathName,
if (!NT_SUCCESS(Status))
{
- DPRINT("NtCreateFile failed with Status %lx\n", Status);
+ WARN("NtCreateFile failed with Status %lx\n", Status);
SetLastErrorByStatus(Status);
return FALSE;
}
DesiredAccess = FILE_LIST_DIRECTORY | SYNCHRONIZE | FILE_WRITE_ATTRIBUTES |
FILE_READ_ATTRIBUTES;
- DPRINT ("lpTemplateDirectory %ws lpNewDirectory %ws lpSecurityAttributes %p\n",
+ TRACE ("lpTemplateDirectory %ws lpNewDirectory %ws lpSecurityAttributes %p\n",
lpTemplateDirectory, lpNewDirectory, lpSecurityAttributes);
/*
the directory without FILE_OPEN_REPARSE_POINT */
OpenOptions &= ~FILE_OPEN_REPARSE_POINT;
- DPRINT("Reparse points not supported, try with less options\n");
+ TRACE("Reparse points not supported, try with less options\n");
/* try again */
goto OpenTemplateDir;
}
else
{
- DPRINT1("Failed to open the template directory: 0x%x\n", Status);
+ WARN("Failed to open the template directory: 0x%x\n", Status);
goto CleanupNoNtPath;
}
}
&NtTemplatePathU,
TRUE))
{
- DPRINT1("Both directory paths are the same!\n");
+ WARN("Both directory paths are the same!\n");
Status = STATUS_OBJECT_NAME_INVALID;
goto Cleanup;
}
FileBasicInformation);
if (!NT_SUCCESS(Status))
{
- DPRINT1("Failed to query the basic directory attributes\n");
+ WARN("Failed to query the basic directory attributes\n");
goto Cleanup;
}
if (!NT_SUCCESS(Status))
{
- DPRINT1("Querying the EA data failed: 0x%x\n", Status);
+ WARN("Querying the EA data failed: 0x%x\n", Status);
goto Cleanup;
}
(Status == STATUS_INVALID_PARAMETER || Status == STATUS_ACCESS_DENIED))
{
/* The FS doesn't seem to support reparse points... */
- DPRINT1("Cannot copy the hardlink, destination doesn\'t support reparse points!\n");
+ WARN("Cannot copy the hardlink, destination doesn\'t support reparse points!\n");
}
goto Cleanup;
if (!NT_SUCCESS(Status))
{
/* fail, we were unable to read the reparse point data! */
- DPRINT1("Querying or setting the reparse point failed: 0x%x\n", Status);
+ WARN("Querying or setting the reparse point failed: 0x%x\n", Status);
goto Cleanup;
}
}
{
PWCHAR PathNameW;
- DPRINT("RemoveDirectoryA(%s)\n",lpPathName);
+ TRACE("RemoveDirectoryA(%s)\n",lpPathName);
if (!(PathNameW = FilenameA2W(lpPathName, FALSE)))
return FALSE;
HANDLE DirectoryHandle = NULL;
NTSTATUS Status;
- DPRINT("lpPathName %S\n", lpPathName);
+ TRACE("lpPathName %S\n", lpPathName);
if (!RtlDosPathNameToNtPathName_U (lpPathName,
&NtPathU,
NULL,
NULL);
- DPRINT("NtPathU '%S'\n", NtPathU.Buffer);
+ TRACE("NtPathU '%S'\n", NtPathU.Buffer);
Status = NtCreateFile (&DirectoryHandle,
DELETE,
if (!NT_SUCCESS(Status))
{
- CHECKPOINT;
+ WARN("Status 0x%08x\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
DWORD ret;
LPWSTR FilePartW = NULL;
- DPRINT("GetFullPathNameA(lpFileName %s, nBufferLength %d, lpBuffer %p, "
+ TRACE("GetFullPathNameA(lpFileName %s, nBufferLength %d, lpBuffer %p, "
"lpFilePart %p)\n",lpFileName,nBufferLength,lpBuffer,lpFilePart);
if (!lpFileName)
*lpFilePart = (FilePartW - BufferW) + lpBuffer;
}
- DPRINT("GetFullPathNameA ret: lpBuffer %s lpFilePart %s\n",
+ TRACE("GetFullPathNameA ret: lpBuffer %s lpFilePart %s\n",
lpBuffer, (lpFilePart == NULL) ? "NULL" : *lpFilePart);
return ret;
{
ULONG Length;
- DPRINT("GetFullPathNameW(lpFileName %S, nBufferLength %d, lpBuffer %p, "
+ TRACE("GetFullPathNameW(lpFileName %S, nBufferLength %d, lpBuffer %p, "
"lpFilePart %p)\n",lpFileName,nBufferLength,lpBuffer,lpFilePart);
Length = RtlGetFullPathName_U ((LPWSTR)lpFileName,
lpBuffer,
lpFilePart);
- DPRINT("GetFullPathNameW ret: lpBuffer %S lpFilePart %S Length %ld\n",
+ TRACE("GetFullPathNameW ret: lpBuffer %S lpFilePart %S Length %ld\n",
lpBuffer, (lpFilePart == NULL) ? L"NULL" : *lpFilePart, Length / sizeof(WCHAR));
return Length/sizeof(WCHAR);
UNICODE_STRING ustr;
WCHAR ustr_buf[8+1+3+1];
- DPRINT("GetShortPathNameW: %S\n",longpath);
+ TRACE("GetShortPathNameW: %S\n",longpath);
if (!longpath)
{
LPCWSTR p;
PWCHAR Name;
- DPRINT("SearchPath\n");
+ TRACE("SearchPath\n");
HasExtension = FALSE;
p = lpFileName + wcslen(lpFileName);
return 0;
}
- DPRINT("GetLongPathNameW(%s,%p,%ld)\n", shortpath, longpath, longlen);
+ TRACE("GetLongPathNameW(%s,%p,%ld)\n", shortpath, longpath, longlen);
if (shortpath[0] == '\\' && shortpath[1] == '\\')
{
- DPRINT1("ERR: UNC pathname %s\n", shortpath);
+ WARN("ERR: UNC pathname %s\n", shortpath);
lstrcpynW( longpath, shortpath, longlen );
return wcslen(longpath);
}
goit = FindFirstFileW(tmplongpath, &wfd);
if (goit == INVALID_HANDLE_VALUE)
{
- DPRINT("not found %s!\n", tmplongpath);
+ TRACE("not found %s!\n", tmplongpath);
SetLastError ( ERROR_FILE_NOT_FOUND );
return 0;
}
if (tmplen <= longlen)
{
wcscpy(longpath, tmplongpath);
- DPRINT("returning %s\n", longpath);
+ TRACE("returning %s\n", longpath);
tmplen--; /* length without 0 */
}
WCHAR longpathW[MAX_PATH];
DWORD ret;
- DPRINT("GetLongPathNameA %s, %i\n",shortpath,longlen );
+ TRACE("GetLongPathNameA %s, %i\n",shortpath,longlen );
if (!(shortpathW = FilenameA2W( shortpath, FALSE )))
return 0;
/* INCLUDES ******************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS *****************************************************************/
&ObjectAttributes);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtOpenDirectoryObject() failed (Status %lx)\n", Status);
+ WARN ("NtOpenDirectoryObject() failed (Status %lx)\n", Status);
SetLastErrorByStatus (Status);
return 0;
}
&ObjectAttributes);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtOpenSymbolicLinkObject() failed (Status %lx)\n", Status);
+ WARN ("NtOpenSymbolicLinkObject() failed (Status %lx)\n", Status);
NtClose (DirectoryHandle);
SetLastErrorByStatus (Status);
return 0;
NtClose (DirectoryHandle);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtQuerySymbolicLinkObject() failed (Status %lx)\n", Status);
+ WARN ("NtQuerySymbolicLinkObject() failed (Status %lx)\n", Status);
SetLastErrorByStatus (Status);
return 0;
}
- DPRINT ("ReturnLength: %lu\n", ReturnLength);
- DPRINT ("TargetLength: %hu\n", UnicodeString.Length);
- DPRINT ("Target: '%wZ'\n", &UnicodeString);
+ TRACE ("ReturnLength: %lu\n", ReturnLength);
+ TRACE ("TargetLength: %hu\n", UnicodeString.Length);
+ TRACE ("Target: '%wZ'\n", &UnicodeString);
Length = ReturnLength / sizeof(WCHAR);
if (Length < ucchMax)
}
else
{
- DPRINT ("Buffer is too small\n");
+ TRACE ("Buffer is too small\n");
SetLastErrorByStatus (STATUS_BUFFER_TOO_SMALL);
return 0;
}
if (!wcscmp (DirInfo->TypeName.Buffer, L"SymbolicLink"))
{
- DPRINT ("Name: '%wZ'\n", &DirInfo->Name);
+ TRACE ("Name: '%wZ'\n", &DirInfo->Name);
NameLength = DirInfo->Name.Length / sizeof(WCHAR);
if (Length + NameLength + 1 >= ucchMax)
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* GLOBALS ******************************************************************/
PWCHAR FilePart;
ULONG Len;
- DPRINT("OpenFile('%s', lpReOpenBuff %x, uStyle %x)\n", lpFileName, lpReOpenBuff, uStyle);
+ TRACE("OpenFile('%s', lpReOpenBuff %x, uStyle %x)\n", lpFileName, lpReOpenBuff, uStyle);
if (lpReOpenBuff == NULL)
{
IO_STATUS_BLOCK IoStatusBlock;
LARGE_INTEGER Distance;
- DPRINT("SetFilePointer(hFile %x, lDistanceToMove %d, dwMoveMethod %d)\n",
+ TRACE("SetFilePointer(hFile %x, lDistanceToMove %d, dwMoveMethod %d)\n",
hFile,lDistanceToMove,dwMoveMethod);
if(IsConsoleHandle(hFile))
NTSTATUS Status;
WIN32_FILE_ATTRIBUTE_DATA* FileAttributeData;
- DPRINT("GetFileAttributesExW(%S) called\n", lpFileName);
+ TRACE("GetFileAttributesExW(%S) called\n", lpFileName);
if (fInfoLevelId != GetFileExInfoStandard || lpFileInformation == NULL)
NULL,
NULL))
{
- DPRINT1 ("Invalid path '%S'\n", lpFileName);
+ WARN ("Invalid path '%S'\n", lpFileName);
SetLastError (ERROR_BAD_PATHNAME);
return FALSE;
}
RtlFreeUnicodeString (&FileName);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtQueryFullAttributesFile() failed (Status %lx)\n", Status);
+ WARN ("NtQueryFullAttributesFile() failed (Status %lx)\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
WIN32_FILE_ATTRIBUTE_DATA FileAttributeData;
BOOL Result;
- DPRINT ("GetFileAttributeW(%S) called\n", lpFileName);
+ TRACE ("GetFileAttributeW(%S) called\n", lpFileName);
Result = GetFileAttributesExW(lpFileName, GetFileExInfoStandard, &FileAttributeData);
HANDLE FileHandle;
NTSTATUS Status;
- DPRINT ("SetFileAttributeW(%S, 0x%lx) called\n", lpFileName, dwFileAttributes);
+ TRACE ("SetFileAttributeW(%S, 0x%lx) called\n", lpFileName, dwFileAttributes);
/* Validate and translate the filename */
if (!RtlDosPathNameToNtPathName_U (lpFileName,
NULL,
NULL))
{
- DPRINT ("Invalid path\n");
+ WARN ("Invalid path\n");
SetLastError (ERROR_BAD_PATHNAME);
return FALSE;
}
- DPRINT ("FileName: \'%wZ\'\n", &FileName);
+ TRACE ("FileName: \'%wZ\'\n", &FileName);
/* build the object attributes */
InitializeObjectAttributes (&ObjectAttributes,
RtlFreeUnicodeString (&FileName);
if (!NT_SUCCESS (Status))
{
- DPRINT ("NtOpenFile() failed (Status %lx)\n", Status);
+ WARN ("NtOpenFile() failed (Status %lx)\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
FileBasicInformation);
if (!NT_SUCCESS(Status))
{
- DPRINT ("SetFileAttributes NtQueryInformationFile failed with status 0x%08x\n", Status);
+ WARN ("SetFileAttributes NtQueryInformationFile failed with status 0x%08x\n", Status);
NtClose (FileHandle);
SetLastErrorByStatus (Status);
return FALSE;
NtClose (FileHandle);
if (!NT_SUCCESS(Status))
{
- DPRINT ("SetFileAttributes NtSetInformationFile failed with status 0x%08x\n", Status);
+ WARN ("SetFileAttributes NtSetInformationFile failed with status 0x%08x\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0 );
if (handle != INVALID_HANDLE_VALUE)
{ /* We created it */
- DPRINT("created %S\n", buffer);
+ TRACE("created %S\n", buffer);
CloseHandle( handle );
break;
}
} while (unique != num);
}
- DPRINT("returning %S\n", buffer);
+ TRACE("returning %S\n", buffer);
return unique;
}
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* TYPES ********************************************************************/
FileNameA.Buffer[FileNameA.Length] = 0;
- DPRINT("lpFileInfo->ShortNameLength %d\n", lpFileInfo->ShortNameLength);
+ TRACE("lpFileInfo->ShortNameLength %d\n", lpFileInfo->ShortNameLength);
FileNameU.Length = FileNameU.MaximumLength = lpFileInfo->ShortNameLength;
FileNameU.Buffer = lpFileInfo->ShortName;
PFILE_BOTH_DIR_INFORMATION Buffer, FoundFile = NULL;
NTSTATUS Status = STATUS_SUCCESS;
- DPRINT("InternalFindNextFile(%lx, %wZ)\n", hFindFile, SearchPattern);
+ TRACE("InternalFindNextFile(%lx, %wZ)\n", hFindFile, SearchPattern);
if (hFindFile != FIND_DEVICE_HANDLE)
{
ULONG DeviceNameInfo;
HANDLE hDirectory = NULL;
- DPRINT("FindFirstFileW(lpFileName %S)\n",
+ TRACE("FindFirstFileW(lpFileName %S)\n",
lpFileName);
RtlZeroMemory(&PathFileName,
RemovedLastChar = TRUE;
}
- DPRINT("lpFileName: \"%ws\"\n", lpFileName);
- DPRINT("NtPathU: \"%wZ\"\n", &NtPathU);
- DPRINT("PathFileName: \"%wZ\"\n", &PathFileName);
- DPRINT("RelativeTo: 0x%p\n", DirInfo.Handle);
+ TRACE("lpFileName: \"%ws\"\n", lpFileName);
+ TRACE("NtPathU: \"%wZ\"\n", &NtPathU);
+ TRACE("PathFileName: \"%wZ\"\n", &PathFileName);
+ TRACE("RelativeTo: 0x%p\n", DirInfo.Handle);
InitializeObjectAttributes (&ObjectAttributes,
&NtPathU,
{
PKERNEL32_FIND_DATA_HEADER IHeader;
- DPRINT("FindClose(hFindFile %x)\n",hFindFile);
+ TRACE("FindClose(hFindFile %x)\n",hFindFile);
if (hFindFile == FIND_DEVICE_HANDLE)
return TRUE;
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
if(RtlDetermineDosPathNameType_U((LPWSTR)lpFileName) == 1 ||
RtlDetermineDosPathNameType_U((LPWSTR)lpExistingFileName) == 1)
{
- DPRINT1("CreateHardLinkW() cannot handle UNC Paths!\n");
+ WARN("CreateHardLinkW() cannot handle UNC Paths!\n");
SetLastError(ERROR_INVALID_NAME);
return FALSE;
}
}
else
{
- DPRINT1("Unable to open link destination \"%wZ\"!\n", &LinkTarget);
+ WARN("Unable to open link destination \"%wZ\"!\n", &LinkTarget);
SetLastErrorByStatus(Status);
}
}
else
{
- DPRINT1("Path \"%wZ\" must not be a mapped drive!\n", &LinkDrive);
+ WARN("Path \"%wZ\" must not be a mapped drive!\n", &LinkDrive);
SetLastError(ERROR_INVALID_NAME);
}
*/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/*
* @implemented
*/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/*
* @implemented
/* INCLUDES ****************************************************************/
#include <k32.h>
-
#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32);
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
return(INVALID_HANDLE_VALUE);
}
- DPRINT("Mailslot name: %wZ\n", &MailslotName);
+ TRACE("Mailslot name: %wZ\n", &MailslotName);
if(lpSecurityAttributes)
{
if (!NT_SUCCESS(Status))
{
- DPRINT("NtCreateMailslot failed (Status %x)!\n", Status);
+ WARN("NtCreateMailslot failed (Status %x)!\n", Status);
SetLastErrorByStatus (Status);
return(INVALID_HANDLE_VALUE);
}
FileMailslotQueryInformation);
if (!NT_SUCCESS(Status))
{
- DPRINT("NtQueryInformationFile failed (Status %x)!\n", Status);
+ WARN("NtQueryInformationFile failed (Status %x)!\n", Status);
SetLastErrorByStatus (Status);
return(FALSE);
}
FileMailslotSetInformation);
if (!NT_SUCCESS(Status))
{
- DPRINT("NtSetInformationFile failed (Status %x)!\n", Status);
+ WARN("NtSetInformationFile failed (Status %x)!\n", Status);
SetLastErrorByStatus (Status);
return(FALSE);
}
#include <k32.h>
#include <malloc.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* GLOBALS *****************************************************************/
WCHAR *p;
NTSTATUS Status;
- DPRINT("add_boot_rename_entry( %S, %S, %d ) \n", source, dest, flags);
+ TRACE("add_boot_rename_entry( %S, %S, %d ) \n", source, dest, flags);
if(dest)
DestLen = wcslen(dest);
if (!NT_SUCCESS(Status))
{
- DPRINT("NtCreateKey() failed (Status 0x%lx)\n", Status);
+ WARN("NtCreateKey() failed (Status 0x%lx)\n", Status);
if (source_name.Buffer)
RtlFreeHeap(RtlGetProcessHeap(), 0, source_name.Buffer);
if (dest_name.Buffer)
UNICODE_STRING DstPathU;
BOOL folder = FALSE;
- DPRINT("MoveFileWithProgressW()\n");
+ TRACE("MoveFileWithProgressW()\n");
if (dwFlags & MOVEFILE_DELAY_UNTIL_REBOOT)
return add_boot_rename_entry( lpExistingFileName, lpNewFileName, dwFlags );
NULL,
NULL))
{
- DPRINT("Invalid destination path\n");
+ WARN("Invalid destination path\n");
CloseHandle(hFile);
SetLastError(ERROR_PATH_NOT_FOUND);
return FALSE;
FindClose(hFile);
/* delete folder */
- DPRINT("MoveFileWithProgressW : Delete folder : %S\n",lpDeleteFile);
+ TRACE("MoveFileWithProgressW : Delete folder : %S\n",lpDeleteFile);
/* remove system folder flag other wise we can not delete the folder */
Attributes = GetFileAttributesW(lpExistingFileName2);
/* copy file */
- DPRINT("MoveFileWithProgressW : Copy file : %S to %S\n",lpDeleteFile, lpNewFileName2);
+ TRACE("MoveFileWithProgressW : Copy file : %S to %S\n",lpDeleteFile, lpNewFileName2);
RemoveReadOnlyAttributeW(lpDeleteFile);
RemoveReadOnlyAttributeW(lpNewFileName2);
break;
/* delete file */
- DPRINT("MoveFileWithProgressW : remove readonly flag from file : %S\n",lpNewFileName2);
+ TRACE("MoveFileWithProgressW : remove readonly flag from file : %S\n",lpNewFileName2);
Result = RemoveReadOnlyAttributeW(lpDeleteFile);
if (Result == FALSE)
break;
- DPRINT("MoveFileWithProgressW : Delete file : %S\n",lpDeleteFile);
+ TRACE("MoveFileWithProgressW : Delete file : %S\n",lpDeleteFile);
Result = DeleteFileW(lpDeleteFile);
if (Result == FALSE)
break;
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
-#define NDEBUG
//#define USING_PROPER_NPFS_WAIT_SEMANTICS
-#include <debug.h>
/* FUNCTIONS ****************************************************************/
return INVALID_HANDLE_VALUE;
}
- DPRINT("Pipe name: %wZ\n", &NamedPipeName);
- DPRINT("Pipe name: %S\n", NamedPipeName.Buffer);
+ TRACE("Pipe name: %wZ\n", &NamedPipeName);
+ TRACE("Pipe name: %S\n", NamedPipeName.Buffer);
/* Always case insensitive, check if we got extra attributes */
Attributes = OBJ_CASE_INSENSITIVE;
if (!NT_SUCCESS(Status))
{
/* Failed to create it */
- DPRINT1("NtCreateNamedPipe failed (Status %x)!\n", Status);
+ WARN("NtCreateNamedPipe failed (Status %x)!\n", Status);
SetLastErrorByStatus (Status);
return INVALID_HANDLE_VALUE;
}
PFILE_PIPE_WAIT_FOR_BUFFER WaitPipeInfo;
/* Start by making a unicode string of the name */
- DPRINT("Sent path: %S\n", lpNamedPipeName);
+ TRACE("Sent path: %S\n", lpNamedPipeName);
RtlCreateUnicodeString(&NamedPipeName, lpNamedPipeName);
NameLength = NamedPipeName.Length / sizeof(WCHAR);
NewName.Length -= 9 * sizeof(WCHAR);
/* Initialize the Dos Devices name */
- DPRINT("NewName: %wZ\n", &NewName);
+ TRACE("NewName: %wZ\n", &NewName);
RtlInitUnicodeString(&DevicePath, L"\\DosDevices\\pipe\\");
}
else if (Type == RtlPathTypeRootLocalDevice)
else
{
/* The name is invalid */
- DPRINT1("Invalid name!\n");
+ WARN("Invalid name!\n");
SetLastErrorByStatus(STATUS_OBJECT_PATH_SYNTAX_BAD);
return FALSE;
}
}
else
{
- DPRINT1("Invalid path type\n");
+ WARN("Invalid path type\n");
SetLastErrorByStatus(STATUS_OBJECT_PATH_SYNTAX_BAD);
return FALSE;
}
}
/* Initialize the object attributes */
- DPRINT("Opening: %wZ\n", &DevicePath);
+ TRACE("Opening: %wZ\n", &DevicePath);
InitializeObjectAttributes(&ObjectAttributes,
&DevicePath,
OBJ_CASE_INSENSITIVE,
if (!NT_SUCCESS(Status))
{
/* Fail; couldn't open */
- DPRINT1("Status: %lx\n", Status);
+ WARN("Status: %lx\n", Status);
SetLastErrorByStatus(Status);
RtlFreeUnicodeString(&NamedPipeName);
RtlFreeHeap(RtlGetProcessHeap(), 0, WaitPipeInfo);
if (!NT_SUCCESS(Status))
{
/* Failure to wait on the pipe */
- DPRINT1("Status: %lx\n", Status);
+ WARN("Status: %lx\n", Status);
SetLastErrorByStatus (Status);
return FALSE;
}
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* GLOBALS ******************************************************************/
if (!NT_SUCCESS(Status))
{
/* Convert error and fail */
- DPRINT1("Status: %lx\n", Status);
+ WARN("Status: %lx\n", Status);
SetLastErrorByStatus(Status);
return FALSE;
}
if (!NT_SUCCESS(Status))
{
/* Convert error and fail */
- DPRINT1("Status: %lx\n", Status);
+ WARN("Status: %lx\n", Status);
NtClose(ReadPipeHandle);
SetLastErrorByStatus(Status);
return FALSE;
/* INCLUDES ****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
{
NTSTATUS Status;
- DPRINT("WriteFile(hFile %x)\n", hFile);
+ TRACE("WriteFile(hFile %x)\n", hFile);
if (lpNumberOfBytesWritten != NULL)
{
}
}
- DPRINT("WriteFile() succeeded\n");
+ TRACE("WriteFile() succeeded\n");
return TRUE;
}
{
NTSTATUS Status;
- DPRINT("ReadFile(hFile %x)\n", hFile);
+ TRACE("ReadFile(hFile %x)\n", hFile);
if (lpNumberOfBytesRead != NULL)
{
}
}
- DPRINT("ReadFile() succeeded\n");
+ TRACE("ReadFile() succeeded\n");
return TRUE;
}
/* INCLUDES *****************************************************************/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
/* FUNCTIONS ****************************************************************/
*/
#include <k32.h>
+#include <wine/debug.h>
-#define NDEBUG
-#include <debug.h>
-
+WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
#define MAX_DOS_DRIVES 26
NULL,
NULL))
{
- DPRINT("Invalid path\n");
+ WARN("Invalid path\n");
SetLastError(ERROR_BAD_PATHNAME);
return INVALID_HANDLE_VALUE;
}
return DRIVE_FIXED;
}
- DPRINT1("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType);
+ ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType);
return DRIVE_UNKNOWN;
}
FileFsVolume = (PFILE_FS_VOLUME_INFORMATION)Buffer;
FileFsAttribute = (PFILE_FS_ATTRIBUTE_INFORMATION)Buffer;
- DPRINT("FileFsVolume %p\n", FileFsVolume);
- DPRINT("FileFsAttribute %p\n", FileFsAttribute);
+ TRACE("FileFsVolume %p\n", FileFsVolume);
+ TRACE("FileFsAttribute %p\n", FileFsAttribute);
if (!lpRootPathName || !wcscmp(lpRootPathName, L""))
{
return FALSE;
}
- DPRINT("hFile: %x\n", hFile);
+ TRACE("hFile: %x\n", hFile);
errCode = NtQueryVolumeInformationFile(hFile,
&IoStatusBlock,
FileFsVolume,
FileFsVolumeInformation);
if ( !NT_SUCCESS(errCode) )
{
- DPRINT("Status: %x\n", errCode);
+ WARN("Status: %x\n", errCode);
CloseHandle(hFile);
SetLastErrorByStatus (errCode);
return FALSE;
CloseHandle(hFile);
if (!NT_SUCCESS(errCode))
{
- DPRINT("Status: %x\n", errCode);
+ WARN("Status: %x\n", errCode);
SetLastErrorByStatus (errCode);
return FALSE;
}
if (!NT_SUCCESS(Status))
{
- DPRINT("Status: %x\n", Status);
+ WARN("Status: %x\n", Status);
CloseHandle(hFile);
SetLastErrorByStatus(Status);
return FALSE;