mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
With a few more defines, strsafe.h can now implement all functions Cb/Cch, Ansi/Unicode from a single piece of code. Implement all Cb functions in the lib (depending on the unimplemented inline versions)
svn path=/branches/ros-amd64-bringup/; revision=35689
This commit is contained in:
+239
-32
@@ -20,24 +20,90 @@ typedef wchar_t * STRSAFE_LPWSTR;
|
||||
typedef const wchar_t * STRSAFE_LPCWSTR;
|
||||
typedef unsigned long STRSAFE_DWORD;
|
||||
|
||||
/* Implement for ansi and unicode */
|
||||
#define STRSAFE_PASS2
|
||||
|
||||
/* Implement Cb functions for ansi and unicode */
|
||||
#define STRSAFE_CB
|
||||
#define STRSAFE_CXX_CB(x)
|
||||
#define STRSAFE_CXX_CCH(x) x *= sizeof(STRSAFE_TCHAR)
|
||||
#define STRSAFE_UNICODE 0
|
||||
# include <strsafe.h>
|
||||
#undef STRSAFE_UNICODE
|
||||
#define STRSAFE_UNICODE 1
|
||||
# include <strsafe.h>
|
||||
#undef STRSAFE_UNICODE
|
||||
#undef STRSAFE_CXX
|
||||
#undef STRSAFE_CB
|
||||
#undef STRSAFE_CXX_CB
|
||||
#undef STRSAFE_CXX_CCH
|
||||
|
||||
/* Implement Cch functions for ansi and unicode */
|
||||
#define STRSAFE_CXX_CB(x) x /= sizeof(STRSAFE_TCHAR)
|
||||
#define STRSAFE_CXX_CCH(x)
|
||||
#define STRSAFE_UNICODE 0
|
||||
# include <strsafe.h>
|
||||
#undef STRSAFE_UNICODE
|
||||
#define STRSAFE_UNICODE 1
|
||||
# include <strsafe.h>
|
||||
#undef STRSAFE_UNICODE
|
||||
#undef STRSAFE_CXX_CB
|
||||
#undef STRSAFE_CXX_CCH
|
||||
|
||||
#undef STRSAFE_PASS2
|
||||
|
||||
/* Now define the functions depending on UNICODE */
|
||||
#ifdef UNICODE
|
||||
# define STRSAFE_UNICODE 1
|
||||
#else
|
||||
# define STRSAFE_UNICODE 0
|
||||
#endif
|
||||
#include <strsafe.h>
|
||||
#undef STRSAFE_UNICODE
|
||||
#if defined(UNICODE)
|
||||
|
||||
#define StringCbCat StringCbCatW
|
||||
#define StringCbCatEx StringCbCatExW
|
||||
#define StringCbCatN StringCbCatNW
|
||||
#define StringCbCatNEx StringCbCatNExW
|
||||
#define StringCbCopy StringCbCopyW
|
||||
#define StringCbCopyEx StringCbCopyExW
|
||||
#define StringCbCopyN StringCbCopyNW
|
||||
#define StringCbCopyNEx StringCbCopyNExW
|
||||
#define StringCbGets StringCbGetsW
|
||||
#define StringCbGetsEx StringCbGetsExW
|
||||
#define StringCbLength StringCbLengthW
|
||||
#define StringCbPrintf StringCbPrintfW
|
||||
#define StringCbPrintfEx StringCbPrintfExW
|
||||
#define StringCbVPrintf StringCbVPrintfW
|
||||
#define StringCbVPrintfEx StringCbVPrintfExW
|
||||
#define StringCchCat StringCchCatW
|
||||
#define StringCchCatEx StringCchCatExW
|
||||
#define StringCchCatN StringCchCatNW
|
||||
#define StringCchCatNEx StringCchCatNExW
|
||||
#define StringCchCopy StringCchCopyW
|
||||
#define StringCchCopyEx StringCchCopyExW
|
||||
#define StringCchCopyN StringCchCopyNW
|
||||
#define StringCchCopyNEx StringCchCopyNExW
|
||||
#define StringCchGets StringCchGetsW
|
||||
#define StringCchGetsEx StringCchGetsExW
|
||||
#define StringCchLength StringCchLengthW
|
||||
#define StringCchPrintf StringCchPrintfW
|
||||
#define StringCchPrintfEx StringCchPrintfExW
|
||||
#define StringCchVPrintf StringCchVPrintfW
|
||||
#define StringCchVPrintfEx StringCchVPrintfExW
|
||||
|
||||
#else // !UNICODE
|
||||
|
||||
#define StringCbCat StringCbCatA
|
||||
#define StringCbCatEx StringCbCatExA
|
||||
#define StringCbCatN StringCbCatNA
|
||||
#define StringCbCatNEx StringCbCatNExA
|
||||
#define StringCbCopy StringCbCopyA
|
||||
#define StringCbCopyEx StringCbCopyExA
|
||||
#define StringCbCopyN StringCbCopyNA
|
||||
#define StringCbCopyNEx StringCbCopyNExA
|
||||
#define StringCbGets StringCbGetsA
|
||||
#define StringCbGetsEx StringCbGetsExA
|
||||
#define StringCbLength StringCbLengthA
|
||||
#define StringCbPrintf StringCbPrintfA
|
||||
#define StringCbPrintfEx StringCbPrintfExA
|
||||
#define StringCbVPrintf StringCbVPrintfA
|
||||
#define StringCbVPrintfEx StringCbVPrintfExA
|
||||
|
||||
#endif // !UNICODE
|
||||
|
||||
#endif // !__STRSAFE_H_
|
||||
|
||||
@@ -48,21 +114,81 @@ typedef unsigned long STRSAFE_DWORD;
|
||||
|
||||
#define STRSAFE_LPTSTR STRSAFE_LPWSTR
|
||||
#define STRSAFE_LPCTSTR STRSAFE_LPCWSTR
|
||||
#define STRSAFE_TCHAR wchar_t
|
||||
|
||||
#define StringCbCat StringCbCatW
|
||||
#define StringCbCopy StringCbCopyW
|
||||
#define StringCbVPrintf StringCbVPrintfW
|
||||
#define StringCbPrintf StringCbPrintfW
|
||||
#if defined(STRSAFE_CB)
|
||||
#define StringCxxCat StringCbCatW
|
||||
#define StringCxxCatEx StringCbCatExW
|
||||
#define StringCxxCatN StringCbCatNW
|
||||
#define StringCxxCatNEx StringCbCatNExW
|
||||
#define StringCxxCopy StringCbCopyW
|
||||
#define StringCxxCopyEx StringCbCopyExW
|
||||
#define StringCxxCopyN StringCbCopyNW
|
||||
#define StringCxxCopyNEx StringCbCopyNExW
|
||||
#define StringCxxGets StringCbGetsW
|
||||
#define StringCxxGetsEx StringCbGetsExW
|
||||
#define StringCxxLength StringCbLengthW
|
||||
#define StringCxxPrintf StringCbPrintfW
|
||||
#define StringCxxPrintfEx StringCbPrintfExW
|
||||
#define StringCxxVPrintf StringCbVPrintfW
|
||||
#define StringCxxVPrintfEx StringCbVPrintfExW
|
||||
#else // !STRSAFE_CB
|
||||
#define StringCxxCat StringCchCatW
|
||||
#define StringCxxCatEx StringCchCatExW
|
||||
#define StringCxxCatN StringCchCatNW
|
||||
#define StringCxxCatNEx StringCchCatNExW
|
||||
#define StringCxxCopy StringCchCopyW
|
||||
#define StringCxxCopyEx StringCchCopyExW
|
||||
#define StringCxxCopyN StringCchCopyNW
|
||||
#define StringCxxCopyNEx StringCchCopyNExW
|
||||
#define StringCxxGets StringCchGetsW
|
||||
#define StringCxxGetsEx StringCchGetsExW
|
||||
#define StringCxxLength StringCchLengthW
|
||||
#define StringCxxPrintf StringCchPrintfW
|
||||
#define StringCxxPrintfEx StringCchPrintfExW
|
||||
#define StringCxxVPrintf StringCchVPrintfW
|
||||
#define StringCxxVPrintfEx StringCchVPrintfExW
|
||||
#endif // !STRSAFE_CB
|
||||
|
||||
#else // (STRSAFE_UNICODE != 1)
|
||||
|
||||
#define STRSAFE_LPTSTR STRSAFE_LPSTR
|
||||
#define STRSAFE_LPCTSTR STRSAFE_LPCSTR
|
||||
#define STRSAFE_TCHAR char
|
||||
|
||||
#define StringCbCat StringCbCatA
|
||||
#define StringCbCopy StringCbCopyA
|
||||
#define StringCbVPrintf StringCbVPrintfA
|
||||
#define StringCbPrintf StringCbPrintfA
|
||||
#if defined(STRSAFE_CB)
|
||||
#define StringCxxCat StringCbCatA
|
||||
#define StringCxxCatEx StringCbCatExA
|
||||
#define StringCxxCatN StringCbCatNA
|
||||
#define StringCxxCatNEx StringCbCatNExA
|
||||
#define StringCxxCopy StringCbCopyA
|
||||
#define StringCxxCopyEx StringCbCopyExA
|
||||
#define StringCxxCopyN StringCbCopyNA
|
||||
#define StringCxxCopyNEx StringCbCopyNExA
|
||||
#define StringCxxGets StringCbGetsA
|
||||
#define StringCxxGetsEx StringCbGetsExA
|
||||
#define StringCxxLength StringCbLengthA
|
||||
#define StringCxxPrintf StringCbPrintfA
|
||||
#define StringCxxPrintfEx StringCbPrintfExA
|
||||
#define StringCxxVPrintf StringCbVPrintfA
|
||||
#define StringCxxVPrintfEx StringCbVPrintfExA
|
||||
#else // !STRSAFE_CB
|
||||
#define StringCxxCat StringCchCatA
|
||||
#define StringCxxCatEx StringCchCatExA
|
||||
#define StringCxxCatN StringCchCatNA
|
||||
#define StringCxxCatNEx StringCchCatNExA
|
||||
#define StringCxxCopy StringCchCopyA
|
||||
#define StringCxxCopyEx StringCchCopyExA
|
||||
#define StringCxxCopyN StringCchCopyNA
|
||||
#define StringCopyNEx StringCchCopyNExA
|
||||
#define StringCxxGets StringCchGetsA
|
||||
#define StringCxxGetsEx StringCchGetsExA
|
||||
#define StringCxxLength StringCchLengthA
|
||||
#define StringCxxPrintf StringCchPrintfA
|
||||
#define StringCxxPrintfEx StringCchPrintfExA
|
||||
#define StringCxxVPrintf StringCchVPrintfA
|
||||
#define StringCxxVPrintfEx StringCchVPrintfExA
|
||||
#endif // !STRSAFE_CB
|
||||
|
||||
#endif // (STRSAFE_UNICODE != 1)
|
||||
#endif // defined(STRSAFE_UNICODE)
|
||||
@@ -77,10 +203,21 @@ typedef unsigned long STRSAFE_DWORD;
|
||||
#define STRSAFEAPI HRESULT __stdcall
|
||||
|
||||
#ifndef STRSAFE_NO_CB_FUNCTIONS
|
||||
STRSAFEAPI StringCbCat(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc);
|
||||
STRSAFEAPI StringCbCopy(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc);
|
||||
STRSAFEAPI StringCbVPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, va_list args);
|
||||
STRSAFEAPI StringCbPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, ...);
|
||||
STRSAFEAPI StringCat(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc);
|
||||
STRSAFEAPI StringCatEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
|
||||
STRSAFEAPI StringCatN(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend);
|
||||
STRSAFEAPI StringCatNEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
|
||||
STRSAFEAPI StringCopy(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc);
|
||||
STRSAFEAPI StringCopyEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
|
||||
STRSAFEAPI StringCopyN(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc);
|
||||
STRSAFEAPI StringCopyNEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
|
||||
STRSAFEAPI StringGets(STRSAFE_LPTSTR pszDest, size_t cxDest);
|
||||
STRSAFEAPI StringGetsEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
|
||||
STRSAFEAPI StringLength(STRSAFE_LPCTSTR psz, size_t cxMax, size_t *pcb);
|
||||
STRSAFEAPI StringPrintf(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszFormat, ...);
|
||||
STRSAFEAPI StringPrintfEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, ...);
|
||||
STRSAFEAPI StringVPrintf(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszFormat, va_list args);
|
||||
STRSAFEAPI StringVPrintfEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, LPCTSTR pszFormat, va_list args);
|
||||
#endif // !STRSAFE_NO_CB_FUNCTIONS
|
||||
|
||||
#ifndef STRSAFE_NO_CCH_FUNCTIONS
|
||||
@@ -95,30 +232,88 @@ STRSAFEAPI StringCbPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR
|
||||
|
||||
#ifndef STRSAFE_NO_CB_FUNCTIONS
|
||||
|
||||
STRSAFEAPI StringCbCat(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc)
|
||||
STRSAFEAPI StringCxxCat(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc)
|
||||
{
|
||||
STRSAFE_CXX_CB(cxDest);
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxCatEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI
|
||||
StringCbCopy(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc)
|
||||
STRSAFEAPI StringCxxCatN(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI
|
||||
StringCbVPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, va_list args)
|
||||
STRSAFEAPI StringCxxCatNEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI
|
||||
StringCbPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, ...)
|
||||
STRSAFEAPI StringCxxCopy(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxCopyEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxCopyN(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxCopyNEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxGets(STRSAFE_LPTSTR pszDest, size_t cbDest)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxGetsEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxLength(STRSAFE_LPCTSTR psz, size_t cbMax, size_t *pcb)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxVPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, va_list args)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxVPrintfEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, va_list args)
|
||||
{
|
||||
return 0; // FIXME
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, ...)
|
||||
{
|
||||
HRESULT result;
|
||||
va_list args;
|
||||
va_start(args, pszFormat);
|
||||
result = StringCbVPrintf(pszDest, cbDest, pszFormat, args);
|
||||
result = StringCxxVPrintf(pszDest, cbDest, pszFormat, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
|
||||
STRSAFEAPI StringCxxPrintfEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, ...)
|
||||
{
|
||||
HRESULT result;
|
||||
va_list args;
|
||||
va_start(args, pszFormat);
|
||||
result = StringCxxVPrintfEx(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
@@ -132,13 +327,25 @@ StringCbPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat,
|
||||
#endif // !STRSAFE_LIB
|
||||
|
||||
/* Functions are implemented or defined, clear #defines for next pass */
|
||||
#undef StringCbCat
|
||||
#undef StringCbCopy
|
||||
#undef StringCbVPrintf
|
||||
#undef StringCbPrintf
|
||||
#undef StringCxxCat
|
||||
#undef StringCxxCatEx
|
||||
#undef StringCxxCatN
|
||||
#undef StringCxxCatNEx
|
||||
#undef StringCxxCopy
|
||||
#undef StringCxxCopyEx
|
||||
#undef StringCxxCopyN
|
||||
#undef StringCxxCopyNEx
|
||||
#undef StringCxxGets
|
||||
#undef StringCxxGetsEx
|
||||
#undef StringCxxLength
|
||||
#undef StringCxxPrintf
|
||||
#undef StringCxxPrintfEx
|
||||
#undef StringCxxVPrintf
|
||||
#undef StringCxxVPrintfEx
|
||||
|
||||
#undef STRSAFE_LPTSTR
|
||||
#undef STRSAFE_LPCTSTR
|
||||
#undef STRSAFE_TCHAR
|
||||
|
||||
#endif // defined (STRSAFE_PASS2)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatExA _StringCbCatExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatExA
|
||||
HRESULT __stdcall
|
||||
StringCbCatExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatExW _StringCbCatExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatExW
|
||||
HRESULT __stdcall
|
||||
StringCbCatExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatNA _StringCbCatNA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatNA
|
||||
HRESULT __stdcall
|
||||
StringCbCatNA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
size_t cbMaxAppend)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatNA(pszDest, cbDest, pszSrc, cbMaxAppend);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatNExA _StringCbCatNExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatNExA
|
||||
HRESULT __stdcall
|
||||
StringCbCatNExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
size_t cbMaxAppend,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatNExW _StringCbCatNExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatNExW
|
||||
HRESULT __stdcall
|
||||
StringCbCatNExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
size_t cbMaxAppend,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatNW _StringCbCatNW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatNW
|
||||
HRESULT __stdcall
|
||||
StringCbCatNW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
size_t cbMaxAppend)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatNW(pszDest, cbDest, pszSrc, cbMaxAppend);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCatW _StringCbCatW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCatW
|
||||
HRESULT __stdcall
|
||||
StringCbCatW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCatW(pszDest, cbDest, pszSrc);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyExA _StringCbCopyExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyExA
|
||||
HRESULT __stdcall
|
||||
StringCbCopyExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyExW _StringCbCopyExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyExW
|
||||
HRESULT __stdcall
|
||||
StringCbCopyExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyNA _StringCbCopyNA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyNA
|
||||
HRESULT __stdcall
|
||||
StringCbCopyNA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
size_t cbSrc)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyNA(pszDest, cbDest, pszSrc, cbSrc);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyNExA _StringCbCopyNExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyNExA
|
||||
HRESULT __stdcall
|
||||
StringCbCopyNExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszSrc,
|
||||
size_t cbMaxAppend,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyNExW _StringCbCopyNExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyNExW
|
||||
HRESULT __stdcall
|
||||
StringCbCopyNExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
size_t cbMaxAppend,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyNW _StringCbCopyNW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyNW
|
||||
HRESULT __stdcall
|
||||
StringCbCopyNW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc,
|
||||
size_t cbSrc)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyNW(pszDest, cbDest, pszSrc, cbSrc);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbCopyW _StringCbCopyW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbCopyW
|
||||
HRESULT __stdcall
|
||||
StringCbCopyW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszSrc)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbCopyW(pszDest, cbDest, pszSrc);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbGetsA _StringCbGetsA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbGetsA
|
||||
HRESULT __stdcall
|
||||
StringCbGetsA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbGetsA(pszDest, cbDest);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbGetsExA _StringCbGetsExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbGetsExA
|
||||
HRESULT __stdcall
|
||||
StringCbGetsExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbGetsExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbGetsExW _StringCbGetsExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbGetsExW
|
||||
HRESULT __stdcall
|
||||
StringCbGetsExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbGetsExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbGetsW _StringCbGetsW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbGetsW
|
||||
HRESULT __stdcall
|
||||
StringCbGetsW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbGetsW(pszDest, cbDest);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbLengthA _StringCbLengthA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbLengthA
|
||||
HRESULT __stdcall
|
||||
StringCbLengthA(
|
||||
STRSAFE_LPCSTR psz,
|
||||
size_t cbMax,
|
||||
size_t *pcb)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbLengthA(psz, cbMax, pcb);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbLengthW _StringCbLengthW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbLengthW
|
||||
HRESULT __stdcall
|
||||
StringCbLengthW(
|
||||
STRSAFE_LPCWSTR psz,
|
||||
size_t cbMax,
|
||||
size_t *pcb)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbLengthW(psz, cbMax, pcb);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbPrintfExA _StringCbPrintfExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbPrintfExA
|
||||
HRESULT __stdcall
|
||||
StringCbPrintfExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags,
|
||||
STRSAFE_LPCSTR pszFormat,
|
||||
...)
|
||||
{
|
||||
HRESULT result;
|
||||
va_list args;
|
||||
va_start(args, pszFormat);
|
||||
result = StringCbVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbPrintfExW _StringCbPrintfExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbPrintfExW
|
||||
HRESULT __stdcall
|
||||
StringCbPrintfExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags,
|
||||
STRSAFE_LPCWSTR pszFormat,
|
||||
...)
|
||||
{
|
||||
HRESULT result;
|
||||
va_list args;
|
||||
va_start(args, pszFormat);
|
||||
result = StringCbVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbPrintfW _StringCbPrintfW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbPrintfW
|
||||
HRESULT __stdcall
|
||||
StringCbPrintfW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszFormat,
|
||||
...)
|
||||
{
|
||||
HRESULT result;
|
||||
va_list args;
|
||||
va_start(args, pszFormat);
|
||||
result = StringCbVPrintfW(pszDest, cbDest, pszFormat, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbVPrintfA _StringCbVPrintfA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbVPrintfA
|
||||
HRESULT __stdcall
|
||||
StringCbVPrintfA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCSTR pszFormat,
|
||||
va_list args)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbVPrintfA(pszDest, cbDest, pszFormat, args);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbVPrintfExA _StringCbVPrintfExA
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbVPrintfExA
|
||||
HRESULT __stdcall
|
||||
StringCbVPrintfExA(
|
||||
STRSAFE_LPSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags,
|
||||
STRSAFE_LPCSTR pszFormat,
|
||||
va_list args)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbVPrintfExW _StringCbVPrintfExW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbVPrintfExW
|
||||
HRESULT __stdcall
|
||||
StringCbVPrintfExW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPWSTR *ppszDestEnd,
|
||||
size_t *pcbRemaining,
|
||||
STRSAFE_DWORD dwFlags,
|
||||
STRSAFE_LPCWSTR pszFormat,
|
||||
va_list args)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#define STRSAFE_NO_CCH_FUNCTIONS
|
||||
#define StringCbVPrintfW _StringCbVPrintfW
|
||||
#include <strsafe.h>
|
||||
|
||||
#undef StringCbVPrintfW
|
||||
HRESULT __stdcall
|
||||
StringCbVPrintfW(
|
||||
STRSAFE_LPWSTR pszDest,
|
||||
size_t cbDest,
|
||||
STRSAFE_LPCWSTR pszFormat,
|
||||
va_list args)
|
||||
{
|
||||
/* Use the inlined version */
|
||||
return _StringCbVPrintfW(pszDest, cbDest, pszFormat, args);
|
||||
}
|
||||
@@ -3,6 +3,33 @@
|
||||
<module name="strsafe" type="staticlibrary">
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<file>StringCbCatA.c</file>
|
||||
<file>StringCbCatW.c</file>
|
||||
<file>StringCbCatExA.c</file>
|
||||
<file>StringCbCatExW.c</file>
|
||||
<file>StringCbCatNA.c</file>
|
||||
<file>StringCbCatNW.c</file>
|
||||
<file>StringCbCatNExA.c</file>
|
||||
<file>StringCbCatNExW.c</file>
|
||||
<file>StringCbCopyA.c</file>
|
||||
<file>StringCbCopyW.c</file>
|
||||
<file>StringCbCopyExA.c</file>
|
||||
<file>StringCbCopyExW.c</file>
|
||||
<file>StringCbCopyNA.c</file>
|
||||
<file>StringCbCopyNW.c</file>
|
||||
<file>StringCbCopyNExA.c</file>
|
||||
<file>StringCbCopyNExW.c</file>
|
||||
<file>StringCbGetsA.c</file>
|
||||
<file>StringCbGetsW.c</file>
|
||||
<file>StringCbGetsExA.c</file>
|
||||
<file>StringCbGetsExW.c</file>
|
||||
<file>StringCbLengthA.c</file>
|
||||
<file>StringCbLengthW.c</file>
|
||||
<file>StringCbPrintfA.c</file>
|
||||
<file>StringCbPrintfW.c</file>
|
||||
<file>StringCbPrintfExA.c</file>
|
||||
<file>StringCbPrintfExW.c</file>
|
||||
<file>StringCbVPrintfA.c</file>
|
||||
<file>StringCbVPrintfW.c</file>
|
||||
<file>StringCbVPrintfExA.c</file>
|
||||
<file>StringCbVPrintfExW.c</file>
|
||||
</module>
|
||||
|
||||
Reference in New Issue
Block a user