mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 03:37:57 +00:00
[KERNEL32]
Don't make FindFirstChangeNotificationA() rely on Wine's strings conversions functions svn path=/trunk/; revision=50868
This commit is contained in:
parent
f617d8910c
commit
8dc411563b
|
@ -9,10 +9,14 @@
|
||||||
* Created 01/11/98
|
* Created 01/11/98
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <k32.h>
|
#include <k32.h>
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -35,20 +39,30 @@ FindCloseChangeNotification (HANDLE hChangeHandle)
|
||||||
*/
|
*/
|
||||||
HANDLE
|
HANDLE
|
||||||
WINAPI
|
WINAPI
|
||||||
FindFirstChangeNotificationA (
|
FindFirstChangeNotificationA(IN LPCSTR lpPathName,
|
||||||
LPCSTR lpPathName,
|
IN BOOL bWatchSubtree,
|
||||||
BOOL bWatchSubtree,
|
IN DWORD dwNotifyFilter)
|
||||||
DWORD dwNotifyFilter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PWCHAR PathNameW;
|
NTSTATUS Status;
|
||||||
|
ANSI_STRING PathNameString;
|
||||||
|
|
||||||
if (!(PathNameW = FilenameA2W(lpPathName, FALSE)))
|
RtlInitAnsiString(&PathNameString, lpPathName);
|
||||||
return INVALID_HANDLE_VALUE;
|
Status = RtlAnsiStringToUnicodeString(&(NtCurrentTeb()->StaticUnicodeString), &PathNameString, FALSE);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
if (Status != STATUS_BUFFER_OVERFLOW)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_FILENAME_EXCED_RANGE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BaseSetLastNTError(Status);
|
||||||
|
}
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FindFirstChangeNotificationW (PathNameW ,
|
return FindFirstChangeNotificationW(NtCurrentTeb()->StaticUnicodeString.Buffer,
|
||||||
bWatchSubtree,
|
bWatchSubtree, dwNotifyFilter);
|
||||||
dwNotifyFilter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue