Remove part of combase HSTRING (accepted upstream).

This commit is contained in:
Erich E. Hoover 2014-12-10 18:08:02 -07:00
parent ca389f162a
commit 26f47c8dd8
4 changed files with 0 additions and 133 deletions

View File

@ -1,133 +0,0 @@
From d857022a2a68015c586c93bfbd34d8dc81588363 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Tue, 9 Dec 2014 10:36:47 +0200
Subject: include: Add hstring.h and winstring.h.
---
include/Makefile.in | 2 ++
include/hstring.h | 39 +++++++++++++++++++++++++++++++++++++++
include/winstring.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 87 insertions(+)
create mode 100644 include/hstring.h
create mode 100644 include/winstring.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 5b1f3ab..4a9806b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -341,6 +341,7 @@ SRCDIR_INCLUDES = \
htmlhelp.h \
http.h \
httprequestid.h \
+ hstring.h \
i_cryptasn1tls.h \
icm.h \
icmpapi.h \
@@ -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.h b/include/hstring.h
new file mode 100644
index 0000000..d65e375
--- /dev/null
+++ b/include/hstring.h
@@ -0,0 +1,39 @@
+/*
+ * 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_HSTRING_H
+#define __WINE_HSTRING_H
+
+#include <windef.h>
+
+DECLARE_HANDLE(HSTRING);
+DECLARE_HANDLE(HSTRING_BUFFER);
+
+typedef struct HSTRING_HEADER
+{
+ union {
+ PVOID Reserved1;
+#ifdef _WIN64
+ char Reserved2[24];
+#else
+ char Reserved2[20];
+#endif
+ } Reserved;
+} HSTRING_HEADER;
+
+#endif /* __WINE_HSTRING_H */
diff --git a/include/winstring.h b/include/winstring.h
new file mode 100644
index 0000000..4db3f4c
--- /dev/null
+++ b/include/winstring.h
@@ -0,0 +1,46 @@
+/*
+ * 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>
+
+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);
+
+#endif /* __WINE_WINSTRING_H */
--
2.1.3