X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=src%2Flibcaptive%2Fob%2Fhandle.c;h=3dc7db06ed299e258d5d64f54cdf9fb140b7f03c;hb=a2dd38f86df22c46ae18f3ad7d9850eaacb02b92;hp=c65de5443efe3da9ca42d330feb70028b9d143b7;hpb=0fae504af478def85890c788a6fa3a031632a822;p=captive.git diff --git a/src/libcaptive/ob/handle.c b/src/libcaptive/ob/handle.c index c65de54..3dc7db0 100644 --- a/src/libcaptive/ob/handle.c +++ b/src/libcaptive/ob/handle.c @@ -19,12 +19,16 @@ #include "config.h" -#include "reactos/ddk/zw.h" /* self */ +#include "reactos/ntos/zw.h" /* self */ #include "reactos/ntos/types.h" /* for HANDLE */ #include "reactos/napi/types.h" /* for NTSTATUS */ #include +/* libcaptive/ps/create.c: */ +extern const guint8 PsCreateSystemThread_bogusthread; + + /** * ZwClose: * @Handle: Handle from some Zw*() create function. @@ -39,5 +43,11 @@ NTSTATUS ZwClose(HANDLE Handle) { g_return_val_if_fail(Handle!=NULL,STATUS_INVALID_HANDLE); + /* FIXME: libcaptive does not yet create the threads (thread objects) + * but ntfs.sys will ZwClose() immediately after its PsCreateSystemThread(). + */ + if (Handle==(HANDLE)&PsCreateSystemThread_bogusthread) + return STATUS_SUCCESS; + return NtClose(Handle); }