|
Hi i'm unable to download the file.
|
|
|
|
|
I've problem to compile it on visual c++ 6.0 in windows 2000. Can you help me?
|
|
|
|
|
My program want query a specific url and see if the url was visited already.
|
|
|
|
|
Hi !
In Windows XP the run history dont clear...
Why ?
Thank you
|
|
|
|
|
Hi and really a nice question.
There are several possible reasons like....
some program have default ability to invoke itself when windows starts Like anti virus.(every time win boots they starts)
Some program binds their code with one of the running and important processes like "winlogon" or else (means every time this process starts that code executed and starts.
try "msconfig" command in run and u'ii get some more explanation on this .
|
|
|
|
|
Hi !
In Windows XP the run history dont clear...
|
|
|
|
|
run history will clear after logout
|
|
|
|
|
Hi, I was trying to copy/move some file from Temporary Internet Files to some other directory. In my application I used function MoveFile("....\\Temporary Internet Files\\Banner.gif","....Cat.gif") but it doesn't work.
With some other directories it works fine. Why is Temporary Internet Files dir so special, and what function will nicely move file from Temp... to some other dir???
Please,help!!!
|
|
|
|
|
actually the files in TIF r stored in some other folder names like EX00GFF in the conent.ie5 foler so just find that folder and chek
|
|
|
|
|
Clearing IE forms autocomplete does not seem to work if you are not logged on with Administrator privileges on Windows 2000. I assume this must be because of limited registry and security privileges on accounts below Administrator. Is there a way around this?
|
|
|
|
|
I think by making windows services to do the job you can go around this.
|
|
|
|
|
Yes, using regmon, services.exe modifies the registry when the forms autocomplete is cleared in internet explorer. How can you make windows services do this?
|
|
|
|
|
I think there's a more efficient way to kill popup windows: hook into the OnNewWindow2 event and set Cancel to VARIANT_TRUE.
Best regards,
Chris
|
|
|
|
|
That would mean no window whatsoever would be able to open, not even legitimate ones...
|
|
|
|
|
Same to me I want to write Popup add killer Like "Popup Ad filter" which auto kill popads but none of usefull links
Ibrar Ahmad
Softare Engr.
Comcept PVT LTD.
Islamabad
abrar_@yahoo.com
|
|
|
|
|
How to kill auto popup windows like Smart Explorer or MyIE or Ad Muncher? But not disable the popup window when click the Link like "JScript:Popwin(download)".
Thanx
|
|
|
|
|
Same to me I want to write Popup add killer Like "Popup Ad filter" which auto kill popads but none of usefull links
Ibrar Ahmad
Softare Engr.
Comcept PVT LTD.
Islamabad
abrar_@yahoo.com
|
|
|
|
|
Myie is a open-source soft, you may search on internet to download it.
Myie has the function of "disable auto popup window".
|
|
|
|
|
First, let me say that you did an excellent job and wrote a lot of excellent code. The readers of this site should be very grateful that you posted this code because it does contain a lot of good samples on how to code certain things.
Unfortunately, your code has a number of serious Design & Coding Problems. I have written a LOT of programs like this one for many companies and your approach to the design of the application is very bad for use as a REAL application in the REAL world for several reasons as follows:
1) You are NOT using Browser Helper Objects correctly. BHOs fail very often when their are more than one BHO listed in the registry and this varies as a function of the version of IE installed. The CORRECT way to use BHO is to create a list of existing BHOs and determine if your GUID will sort above them alphabetically---if not, you must create a new GUID for your BHO that starts with something like {0000001..... so it will appear at the TOP of the list of BHOs--BHO are loaded alphabetically in sequence. And the commercial applications I write remove all the other BHO until my DLL has load and THEN I restore the other GUIDs back to the registry--this is what professional application programmers do.
2) NEVER use the BHO to do anything except to launch another program or toolbar and then exit IMMEDIATELY! The BHO itself should NEVER be used as part of the application because it creates a lot of coding problems and SLOWS the performance of any sink application!
****For example, consider to problem of launching a NEW instance of IE from within your application. If you do this, you will notice that you are in a vicious loop that is a diaster for the user:
LRESULT OnPopupSoftware(WORD /*wNotifyCode*/,WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
BSTR bsURL;
bsURL = SysAllocString(OLESTR("http://www.codeproject.com"));
LauchIEBrowser(bsURL);
SysFreeString(bsURL);
return 0;
}
/////////// CAUSES VICIOUS LOOP!!! ///////////
void LauchIEBrowser(BSTR bstrURL)
{
// Instantiate a browser
IWebBrowser2* pWebBrowser = NULL;
HRESULT hr = NULL;
VARIANT vtEmpty;
vtEmpty.vt = VT_EMPTY;
VARIANT vtURL;
vtURL.vt = VT_BSTR;
vtURL.bstrVal = bstrURL;
if (FAILED(hr = CoInitialize(NULL))) {
return;
}
if (FAILED(hr = CoCreateInstance(CLSID_InternetExplorer,
NULL, CLSCTX_SERVER, IID_IWebBrowser2, (LPVOID*)&pWebBrowser))) {
goto Error;
}
try {
// Make it visible
if (pWebBrowser != NULL) {
hr = pWebBrowser->put_Visible(VARIANT_TRUE);
hr = pWebBrowser->Navigate2(&vtURL, &vtEmpty, &vtEmpty, &vtEmpty, &vtEmpty);
HWND hwnd = NULL;
pWebBrowser->get_HWND((long *) &hwnd);
if ( hwnd != NULL ) {
//::SetForegroundWindow(hwnd);
::ShowWindow(hwnd, SW_SHOWMAXIMIZED);
}
////////////////////////// CORRECT WAY TO SHOW BAND ///////////////////////
// AUTHOR: BILL SERGIO
// NOTE: MSDN gives an INCORRECT example of how to do this!
// You MUST pass "&vtEmpty" and NOT "0" as last parameter!
//
// Display Explorer ToolBar
VARIANT vtBandGUID, vtShow;
vtBandGUID.vt = VT_BSTR;
vtBandGUID.bstrVal = SysAllocString(OLESTR("{5D570CA3-3123-11D5-B8D0-D2E7CAE90E45}"));
vtShow.vt = VT_BOOL;
vtShow.boolVal = true;
// You MUST pass "&vtEmpty" and NOT "0" as last parameter!
pWebBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, &vtEmpty);
SysFreeString(vtBandGUID.bstrVal);
///pWebBrowser->Release();
/////////////////////////////////////////////////////////////////////////////
}
}
catch(...){goto Error;}
SysFreeString(vtURL.bstrVal);
Error:
// Clean up
VariantClear(&vtURL);
SysFreeString(vtURL.bstrVal);
if (pWebBrowser) {
pWebBrowser->Release();
}
return;
}
//////////////////////////
When you launch the new IE window it calls the BHO which calls your program, etc....... This code would work fine if you only used the BHO to launch your application but it results in a deadly loop that the user can't exit from in your application. So to make the simple act of opening a new browser window and loading a toolbar in your program work you would need a LOT of unnecessary additional programming resulting in very poor performance.
Finally, while I do write a lot of ATL/WTL crap, I think MFC is VASTLY superior for creating SINK applications. For example, I can rewrite your entire application in 15 minutes using MFC and create an exe that is 1/3 the size with far better performance by NOT making the exe a COM object itself which just slows down the sink. I have also found it is far better to place all of the sink code in a .lib file for much better performance.
But parts of your code are very well down.
Bill SerGio
|
|
|
|
|
First, thanks your comment.
I am not a specialist of BHO programming, and I have some questions to ask you.
Bill SerGio wrote:
1) You are NOT using Browser Helper Objects correctly. BHOs fail very often when their are more than one BHO listed in the registry and this varies as a function of the version of IE installed. The CORRECT way to use BHO is to create a list of existing BHOs and determine if your GUID will sort above them alphabetically---if not, you must create a new GUID for your BHO that starts with something like {0000001..... so it will appear at the TOP of the list of BHOs--BHO are loaded alphabetically in sequence. And the commercial applications I write remove all the other BHO until my DLL has load and THEN I restore the other GUIDs back to the registry--this is what professional application programmers do.
If all BHOs are writed like yours, how can you ensure your BHO is loaded before others?
In addition, I have never found my BHO fail.
Bill SerGio wrote:
2) NEVER use the BHO to do anything except to launch another program or toolbar and then exit IMMEDIATELY! The BHO itself should NEVER be used as part of the application because it creates a lot of coding problems and SLOWS the performance of any sink application!
You are right. But there is no such problem in my application.
Bill SerGio wrote:
Finally, while I do write a lot of ATL/WTL crap, I think MFC is VASTLY superior for creating SINK applications. For example, I can rewrite your entire application in 15 minutes using MFC and create an exe that is 1/3 the size with far better performance by NOT making the exe a COM object itself which just slows down the sink. I have also found it is far better to place all of the sink code in a .lib file for much better performance.
I am very interest in what you say.
How can you make a static linked MFC application smaller than using WTL?
What inter-process communication method you want to use if not making the exe a COM object? (I didn't find performace issue in COM invoking).
How to increase the performance by placing all of the sink code in a .lib file? How to place all of the sink code in a .lib file?
Hope you can understand my poor English.
|
|
|
|
|
Let me say again that I thought your code was excellent!
My comment refers only to the "design" of the program.
Look at the sample code I posted in my comment that launches a new instance of IE and place this code into your program. You will see that your program no longer works if you launch a new instance of IE from your exe file using the code I posted. It can be done but would require using some very bad coding fixes to get around this---this same situation can occur as a result of loading a web page with certain types of javascript coding.
Another solution, is to change the "design" of the application and place the SINK code in your BHO inside of your exe and to solve this problem and other problems inherent in this type of design.
As far as BHO goes, I learned from installing sink software on millions of computers that you can NOT go by how something works on your computer. Microsoft has commented in the MSDN on this problem with BHOs and it has NEVER been fixed. I create a GUID that starts with {00001 or as LOW a value as I can which means it will be executed first. In many of my programs I go one step further and also REMOVE all of the other BHOs listed in the registry---with the user's permission and make sure that ONLY my BHO is listed in the registry while my program is running.
I will probably post a sample of a SINK library in the next 2 weeks and i will email you to see how I do it using MFC.
Best regards,
Bill SerGio
|
|
|
|
|
I am waiting for you sample.
Thanks & regards
|
|
|
|
|
Hi,
Excelent code.
I tried emailing you but email bounced back so using this form.
Can i use your code to make my application.
Can u make index.dat cleaner or add it to this ?
Thanks and keep up the good work.
PS : i wonder what else u have done other than this.
Regards,
Ashish t
|
|
|
|
|
A Good explanation of what BHO are for, is avaliable at What is a Browser Helper Object. As far as the principle of merely using a BHO to launch an instance of your executable file, I see NO point to this once so ever. BHO are to allow your application to monitor and interact with Internet Explorer and Windows Explorer windows. If you attempt to use the BHO to launch another exe, and then use that exe to monitor events and interact with windows, then you are in fact doing the same exact task that a BHO does. The only difference is that instead of slowing the performance of Internet Explorer or Windows Explorer, you will slow the performance of the ENTIRE machine, by attempting to monitor all system messages for the desired information.
BHO are an easy way for you to monitor the messages of an existing Internet Explorer, or Windows Explorer window so that you may interact with them as needed, without trying to monitor the messages through the use of PeekMessage or some through some other means.
Bill SerGio wrote:
As far as BHO goes, I learned from installing sink software on millions of computers that you can NOT go by how something works on your computer.
True enough!!!
Bill SerGio wrote:
Microsoft has commented in the MSDN on this problem with BHOs and it has NEVER been fixed. I create a GUID that starts with {00001 or as LOW a value as I can which means it will be executed first. In many of my programs I go one step further and also REMOVE all of the other BHOs listed in the registry---with the user's permission and make sure that ONLY my BHO is listed in the registry while my program is running.
Actually what you are reffering to is a very specific case of BHO error regarding only Internet Explorer 5.00. Instances of Internet Explorer 4.* and IE5.01+,IE6.0+ etc, do not exhibit this problem. Your proposed solution however, is most unethical and disrespectful. Knowing that your BHO will only work on IE5 if it is the first one installed, you should NEVER disrespect another programmers work by making your GUID one number less!!! That is disrespectful and unethical! What you should do, is prompt the user to install a different version of Internet explorer that is capable of handling multiple BHO and let the user know that if they continue using IE5.00 then only one BHO will be installed and usable. Secondly, your proposed unethical solution, creates many potential problems when a user decides to remove your BHO from the registry manually. Using a GUID that varies, will create many potential problems when attempting to tell a user how to uninstall your software, hence a steady pre-known GUID should always be used. If the user decides not to upgrade their browser from IE5.01 (or to downgrade to IE4.x) then you prompt the user to uninstall all other BHO's and to not allow your BHO to be installed untill the user has either changed browsers or else uninstalled the remaining BHO on IE5.00 Ideally you should include a copy of IE5.01 or higher with your BHO making it easy for the user to use all installed BHO without having to play any unethical tricks, and without having to disrespect other programmers... Playing a "me first, no me first" kind of game with GUID's and BHO is what little children do in the lunch line at school. That is most UN-profressional behavior and should not be tolerated in any work environment. Your software should be programmed to be tolerant of other applications, otherwise you risk your software breaking when someone programs their object as you programmed yours, in addition you will find that consumers do not like being told what software will load on their computer and what will not. A profressional programmer would already know this... And I think there needs to be more respect paid to other programmers and their software instead of people playing a "me first" kindergarten style game with their "professional" software...
If you are not monitoring Internet Explorer or Windows explorer messages, then you are correct, you should launch your application perform the task and exit. However, you are monintoring the messages for example to detect DISPID_BEFORENAVIGATE2 so that before a user navigates to a page, you can check the url and stop them from veiwing the page, then making a seperate exe to do this, rather than the currently loaded BHO, is not going to make a difference because you will still have to monitor the messages rather it is from within IE\Windows Explorer or from wihout. The only real change is that instead of being mapped to IE memory space, you will be mapped to Windows memory space, and instead of being able to be notified, you will have monitor all messages from the application for the correct one.
Nothing is impossible, It's merely a matter of finding an answer to the question of HOW? ... And answering that question is usually the most difficult part of the job!!!
|
|
|
|
|
Hi Bill,
if you wrote LOTS of code like this, why didnt you post it to Codeproject and let us participate in your experience and knowledge? Apparently there are many programmers, how are interested in stuff like this. Take a look to the other postings...
Bye
Dirk
|
|
|
|