Module: wine Branch: master Commit: 42b8a7674ab92d13dc4043806b8111ebf0e1094a URL: http://source.winehq.org/git/wine.git/?a=commit;h=42b8a7674ab92d13dc4043806b...
Author: Martin Storsjo martin@martin.st Date: Wed Dec 10 10:50:37 2014 +0200
include: Add hstring.idl and winstring.h.
---
include/Makefile.in | 2 ++ include/hstring.idl | 41 ++++++++++++++++++++++++++++++++++++++++ include/winstring.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+)
diff --git a/include/Makefile.in b/include/Makefile.in index 5b1f3ab..c9f683a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -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 \ diff --git a/include/hstring.idl b/include/hstring.idl new file mode 100644 index 0000000..2623f34 --- /dev/null +++ b/include/hstring.idl @@ -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;") diff --git a/include/winstring.h b/include/winstring.h new file mode 100644 index 0000000..27c299b --- /dev/null +++ b/include/winstring.h @@ -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 */