Setupapi Win16/32 (Again) and PSDK porting fixes

Steven Edwards steven_ed4153 at yahoo.com
Sat Oct 18 13:57:50 CDT 2003


Hello,
This patch also contains my Makefile.in patch from this morning
as I had more time to work on setupapi than I thought. With this
patch all of the objects for setupapi.dll can be built on 
MS_VC with the PSDK. There are a few minor issues but nothing
to major

1. RtlCreateUnicodeStringFromAsciiz is not defined in winternal.h in
the PSDK
So we will get a warning.

2. Mingw doesnt have a winternl.h or FDI.H header so we wont see this
ported to w32api or ReactOS for a while.

Thanks
Steven

Changelog:
 - Win16/32 Cleanup
 - Fixes for building with the PSDK


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-------------- next part --------------
Index: setupapi.h
===================================================================
RCS file: /home/wine/wine/include/setupapi.h,v
retrieving revision 1.12
diff -u -r1.12 setupapi.h
--- setupapi.h	7 Oct 2003 22:51:09 -0000	1.12
+++ setupapi.h	18 Oct 2003 18:47:03 -0000
@@ -155,7 +155,7 @@
 typedef WINELIB_NAME_AW(PSP_DEVICE_INTERFACE_DETAIL_DATA_) PSP_DEVICE_INTERFACE_DETAIL_DATA;
 #endif
 
-typedef struct _FILE_IN_CABINET_INFOA {
+typedef struct _FILE_IN_CABINET_INFO_A {
   LPCSTR NameInCabinet;
   DWORD FileSize;
   DWORD Win32Error;
@@ -163,9 +163,9 @@
   WORD DosTime;
   WORD DosAttribs;
   CHAR FullTargetName[MAX_PATH];
-} FILE_IN_CABINET_INFOA, *PFILE_IN_CABINET_INFOA;
+} FILE_IN_CABINET_INFO_A, *PFILE_IN_CABINET_INFO_A;
 
-typedef struct _FILE_IN_CABINET_INFOW {
+typedef struct _FILE_IN_CABINET_INFO_W {
   LPCWSTR NameInCabinet;
   DWORD FileSize;
   DWORD Win32Error;
@@ -173,26 +173,26 @@
   WORD DosTime;
   WORD DosAttribs;
   WCHAR FullTargetName[MAX_PATH];
-} FILE_IN_CABINET_INFOW, *PFILE_IN_CABINET_INFOW;
+} FILE_IN_CABINET_INFO_W, *PFILE_IN_CABINET_INFO_W;
 
 DECL_WINELIB_TYPE_AW(FILE_IN_CABINET_INFO)
 DECL_WINELIB_TYPE_AW(PFILE_IN_CABINET_INFO)
 
-typedef struct _CABINET_INFOA {
+typedef struct _CABINET_INFO_A {
   PCSTR CabinetPath;
   PCSTR CabinetFile;
   PCSTR DiskName;
   USHORT SetId;
   USHORT CabinetNumber;
-} CABINET_INFOA, *PCABINET_INFOA;
+} CABINET_INFO_A, *PCABINET_INFO_A;
 
-typedef struct _CABINET_INFOW {
+typedef struct _CABINET_INFO_W {
   PCWSTR CabinetPath;
   PCWSTR CabinetFile;
   PCWSTR DiskName;
   USHORT SetId;
   USHORT CabinetNumber;
-} CABINET_INFOW, *PCABINET_INFOW;
+} CABINET_INFO_W, *PCABINET_INFO_W;
 
 DECL_WINELIB_TYPE_AW(CABINET_INFO);
 DECL_WINELIB_TYPE_AW(PCABINET_INFO);

Index: setupapi/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/Makefile.in,v
retrieving revision 1.23
diff -u -r1.23 Makefile.in
--- setupapi/Makefile.in	11 Oct 2003 01:09:17 -0000	1.23
+++ setupapi/Makefile.in	18 Oct 2003 18:47:35 -0000
@@ -13,7 +13,6 @@
 C_SRCS = \
 	devinst.c \
 	dirid.c \
-	infparse.c \
 	install.c \
 	parser.c \
 	queue.c \
@@ -22,6 +21,7 @@
 
 C_SRCS16 = \
 	devinst16.c \
+	infparse.c \
 	setupx_main.c \
 	virtcopy.c
 
Index: setupapi/infparse.c
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/infparse.c,v
retrieving revision 1.20
diff -u -r1.20 infparse.c
--- setupapi/infparse.c	11 Sep 2003 02:58:46 -0000	1.20
+++ setupapi/infparse.c	18 Oct 2003 18:47:35 -0000
@@ -36,6 +36,7 @@
 #include "winuser.h"
 #include "winnls.h"
 #include "setupapi.h"
+#include "setupx16.h"
 #include "setupapi_private.h"
 #include "wine/debug.h"
 
Index: setupapi/setupapi_private.h
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/setupapi_private.h,v
retrieving revision 1.5
diff -u -r1.5 setupapi_private.h
--- setupapi/setupapi_private.h	27 Aug 2003 23:12:36 -0000	1.5
+++ setupapi/setupapi_private.h	18 Oct 2003 18:47:35 -0000
@@ -19,8 +19,15 @@
 #ifndef __SETUPAPI_PRIVATE_H
 #define __SETUPAPI_PRIVATE_H
 
-#include "wine/windef16.h"
-#include "setupx16.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "winreg.h"
+#include "setupapi.h"
 
 #define COPYFILEDLGORD	1000
 #define SOURCESTRORD	500
@@ -31,18 +38,6 @@
 #define REG_INSTALLEDFILES "System\\CurrentControlSet\\Control\\InstalledFiles"
 #define REGPART_RENAME "\\Rename"
 #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager"
-
-typedef struct tagLDD_LIST {
-        LPLOGDISKDESC pldd;
-        struct tagLDD_LIST *next;
-} LDD_LIST;
-
-#define INIT_LDD(ldd, LDID) \
-  do { \
-    memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \
-   (ldd).cbSize = sizeof(LOGDISKDESC_S); \
-   ldd.ldid = LDID; \
-  } while(0)
 
 /* string substitutions */
 
Index: setupapi/setupcab.c
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/setupcab.c,v
retrieving revision 1.3
diff -u -r1.3 setupcab.c
--- setupapi/setupcab.c	11 Sep 2003 02:58:46 -0000	1.3
+++ setupapi/setupcab.c	18 Oct 2003 18:47:36 -0000
@@ -254,9 +254,9 @@
 
 static INT_PTR sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
 {
-  FILE_IN_CABINET_INFOA fici;
+  FILE_IN_CABINET_INFO_A fici;
   PSC_HSC_A phsc;
-  CABINET_INFOA ci;
+  CABINET_INFO_A ci;
   FILEPATHS_A fp;
   UINT err;
 
@@ -375,9 +375,9 @@
 
 static INT_PTR sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
 {
-  FILE_IN_CABINET_INFOW fici;
+  FILE_IN_CABINET_INFO_W fici;
   PSC_HSC_W phsc;
-  CABINET_INFOW ci;
+  CABINET_INFO_W ci;
   FILEPATHS_W fp;
   UINT err;
   int len;

Index: setupapi/setupx16.h
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/setupx16.h,v
retrieving revision 1.12
diff -u -r1.12 setupx16.h
--- setupapi/setupx16.h	8 Sep 2003 19:38:46 -0000	1.12
+++ setupapi/setupx16.h	18 Oct 2003 18:47:37 -0000
@@ -547,4 +547,16 @@
 extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath);
 extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
 
+typedef struct tagLDD_LIST {
+        LPLOGDISKDESC pldd;
+        struct tagLDD_LIST *next;
+} LDD_LIST;
+
+#define INIT_LDD(ldd, LDID) \
+  do { \
+   memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \
+   (ldd).cbSize = sizeof(LOGDISKDESC_S); \
+   ldd.ldid = LDID; \
+  } while(0)
+
 #endif /* __SETUPX16_H */


More information about the wine-patches mailing list