Actually i want to trap the Start Menu, record what the user select through the start menu, I found the following information from MSDN
Start Menu is implemented as MenuBand Object
So we need Create this object by calling CoCreateInstance and obtain a pointer to IShellMenuCallback Interface by passing pointer to this MenuBand object to IShellMenu::Initialize .
So that we can use the IShellMenuCallback::CallbackSM method to get the notification selection or the execution of program through the Start Menu.
But all this , i am not able to do it in vb,
How do i use IShellMenu, IShellMenuCallback
VB.
you might try Eduardo's site at http://www.mvps.org/emorcillo/, you will find the typelib to use in Shell programming along with some samples. You might want to check www.vbaccelerator.com for similar stuff.
I have downloaded the SHLEXT.tlb from vbaccelarator.com
Can u pl tell me how to use IShellExecuteHook 's Execute function in vb
What i understand is Execute is called when any call to ShellExecute or ShellExecuteEx is made by other process
But the i am getting it as a class and a function of the class .
I actually want to trap the opening of the file (filename , program that opens it .etc) .
Here comes SubClassing.................. Hope you're not pressing for this project to be done cause you'll need to learn alot about subclassing and hooking
How can anyone sell information when all the information that they sell is free at the library ?
How come Doctors keep getting smarter yet they cannot cure the common cold ?
If Scientist are right and man evolved from monkey then where did the monkeys' come from ?
Man I love this little dude that waves => <= He just doesn't stop
hmm.. Not Really, Since these functions are undocumented. the parameters and such thing are a bit confusing.
Can someone tell me how to use the Execute function of the IShellExecuteHook
in VB.
Have you check Edanmo link that I gave on my previous post?
There's already an example of how to use the IShellExecuteHook interface.
If you haven't then I suggest you download the sample (it's in windows installer msi format). Look under ShellExecute folder (obviously) in your installation folder, recompile the exechook.dll if you need to.
Then register the dll in the registry. Don't forget to create the ShellExecuteHook a new REG_SZ entry in this location:
and name it the GUID of the exechook.dll ( that's {E33EB92C-9A58-4524-8861-52E908D26E68} at least on my computer)
You will notice that each time you launch an application from the explorer, the information about that application is log in SHLEXEC.Log file in your windows folder
YES I LOOKED IT BEFORE AND DID THAT ,
INFACT THE INSTALLER DOES ALL THE WORK,
the log file is not created anywhere in the system.
i checked all the the things in the registry.
I don't know why ?
Is there any way to debug the class ?
I use WinXP and it works, my log file is in c:\Windows\SHLEXEC.LOG"
You can try the attachment which contain the same dll but have been recompiled with VB 6 SP 6. Just register the dll with RegSvr32.exe
also merge the reg.reg file to make sure the correct GUID is placed on ShellExecute list (the msi installer does not do this)
If it's not working then probably the original author can give you more info.
As for debugging an IShell* implementation, well it's a painfull process, cause the Dll is in Explorer.exe process, so first of all you must kill all explorer.exe process.
If you run WinNT/2000/XP then you must also change this registry value to '0' HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoRestartShell
To run the project from IDE, set the project properties, within the Debugging tab, 'Start program:' to point to explorer.exe.
Well at least the above steps works for VC, never tried it with VB though.
Last edited by Luthv; August 12th, 2004 at 04:34 AM.
Thanks a lot Luthv.
Now its working,
Infact uninstalled the whole thing,
USED the project and comiled it to dll, manually edited the registry and its works,
I use Win2k.
So most of the things are over.
Actually i want to trap the whole thing in my project, in an array that i am already using to capture other thing.
So one way i will do to caputure info from this dll is use the SendMessage function to send custom message to my application. I will store the handle to my application dynamically in the registry and this dll will use this handle and send message to my application In this way i can get info to my application.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.