zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

winstring.h (3207B) - Raw


      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 
      9 #include <windows.h>
     10 #include <sdkddkver.h>
     11 #include <rpc.h>
     12 #include <hstring.h>
     13 
     14 #ifdef __cplusplus
     15 extern "C" {
     16 #endif
     17 
     18 void __RPC_USER HSTRING_UserFree(unsigned long *pFlags, HSTRING *ppidl);
     19 
     20 unsigned char* __RPC_USER HSTRING_UserMarshal(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
     21 
     22 unsigned long __RPC_USER HSTRING_UserSize(unsigned long *pFlags, unsigned long StartingSize, HSTRING *ppidl);
     23 
     24 unsigned char* __RPC_USER HSTRING_UserUnmarshal(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
     25 
     26 #ifdef _WIN64
     27 void __RPC_USER HSTRING_UserFree64(unsigned long *pFlags, HSTRING *ppidl);
     28 
     29 unsigned char* __RPC_USER HSTRING_UserMarshal64(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
     30 
     31 unsigned long __RPC_USER HSTRING_UserSize64(unsigned long *pFlags, unsigned long StartingSize, HSTRING *ppidl);
     32 
     33 unsigned char* __RPC_USER HSTRING_UserUnmarshal64(unsigned long *pFlags, unsigned char *pBuffer, HSTRING *ppidl);
     34 #endif
     35 
     36 HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING string1, HSTRING string2, INT32 *result);
     37 
     38 HRESULT WINAPI WindowsConcatString(HSTRING string1, HSTRING string2, HSTRING *newString);
     39 
     40 HRESULT WINAPI WindowsCreateString(LPCWSTR sourceString, UINT32 length, HSTRING *string);
     41 
     42 HRESULT WINAPI WindowsCreateStringReference(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING *string);
     43 
     44 HRESULT WINAPI WindowsDeleteString(HSTRING string);
     45 
     46 HRESULT WindowsDeleteStringBuffer(HSTRING_BUFFER bufferHandle);
     47 
     48 HRESULT WINAPI WindowsDuplicateString(HSTRING string, HSTRING *newString);
     49 
     50 UINT32 WINAPI WindowsGetStringLen(HSTRING string);
     51 
     52 PCWSTR WINAPI WindowsGetStringRawBuffer(HSTRING string, UINT32 *length);
     53 
     54 typedef HRESULT (WINAPI *PINSPECT_HSTRING_CALLBACK)(void *context, UINT_PTR readAddress, UINT32 length, BYTE *buffer);
     55 
     56 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
     57 HRESULT WINAPI WindowsInspectString(UINT_PTR targetHString, USHORT machine, PINSPECT_HSTRING_CALLBACK callback, void *context, UINT32 *length, UINT_PTR *targetStringAddress);
     58 #endif
     59 
     60 BOOL WINAPI WindowsIsStringEmpty(HSTRING string);
     61 
     62 HRESULT WindowsPreallocateStringBuffer(UINT32 length, WCHAR **mutableBuffer, HSTRING_BUFFER *bufferHandle);
     63 
     64 HRESULT WindowsPromoteStringBuffer(HSTRING_BUFFER bufferHandle, HSTRING *string);
     65 
     66 HRESULT WINAPI WindowsReplaceString(HSTRING string, HSTRING stringReplaced, HSTRING stringReplaceWith, HSTRING *newString);
     67 
     68 HRESULT WINAPI WindowsStringHasEmbeddedNull(HSTRING string, BOOL *hasEmbedNull);
     69 
     70 HRESULT WINAPI WindowsSubstring(HSTRING string, UINT32 startIndex, HSTRING *newString);
     71 
     72 HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING string, UINT32 startIndex, UINT32 length, HSTRING *newString);
     73 
     74 HRESULT WINAPI WindowsTrimStringEnd(HSTRING string, HSTRING trimString, HSTRING *newString);
     75 
     76 HRESULT WINAPI WindowsTrimStringStart(HSTRING string, HSTRING trimString, HSTRING *newString);
     77 
     78 #ifdef __cplusplus
     79 }
     80 #endif
     81 
     82 #endif