winstring.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef __WINSTRING_H__
  7. #define __WINSTRING_H__
  8. #include <windows.h>
  9. #include <sdkddkver.h>
  10. #include <rpc.h>
  11. #include <hstring.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. void __RPC_USER HSTRING_UserFree(unsigned long *pFlags, HSTRING *ppidl);
  16. unsigned char* __RPC_USER HSTRING_UserMarshal(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
  17. unsigned long __RPC_USER HSTRING_UserSize(unsigned long *pFlags, unsigned long StartingSize, HSTRING *ppidl);
  18. unsigned char* __RPC_USER HSTRING_UserUnmarshal(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
  19. #ifdef _WIN64
  20. void __RPC_USER HSTRING_UserFree64(unsigned long *pFlags, HSTRING *ppidl);
  21. unsigned char* __RPC_USER HSTRING_UserMarshal64(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
  22. unsigned long __RPC_USER HSTRING_UserSize64(unsigned long *pFlags, unsigned long StartingSize, HSTRING *ppidl);
  23. unsigned char* __RPC_USER HSTRING_UserUnmarshal64(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
  24. #endif
  25. HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING string1, HSTRING string2, INT32 *result);
  26. HRESULT WINAPI WindowsConcatString(HSTRING string1, HSTRING string2, HSTRING *newString);
  27. HRESULT WINAPI WindowsCreateString(LPCWSTR sourceString, UINT32 length, HSTRING *string);
  28. HRESULT WINAPI WindowsCreateStringReference(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING *string);
  29. HRESULT WINAPI WindowsDeleteString(HSTRING string);
  30. HRESULT WindowsDeleteStringBuffer(HSTRING_BUFFER bufferHandle);
  31. HRESULT WINAPI WindowsDuplicateString(HSTRING string, HSTRING *newString);
  32. UINT32 WINAPI WindowsGetStringLen(HSTRING string);
  33. PCWSTR WINAPI WindowsGetStringRawBuffer(HSTRING string, UINT32 *length);
  34. typedef HRESULT (WINAPI *PINSPECT_HSTRING_CALLBACK)(void *context, UINT_PTR readAddress, UINT32 length, BYTE *buffer);
  35. #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
  36. HRESULT WINAPI WindowsInspectString(UINT_PTR targetHString, USHORT machine, PINSPECT_HSTRING_CALLBACK callback, void *context, UINT32 *length, UINT_PTR *targetStringAddress);
  37. #endif
  38. BOOL WINAPI WindowsIsStringEmpty(HSTRING string);
  39. HRESULT WindowsPreallocateStringBuffer(UINT32 length, WCHAR **mutableBuffer, HSTRING_BUFFER *bufferHandle);
  40. HRESULT WindowsPromoteStringBuffer(HSTRING_BUFFER bufferHandle, HSTRING *string);
  41. HRESULT WINAPI WindowsReplaceString(HSTRING string, HSTRING stringReplaced, HSTRING stringReplaceWith, HSTRING *newString);
  42. HRESULT WINAPI WindowsStringHasEmbeddedNull(HSTRING string, BOOL *hasEmbedNull);
  43. HRESULT WINAPI WindowsSubstring(HSTRING string, UINT32 startIndex, HSTRING *newString);
  44. HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING string, UINT32 startIndex, UINT32 length, HSTRING *newString);
  45. HRESULT WINAPI WindowsTrimStringEnd(HSTRING string, HSTRING trimString, HSTRING *newString);
  46. HRESULT WINAPI WindowsTrimStringStart(HSTRING string, HSTRING trimString, HSTRING *newString);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif