http://bugs.winehq.org/show_bug.cgi?id=14710
Summary: OleLoadPicturePath loads image in windows but not in wine, could cause access violation in some circumstances Product: Wine Version: unspecified Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: support@robertinventor.com
Created an attachment (id=15202) --> (http://bugs.winehq.org/attachment.cgi?id=15202) source code for program to duplicate the bug
This code works in Windows but not in Wine - running under KDE
WCHAR wpath[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, pszPath, -1, wpath, MAX_PATH); IPicture* pPic=NULL; CoInitialize(NULL);// NOT NEEDED IN WINDOWS // INCLUDED JUST IN CASE IT IS NEEDED FOR WINE but doesn't fix it. OleLoadPicturePath(wpath, NULL, NULL, NULL, IID_IPicture,(LPVOID*)&pPic); ...
In case where the file does exist, OleLoadPicturePath isn't initialising pPic.
If the app tests for file existence first, and doesn't initialise pPic, the result could be an access violation.
(I'm using the VMWare MultiBrowser Appliance as a way to run Linux on my Vista machine.)
Source code for app attached, obviously replace the example pictures with existing files on your machine.
Hope this helps. The reason my app calls OleLoadPicturePath(..) instead of LoadImage(..) is because it is an easy way to add the capability to load jpegs and gifs without need to add extra image libraries (which would add to the size of the installer).
Not that important for my program, just means the users would have to convert the skin images to bitmaps in order to use them. But maybe it might affect other programs too, and could cause an access violation if the programmer doesn't initilise the pPic.
Hope this helps, any questions?
Robert
http://bugs.winehq.org/show_bug.cgi?id=14710
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor Component|-unknown |ole32
http://bugs.winehq.org/show_bug.cgi?id=14710
Rob Shearman robertshearman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|ole32 |oleaut32 Ever Confirmed|0 |1
--- Comment #1 from Rob Shearman robertshearman@gmail.com 2008-09-11 01:28:01 --- Yes, it makes sense. Thanks for reporting this problem.
http://bugs.winehq.org/show_bug.cgi?id=14710
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
http://bugs.winehq.org/show_bug.cgi?id=14710
--- Comment #2 from Robert Walker support@robertinventor.com 2008-09-11 07:32:08 --- Just looked at my report again now, some time after I posted it, and I see it was a bit unclear, but maybe you know what I meant.
Should have said:
OleLoadPicturePath should load gifs and jpegs (also .ico and .wmf) as well as bitmaps in Wine since it is able to do that in Windows. As an intermediate fix, if it doesn't load them then it should initialise the pPic to NULL to make sure the calling program doesn't treat an uninitialised pPic as a valid pointer.
http://msdn.microsoft.com/en-us/library/ms678485(VS.85).aspx "The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon), or GIF format."
Hope that is clear now and apologies if you already understood what I meant by the bug report.
Thanks,
Robert
http://bugs.winehq.org/show_bug.cgi?id=14710
--- Comment #3 from Austin English austinenglish@gmail.com 2009-03-30 12:53:37 --- Is this still an issue in current (1.1.18 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=14710
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #4 from Austin English austinenglish@gmail.com 2009-10-01 14:45:21 --- Is this still an issue in current (1.1.30 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=14710
--- Comment #5 from Andrew Nguyen arethusa26@gmail.com 2010-05-19 22:38:38 --- The COM initialization problem is essentially bug 9958. For the output pointer initialization problem, I've sent a patch:
http://source.winehq.org/patches/data/61830
http://bugs.winehq.org/show_bug.cgi?id=14710
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #6 from Andrew Nguyen arethusa26@gmail.com 2010-05-20 11:26:18 --- This should be fixed by dc13339988523e06148037b06b90ffb8070316ac.
http://bugs.winehq.org/show_bug.cgi?id=14710
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org 2010-05-21 14:38:50 --- Closing bugs fixed in 1.2-rc1.