W95INF32 implementation, incase it's useful to anybody

Mike McCormack mike at codeweavers.com
Fri Apr 2 21:54:59 CST 2004


Hi All,

In the process of understanding another bug, I did a little work to 
implement w95inf32, which appears to be a small IE/win9x only DLL and 
which is probably of not much use to Wine. It appears to be a think 
wrapper 32bit around 4 functions in SETUPX.

So this is just for documentation purposes, and incase anybody is 
curious or finds a real need for this DLL.

Mike

-------------- next part --------------
--- /dev/null	1994-07-18 08:46:18.000000000 +0900
+++ dlls/w95inf32/Makefile.in	2004-03-30 12:03:27.000000000 +0900
@@ -0,0 +1,20 @@
+#MKDLL_SKIP
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = w95inf32.dll
+IMPORTS   = setupapi kernel32
+ALTNAMES  = w95inf16.dll
+
+SPEC_SRCS16 = $(ALTNAMES:.dll=.spec)
+
+C_SRCS = \
+	w95inf32.c
+
+ at MAKE_DLL_RULES@
+
+w95inf16.spec.c: w95inf16.spec
+	$(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --spec $(SRCDIR)/w95inf16.spec
+
+### Dependencies:
--- /dev/null	1994-07-18 08:46:18.000000000 +0900
+++ dlls/w95inf32/w95inf32.c	2004-03-29 17:07:20.000000000 +0900
@@ -0,0 +1,91 @@
+/*
+ * W95INF32 - This is a small 32bit interface to SETUPX
+ *
+ * Copyright 2004 Mike McCormack for CodeWeavers
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+
+#include "setupapi.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(w95inf32);
+
+BOOL WINAPI CtlSetLddPath32( LPSTR x, LPSTR y )
+{
+    FIXME("%s %s\n", debugstr_a(x), debugstr_a(y) );
+    return FALSE;
+}
+
+BOOL WINAPI GenFormStrWithoutPlaceHolders32( LPSTR dst, LPCSTR src, LPCSTR filename )
+{
+    HINF hinf;
+    DWORD ret = 0;
+
+    FIXME("%p %s %s\n", dst, debugstr_a(src), debugstr_a(filename) );
+
+    hinf = SetupOpenInfFileA( filename, NULL, INF_STYLE_WIN4, NULL );
+    if( !hinf )
+        return GetLastError();
+
+    /* FIXME: call LookupStringInTable? */
+    strncpy(dst, src, MAX_INF_STRING_LENGTH );
+
+    SetupCloseInfFile( hinf );
+
+    return ret;
+}
+
+DWORD WINAPI GenInstall32(LPCSTR filename, LPCSTR section, LPCSTR directory, DWORD flags)
+{
+    HINF hinf;
+    void *context;
+    DWORD ret = 0;
+
+    ERR("%s, %s, %s, %08lx\n", filename, section, directory, flags );
+
+    hinf = SetupOpenInfFileA( filename, NULL, INF_STYLE_WIN4, NULL );
+    if( !hinf )
+        return GetLastError();
+
+    context = SetupInitDefaultQueueCallback( 0 );
+    if (!SetupInstallFromInfSectionA( 0, hinf, section, flags, 0, NULL,
+                                      SP_COPY_NEWER_OR_SAME, SetupDefaultQueueCallbackA,
+                                      context, 0, 0 ))
+    {
+        ret = GetLastError();
+        ERR("Failed %08lx\n",ret);
+    }
+
+    SetupTermDefaultQueueCallback( context );
+
+    SetupCloseInfFile( hinf );
+
+    return ret;
+}
+
+BOOL WINAPI GetSETUPXErrorText32(long a, long b, long c)
+{
+    FIXME("\n");
+    return FALSE;
+}
+
--- /dev/null	1994-07-18 08:46:18.000000000 +0900
+++ dlls/w95inf32/w95inf32.spec	2004-03-29 17:04:15.000000000 +0900
@@ -0,0 +1,9 @@
+# w95inf32 functions have @nn in their names...
+# winebuild removes the last @xx in a function name.
+
+1 stdcall CtlSetLddPath32 at 8@8(str str) CtlSetLddPath32
+2 stdcall GenFormStrWithoutPlaceHolders32 at 12@12(ptr str str) GenFormStrWithoutPlaceHolders32
+3 stdcall GenInstall32 at 20@20(str str str long) GenInstall32
+4 stdcall GetSETUPXErrorText32 at 12@12(long long long) GetSETUPXErrorText32
+5 stub w95thk_ThunkData32
+


More information about the wine-devel mailing list