[1/4] bcrypt: Add a skeleton bcrypt.h header and use it.

Francois Gouget fgouget at codeweavers.com
Thu Aug 30 19:31:09 CDT 2007


---

In a latter patch I modified the debugger.c test to use NTSTATUS. It 
compiled fine with the PSDK but failed in Wine. It turns out that's 
because Wine is missing bcrypt.h which is where NTSTATUS is defined with 
the PSDK when you just include windows.h.

 include/Makefile.in |    1 +
 include/bcrypt.h    |   43 +++++++++++++++++++++++++++++++++++++++++++
 include/wincrypt.h  |    2 +-
 3 files changed, 45 insertions(+), 1 deletions(-)
 create mode 100644 include/bcrypt.h

diff --git a/include/Makefile.in b/include/Makefile.in
index bc48cfe..4607006 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -78,6 +78,7 @@ SRCDIR_INCLUDES = \
 	axextend.idl \
 	basetsd.h \
 	basetyps.h \
+	bcrypt.h \
 	cderr.h \
 	cfgmgr32.h \
 	cguid.h \
diff --git a/include/bcrypt.h b/include/bcrypt.h
new file mode 100644
index 0000000..a3d7fe0
--- /dev/null
+++ b/include/bcrypt.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2007 Francois Gouget
+ *
+ * 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_BCRYPT_H
+#define __WINE_BCRYPT_H
+
+#ifndef WINAPI
+#define WINAPI __stdcall
+#endif
+
+#ifndef IN
+#define IN
+#endif
+
+#ifndef OUT
+#define OUT
+#endif
+
+#ifndef OPTIONAL
+#define OPTIONAL
+#endif
+
+#ifndef WINE_NTSTATUS_DECLARED
+#define WINE_NTSTATUS_DECLARED
+typedef LONG NTSTATUS;
+#endif
+
+#endif  /* __WINE_BCRYPT_H */
diff --git a/include/wincrypt.h b/include/wincrypt.h
index 93e9459..3213b4a 100644
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -24,7 +24,7 @@
 extern "C" {
 #endif
 
-/* FIXME: #include <bcrypt.h> */
+#include <bcrypt.h>
 /* FIXME: #include <ncrypt.h> */
 
 /* some typedefs for function parameters */
-- 
1.5.2.4




More information about the wine-patches mailing list