473,799 Members | 3,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shell Extension

yxq
Hello
I have some code about shell extension, it works well, but when i choose
more than a txt files and right-click, click open, system popup a dialog
"InvokeCommand" , system can not open the txt files, i do not know what
reason.

*************** *************** *************** *************** *************** *
***************

' Carries out the command associated with
' a context menu item.
'
Private Sub IContextMenu_In vokeCommand(lpi ci As shlext.CMINVOKE COMMANDINFO)
Dim Idx As Long, Verb As String
On Error Resume Next

' Check if lpVerb is an string pointer
' or the ID

If (lpici.lpVerb \ &H10000) <> 0 Then

' lpVerb is a string so
' copy it from the pointer
Verb = StrFromPtrA(lpi ci.lpVerb)

' Search the items array for
' the command and convert
' it to the item index
For Idx = 0 To UBound(m_Items)
If m_Items(Idx).Ve rb = Verb Then
Exit For
End If
Next

Else
Idx = lpici.lpVerb

' Do the action asociated
' with the menu item

Dim fileNames As String

Select Case Idx

Case 0

For Idx = 0 To UBound(m_Select edFiles)
If fileNames = "" Then
fileNames = m_SelectedFiles (Idx)
Else
fileNames = fileNames & "," & m_SelectedFiles (Idx)
End If
Next

Call Shell(App.Path & "\application1. exe /" & fileNames,
vbNormalFocus)
Case 1

For Idx = 0 To UBound(m_Select edFiles)
If fileNames = "" Then
fileNames = m_SelectedFiles (Idx)
Else
fileNames = fileNames & "," & m_SelectedFiles (Idx)
End If
Next

Call Shell(App.Path & "\application2. exe /" & fileNames,
vbNormalFocus)
End Select

End If

End Sub
*************** *************** *************** *************** *************** *
*******

Thanks
Nov 20 '05 #1
0 942

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

Similar topics

3
3717
by: Tiziano Bettio | last post by:
Hi there I'm looking for a simple solution of a win32 shell extension (virtual drive). It should make available a new drive with letter, which will be read-only. Instead of a network drive or similar it then should query a server application for directory/file listing. Would be nice to have a lib or similar for that.
2
4175
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! I'm currently writting a program in which there is a file/folder list which mimics part of Explorer's list. I've got it pretty much cornered, but I still have a couple of problems :
4
2721
by: yxq | last post by:
Hello Can anyone tell me Context Menu shell extension? It is better that provide some samples or links. Thanks
1
1266
by: Luhar | last post by:
Greetings, I'd like to write a shell extension so that a user can right-click on any file, regardless of its extension, and my extension will appear as one of the choices on the context menu that pops up. Any suggestions? Thanks,
5
4613
by: gjuro kladaric | last post by:
it was not possible to make a shell extension from within VB2003, I believe has anything changed since then, can I (easily) write a VB code that would function as a shell extension thank you gjuro
6
1613
by: Pieter | last post by:
Hi, I'm trying to use the Edanmo Shell Extension Library (http://www.mvps.org/emorcillo/en/code/shell/shellextensions.shtml) to make a Context Menu in the Windows Explorer with VB.NET 2005. It seems realy easy to use this library: - I inherited from ContextMenuHandlerBase - I made the assembly COM-visible - Registered for COM interop
1
2209
by: James Maeding | last post by:
I was looking for the easiest way to add an item to explorer's right click menus, and I found what looks to be a goldmine. There is a vb.net project available on: http://www.mvps.org/emorcillo/en/code/shell/shellextensions.shtml that encapsulates the ugly stuff and gives an easy way to make the dll explorer will look for as the extension handler. Only problem is, I don't see how it "runs". All the other progs to do shell extensions are...
3
2580
by: Shafiq | last post by:
Hi, I am trying to insert a new toolbar button to the windows explorer menu. I an able to locate the correct ToolbarWindow32, and inserted a button using the code snippet shown below. However the toolbar button text is coming in jung characters. Any help will be greatly appreciated. Int32 iBitmap = 0;
2
1934
by: Jeff Gaines | last post by:
I am in the process of upgrading to XP 64. VS2008 is running fine but one of my apps, which adds functionality to the Explorer context menu, just won't work under XP 64. Googling resulted in my finding an article saying that MSFT recommends against writing shell extensions in managed code and does not consider them a supported scenario. So, can anybody point me to any articles relating to writing shell extensions in non managed code...
5
2905
by: AGP | last post by:
I have been looking far and wide for an easy to implement shell extension. My needs are basic...for two file extensions .YYY and .ZZZ I would like the context menu in explorer to simply show my app icon and "Open with MyCooolApp". Are there any recommendations for a shell extension code base? I am trying to look for one that is easily changed and compiled and will run as a unique extension to my app. Rgds AGP
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10484
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.