PATCH: avifil32

Marcus Meissner meissner at suse.de
Fri Jul 1 15:10:44 CDT 2005


Hi,

This fixes the report from some days ago, where
aviinfo no longer worked.

We now call OleInitialize() in AVIFileInit() to
have appartment threading etc. set up for the later
CoCreateInstance() call(s).

Ciao, Marcus

Changelog:
	Use CoCreateInstance instead of SHCoCreateInstance,
	drop shell32 from imports.
	Call OleInitialize() on AVIFileInit.


Index: Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/avifil32/Makefile.in,v
retrieving revision 1.33
diff -u -r1.33 Makefile.in
--- Makefile.in	9 May 2005 14:42:36 -0000	1.33
+++ Makefile.in	1 Jul 2005 20:05:38 -0000
@@ -4,7 +4,7 @@
 VPATH     = @srcdir@
 MODULE    = avifil32.dll
 IMPORTLIB = libavifil32.$(IMPLIBEXT)
-IMPORTS   = msacm32 msvfw32 shell32 winmm ole32 user32 advapi32 kernel32 ntdll
+IMPORTS   = msacm32 msvfw32 winmm ole32 user32 advapi32 kernel32 ntdll
 EXTRALIBS = -luuid
 
 C_SRCS = \
Index: api.c
===================================================================
RCS file: /home/wine/wine/dlls/avifil32/api.c,v
retrieving revision 1.33
diff -u -r1.33 api.c
--- api.c	21 Mar 2005 10:55:13 -0000	1.33
+++ api.c	1 Jul 2005 20:05:39 -0000
@@ -176,8 +176,7 @@
  *		AVIFileInit		(AVIFILE.100)
  */
 void WINAPI AVIFileInit(void) {
-  /* need to load ole32.dll if not already done and get some functions */
-  FIXME("(): stub!\n");
+  OleInitialize(NULL);
 }
 
 /***********************************************************************
@@ -186,6 +185,7 @@
  */
 void WINAPI AVIFileExit(void) {
   /* need to free ole32.dll if we are the last exit call */
+  /* OleUnitialize() */
   FIXME("(): stub!\n");
 }
 
@@ -253,8 +253,7 @@
     memcpy(&clsidHandler, lpHandler, sizeof(clsidHandler));
 
   /* create instance of handler */
-  hr = SHCoCreateInstance(NULL, &clsidHandler, NULL,
-			  &IID_IAVIFile, (LPVOID*)ppfile);
+  hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIFile, (LPVOID*)ppfile);
   if (FAILED(hr) || *ppfile == NULL)
     return hr;
 
@@ -493,8 +492,7 @@
   if (pclsidHandler == NULL)
     return AVIERR_UNSUPPORTED;
 
-  hr = SHCoCreateInstance(NULL, pclsidHandler, NULL,
-			  &IID_IAVIStream, (LPVOID*)ppavi);
+  hr = CoCreateInstance(pclsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIStream, (LPVOID*)ppavi);
   if (FAILED(hr) || *ppavi == NULL)
     return hr;
 
@@ -751,8 +749,7 @@
   } else
     memcpy(&clsidHandler, pclsidHandler, sizeof(clsidHandler));
 
-  hr = SHCoCreateInstance(NULL, &clsidHandler, NULL,
-			  &IID_IAVIStream, (LPVOID*)ppsCompressed);
+  hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIStream, (LPVOID*)ppsCompressed);
   if (FAILED(hr) || *ppsCompressed == NULL)
     return hr;
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050701/b7c96122/attachment.pgp


More information about the wine-patches mailing list