473,411 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

IExtractImage error in Windows 2000

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);

Nov 17 '05 #1
2 1841
Raymond explains it very nicely here:

https://blogs.msdn.com/oldnewthing/a...13/281910.aspx

You need to be apartment threaded, not mulitthreaded.

Cheers
Matt

Ed Neary wrote:
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);


Nov 17 '05 #2
Raymond explains it very nicely here:

https://blogs.msdn.com/oldnewthing/a...13/281910.aspx

You need to be apartment threaded, not mulitthreaded.

Cheers
Matt

Ed Neary wrote:
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);


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: B Golash | last post by:
Hi I`m trying to install a third-party control. During the install I receive this error...see the url below. I have no idea as to the meaning of the error. ...
3
by: PW | last post by:
Hi, I'm using WinXP-Pro, ASP classic, IIS 5.0. I regularly get this error, but I know I am the only user accessing the website at the time of the error. I looked it up on the MS support...
2
by: Mike Fisher | last post by:
I'm seeing an error when I try to run/debug a web service. Although it doesn't happen every time, it does occur more than half of the times I hit F5. It appears to be returned by the the JIT...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
0
by: Ed Neary | last post by:
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...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
4
by: Matthew Louden | last post by:
My ASP.NET application runs ok locally, but after I upload all the files to IIS in Windows Server 2003 Standard Edition, and no longer works. This has the following error messages: Configuration...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
0
by: rose.kevin | last post by:
Hi I am trying to get Windows Explorer to display thumbnails for my own custom filetype. I have found plenty examples out there telling me how to extract thumbnails from explorer for your own...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.