JustasMasiulis / inline_syscall

Inline syscalls made easy for windows on clang
Apache License 2.0
659 stars 88 forks source link

void return type ntapi problem #5

Closed Buntu0001 closed 3 years ago

Buntu0001 commented 3 years ago
VOID RtlInitUnicodeString(
        PUNICODE_STRING         DestinationString,
        __drv_aliasesMem PCWSTR SourceString
);

WCHAR path[MAX_PATH] = L"\\??\\\\C:\\Users\\Buntu\\Desktop\\test.txt";
PUNICODE_STRING punicodeString;
INLINE_SYSCALL(RtlInitUnicodeString)(punicodeString, path);

KakaoTalk_20210523_120144403

Ntapi with return type NTSTATUS works well, but ntapi with void does not work.

JustasMasiulis commented 3 years ago

RtlInitUnicodeString is not a syscall.

IIRC there indeed are a few syscalls that don't return NTSTATUS, but they are from win32k and I doubt there is much interest in them.

Buntu0001 commented 3 years ago

thank you.