Article View: borland.public.cppbuilder.nativeapi
Article #10189Weird api function behavior question...Help
From: Martin C
Date: Mon, 03 May 2004 04:16
Date: Mon, 03 May 2004 04:16
32 lines
1957 bytes
1957 bytes
Hi all,
I really have a strange problem here with the following code, this code
should erase the Internet Explorer history. Although what happens actually
is that it works fine on some machines and don't work at all on some other
machines.
What is really weird is that I tested this code on two machine both have
Windows XP home edition, Internet Explorer 6.0.2800 and it worked more than
fine on the first machine and erased the Internet Explorer history, although
it didn't work at all on the other machine!!!!
Can someone please tell me why this is happening?! Is it a Windows problem,
Internet Explore bug? or code problem?
Thank you so in advance.
HRESULT result;
IUrlHistoryStg2 *UrlHistoryStage2_ptr = NULL;
SetLastError(0);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
result = CoCreateInstance(CLSID_CUrlHistory, NULL, CLSCTX_INPROC,
IID_IUrlHistoryStg2, reinterpret_cast<void**>(&UrlHistoryStage2_ptr));
if (SUCCEEDED(result))
{ result = UrlHistoryStage2_ptr->ClearHistory();
UrlHistoryStage2_ptr->Release();
}
CoUninitialize();
Technical Details
Message-ID:
<40959dea@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,db8edbdaa454f2dc,start X-Google-Attributes: gid10cc67,public From: "Martin C" <martincplus@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Weird api function behavior question...Help Date: Sun, 2 May 2004 22:16:20 -0600 Lines: 34 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 81.10.4.238 Message-ID: <40959dea@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1083547114 81.10.4.238 (2 May 2004 18:18:34 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail