https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46ed46c73f3fb5d92aac8…
commit 46ed46c73f3fb5d92aac8bef2e99f905ca319e2b
Author: Colin Finck <colin(a)reactos.org>
AuthorDate: Mon Aug 19 17:38:05 2019 +0200
Commit: Colin Finck <colin(a)reactos.org>
CommitDate: Wed Aug 28 22:35:01 2019 +0200
Fix and unify function prototypes for ntstrsafe functions taking variadic arguments.
---
sdk/include/ddk/ntstrsafe.h | 41 +++++++++++++++++++----------------------
1 file changed, 19 insertions(+), 22 deletions(-)
diff --git a/sdk/include/ddk/ntstrsafe.h b/sdk/include/ddk/ntstrsafe.h
index ab338bc58a0..fac1a46f723 100644
--- a/sdk/include/ddk/ntstrsafe.h
+++ b/sdk/include/ddk/ntstrsafe.h
@@ -30,6 +30,7 @@
#endif
#define NTSTRSAFEAPI static __inline NTSTATUS NTAPI
+#define NTSTRSAFEVAPI static __inline NTSTATUS __cdecl
#define NTSTRSAFE_INLINE_API static __inline NTSTATUS NTAPI
#ifndef NTSTRSAFE_MAX_CCH
@@ -1082,21 +1083,21 @@ RtlStringCbVPrintfW(
return RtlStringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList);
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfA(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cchDest,
_In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfW(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
_In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfA(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cchDest,
@@ -1121,7 +1122,7 @@ RtlStringCchPrintfA(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfW(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
@@ -1145,21 +1146,21 @@ RtlStringCchPrintfW(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfA(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cbDest,
_In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfW(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cbDest,
_In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfA(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cbDest,
@@ -1184,7 +1185,7 @@ RtlStringCbPrintfA(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfW(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cbDest,
@@ -1209,7 +1210,7 @@ RtlStringCbPrintfW(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfExA(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cchDest,
@@ -1219,7 +1220,7 @@ RtlStringCchPrintfExA(
_In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfExW(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
@@ -1229,7 +1230,7 @@ RtlStringCchPrintfExW(
_In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfExA(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cchDest,
@@ -1257,7 +1258,7 @@ RtlStringCchPrintfExA(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCchPrintfExW(
_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cchDest,
@@ -1285,7 +1286,7 @@ RtlStringCchPrintfExW(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfExA(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cbDest,
@@ -1295,7 +1296,7 @@ RtlStringCbPrintfExA(
_In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfExW(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cbDest,
@@ -1305,7 +1306,7 @@ RtlStringCbPrintfExW(
_In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,
...);
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfExA(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest,
_In_ size_t cbDest,
@@ -1346,7 +1347,7 @@ RtlStringCbPrintfExA(
return Status;
}
-static __inline NTSTATUS
+NTSTRSAFEVAPI
RtlStringCbPrintfExW(
_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest,
_In_ size_t cbDest,
@@ -3274,9 +3275,7 @@ RtlUnicodeStringValidateEx(
return RtlpUnicodeStringValidate(SourceString, dwFlags);
}
-static
-NTSTATUS
-__cdecl
+NTSTRSAFEVAPI
RtlUnicodeStringPrintf(
_In_ PUNICODE_STRING DestinationString,
_In_ NTSTRSAFE_PCWSTR pszFormat,
@@ -3315,9 +3314,7 @@ RtlUnicodeStringPrintf(
return Status;
}
-static
-NTSTATUS
-__cdecl
+NTSTRSAFEVAPI
RtlUnicodeStringPrintfEx(
_In_opt_ PUNICODE_STRING DestinationString,
_In_opt_ PUNICODE_STRING RemainingString,