Without unzipping the file (but reading the vbp file from inside of WinZip) I can tell you that there are no DLL's. However it contains two different type libraries (*.tlb) that you'll need to register. Extract them to your System32 folder and in the Start > Run dialog box type: RegSvr32.exe IctxMenu.tlb
and RegSvr32.exe IDataObj.tlb
After that you can open the project and compile it to an ActiveX DLL file (VB will automatically register that for you when you compile it). Now if you have added the registry entries by running the *.REG file you should be all set.
Without unzipping the file (but reading the vbp file from inside of WinZip) I can tell you that there are no DLL's. However it contains two different type libraries (*.tlb) that you'll need to register. Extract them to your System32 folder and in the Start > Run dialog box type: RegSvr32.exe IctxMenu.tlb
and RegSvr32.exe IDataObj.tlb
After that you can open the project and compile it to an ActiveX DLL file (VB will automatically register that for you when you compile it). Now if you have added the registry entries by running the *.REG file you should be all set.
Thankyou.
I Love these forums.
also, just a quick question. Do I need to compile it to run it?
ALSO..
sorry i am a ameteur but my friend really needs this, (and I owe him basically haha),
but I have a procedure that uploads the file.
How would I change the "links" or the "procedures" that come up when you right click?
i get the
"unable to set the version compatible component: " and it gives me the file path to the dll file. (the file path is right, but the folder has no dll)
when I am typing the command in, do I need to put in the whole file path?
Last edited by masfenix; Feb 18th, 2006 at 12:38 PM.
i get the
"unable to set the version compatible component: " and it gives me the file path to the dll file. (the file path is right, but the folder has no dll)
Ok, so i opened it in VB, and then I went to "file" and I saw,
"make contextmenu.dll"
and i made it into system 32 folder.
so now what about CLDIS?
This is what I found in the "module" comments:
' to get the GUID compile the dll and then do a registry search for ContextMenu.cMenu.
'The registry entry you find will have the clsid, this is the number you want.
' Place this number in the registry file ContextMenu.reg located with this project.
'To test after you compile and after you reg it and after you place correct registry entires
'then right click on a file. To test you changes, you will have to close all instances of the explorer
'before you can recompile, if you have VERSION COMPATIBILITY set to Binary COMPATIBILITY then you can just
'open explorer again and right click the file.
now how do i do a registry search?
guyz.. you dont even know how much I apprecaite this.
Also, this is the reg file:
REGEDIT4
; ------ FOR YOUR OWN DLL'S -------------------------------------------------------------
; Replace {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} with a valid Classid entry for your dll.
; Also replace the * with the correct place you want it in, and the name of the
; context handler. Usually this stuff is done in a setup program, or by the exe itself.
; ---------------------------------------------------------------------------------------
[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\VBContext]
@="{4A657346-4C64-439B-8A09-E13CE0F7114F}"
; This line makes it so that your DLL is registered for Windows NT.
; Again, change around to your details
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
"{4A657346-4C64-439B-8A09-E13CE0F7114F}"="VB Context Menu"
Last edited by masfenix; Feb 18th, 2006 at 12:56 PM.
Start RegEdit, click Edit > Find and search for ContextMenu.cMenu and you'll see a number looking simular to this: {83E6B0B6-6AE5-449B-8287-8F26E0254F7D} (but with another number). You'll have to replace the number in the REG file with the one you'll find.
I thought you already had compiled it... Otherwise it would be impossible for you to see the CLSID in the registry since it is created when you compile the DLL.
I copied the two tlb files to system 32.
then i ran the two codes from my run dialog. that gave me error
then i opened VB 6 and it gave me error. I ignored it.
I went to "file" menu and saw a "make context menu.dll".
I clicked that and put it in system 32.
I went to regedit.
I found the new code.
I opened up the two registry files in notepad. Editied the old key with new one.
I double clicked them so it enters it.
so.. now what? I press F5 to run it, but it dosnt show my menu.
The step where you clicked File and "Make context menu.dll" is where you compiled it... That what it means, you'll compiling the code into a DLL (or EXE, or OCX depening on what type of project there is).
When you right click on a file in Windows Explorer a new menu item named My NIFTY little Extension Chad should appear (if this code works as it should and you've made the correct changes in the REG file before double clicking it).
Read the sample chapter I linked in Post#5. At the bottom of that page read 'Registration and Operation' topic. Make sure you aren't doing anything wrong when registering.
Do NOT compile the project again unless you have set the Project Compatibility option. Otherwise you'll change the GUID (aka. CLSID) in the registry, and you don't want to do that. You don't have to run the project from VB. The system will (or should) call the code in your compiled DLL when you right click on any file that you have registered to be used with this context menu handler.
Yeah... that context menu doesn't do much but shows a MsgBox from the look of it . If you want to do something else you'll need to change the code in the IGotClicked1 Sub at the bottom of the cMenu class. However changing the code means that you'll need to recompile it, so before you do that follow these steps.
1. Copy the DLL that you created in your System32 folder to the folder where you'll have the source code (or to a subfolder).
2. Inside VB click Project > ProjectName Properties and select the Component tab. Check the Binary Compatibility option at the bottom and Browse to the copy of your DLL file.
3. The textbox should now show the path to the copy of your DLL, click OK to close the dialog box.
4. Do the changes you want to do in the project. Save the Project and Compile it again (File > Make DLL) and replace the origional DLL file in the System32 folder.
If you follow these steps you should not need to change anything in the Registry everything should work.
If I am making a program for others to download and install, I would need to distribute the DLL right? And it will have to add the registry again right?
Yes... You should create a setup package that registers the DLL and that creates the Registry keys you want to use for the context menu... As long as you have the Binary Compatibility option set the GUID will not change even if the DLL is moved to another computer.
In that case, make a install package with a good installer. (like Installshield/InnoSetup).
InstallShild has a option where you can add your reg file. It will take care of registration.
In inno, i think you'l need to write the script manually.
The P&D wizard is a very basic installer. It can't register your reg files.
I guess you are getting "permission denied", because your previous dll is still loaded in memory.
Wait a few minutes and/or unregister the previus dll with
Regsvr32.exe /u dllname.dll
then try again.
i googled my error too and i found that page, but I cant seem to get the steps.
Here are all the steps to reproduce this:
1. Create an ActiveX DLL.
2. Add a standard EXE to the project group to test the DLL.
3. Add a reference in the standard EXE to the DLL.
4. Compile the DLL.
5. Recompile the DLL. You will now get this error.
*** 5a. Remove the DLL from the group. This resets the reference from the ActiveX DLL project to the DLL itself.
6. Test again. Things should be fine.
7. Re-add the DLL to the project group.
8. Recompile the DLL. You will now get this error.