include: Add hstring.idl and winstring.h.

This commit is contained in:
Martin Storsjo 2014-12-10 10:50:37 +02:00 committed by Alexandre Julliard
parent a44e013b49
commit 42b8a7674a
3 changed files with 97 additions and 0 deletions

View File

@ -47,6 +47,7 @@ PUBLIC_IDL_H_SRCS = \
fusion.idl \
gameux.idl \
hlink.idl \
hstring.idl \
htiface.idl \
htiframe.idl \
httprequest.idl \
@ -618,6 +619,7 @@ SRCDIR_INCLUDES = \
winsock.h \
winsock2.h \
winspool.h \
winstring.h \
winsvc.h \
wintab.h \
wintabx.h \

41
include/hstring.idl Normal file
View File

@ -0,0 +1,41 @@
/*
* Copyright (C) 2014 Martin Storsjo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "wtypes.idl";
typedef struct HSTRING__
{
int unused;
} HSTRING__;
typedef [wire_marshal(wireBSTR), unique] HSTRING__* HSTRING;
cpp_quote("DECLARE_HANDLE(HSTRING_BUFFER);")
cpp_quote("typedef struct HSTRING_HEADER")
cpp_quote("{")
cpp_quote(" union")
cpp_quote(" {")
cpp_quote(" PVOID Reserved1;")
cpp_quote("#ifdef _WIN64")
cpp_quote(" char Reserved2[24];")
cpp_quote("#else")
cpp_quote(" char Reserved2[20];")
cpp_quote("#endif")
cpp_quote(" } Reserved;")
cpp_quote("} HSTRING_HEADER;")

54
include/winstring.h Normal file
View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2014 Martin Storsjo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_WINSTRING_H
#define __WINE_WINSTRING_H
#include <hstring.h>
#ifdef __cplusplus
extern "C" {
#endif
HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING str1, HSTRING str2, INT32 *order);
HRESULT WINAPI WindowsConcatString(HSTRING str1, HSTRING str2, HSTRING *out);
HRESULT WINAPI WindowsCreateString(LPCWSTR ptr, UINT32 len, HSTRING *out);
HRESULT WINAPI WindowsCreateStringReference(LPCWSTR ptr, UINT32 len,
HSTRING_HEADER *header, HSTRING *out);
HRESULT WINAPI WindowsDeleteString(HSTRING str);
HRESULT WINAPI WindowsDeleteStringBuffer(HSTRING_BUFFER buf);
HRESULT WINAPI WindowsDuplicateString(HSTRING str, HSTRING *out);
UINT32 WINAPI WindowsGetStringLen(HSTRING str);
LPCWSTR WINAPI WindowsGetStringRawBuffer(HSTRING str, UINT32 *len);
BOOL WINAPI WindowsIsStringEmpty(HSTRING str);
HRESULT WINAPI WindowsPreallocateStringBuffer(UINT32 len, WCHAR **outptr, HSTRING_BUFFER *out);
HRESULT WINAPI WindowsPromoteStringBuffer(HSTRING_BUFFER buf, HSTRING *out);
HRESULT WINAPI WindowsReplaceString(HSTRING haystack, HSTRING needle, HSTRING replacement,
HSTRING *out);
HRESULT WINAPI WindowsStringHasEmbeddedNull(HSTRING str, BOOL *out);
HRESULT WINAPI WindowsSubstring(HSTRING str, UINT32 pos, HSTRING *out);
HRESULT WINAPI WindowsSubstringWithSpecifiedLength(HSTRING str, UINT32 pos,
UINT32 len, HSTRING *out);
HRESULT WINAPI WindowsTrimStringEnd(HSTRING str, HSTRING charstr, HSTRING *out);
HRESULT WINAPI WindowsTrimStringStart(HSTRING str, HSTRING charstr, HSTRING *out);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINSTRING_H */