Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

IExtractImage error in Windows 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed Neary - 28 Jun 2005 17:35 GMT
When I attempt to extract a thumbnail from a simple JPG in Windows 2000 I get
an error.  This works fine in Windows XP and 2003 Server.  
The error is 0x80004002 - "No such interface supported".

I have called ::CoInitializeEx(NULL, COINIT_MULTITHREADED); before running
this code.

Below is the code snippet showing the failure

      DWORD   dwPriority    = 0;
       DWORD   dwFlags       = IEIFLAG_SCREEN;
       HBITMAP hBmpImage     = NULL;
       DWORD   dwRecClrDepth = 8;  
       SIZE    prgSize;

       prgSize.cx = lRes;
       prgSize.cy = lRes;

       hr = pIExtract->GetLocation(wszPathBuffer, MAX_PATH, &dwPriority,
                                   &prgSize, dwRecClrDepth, &dwFlags);
       
       if(SUCCEEDED(hr))
       {
// Failure occurs here...  0x80004002 is returned.
-->            hr = pIExtract->Extract(&hBmpImage);
Matt Ellis - 29 Jun 2005 15:00 GMT
Raymond explains it very nicely here:

https://blogs.msdn.com/oldnewthing/archive/2004/12/13/281910.aspx

You need to be apartment threaded, not mulitthreaded.

Cheers
Matt

> When I attempt to extract a thumbnail from a simple JPG in Windows 2000 I get
> an error.  This works fine in Windows XP and 2003 Server.
[quoted text clipped - 21 lines]
> // Failure occurs here...  0x80004002 is returned.
> -->            hr = pIExtract->Extract(&hBmpImage);

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.