Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Shell, pidl & Monikers

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Win32
Win32  
Author Message
X
Guest





PostPosted: Wed Jul 12, 2006 7:29 pm    Post subject: Shell, pidl & Monikers Reply with quote

Raymond Chen: Pidls and monikers do roughly the same thing, just backwards

"A pidl, on the other hand, spends most of its life in its persistence
format. Only when you bind to it does a live COM object come out.
Consider, for example, the case where you enumerated the contents of a
shell folder. This produces a pidl for each item in the folder, but producing
and retaining that pidl doesn't require that the code for each item be
loaded and initialized. A folder with a thousand items produces a thousand
little chunks of data, not a thousand COM objects."
Back to top
X
Guest





PostPosted: Wed Jul 12, 2006 7:33 pm    Post subject: Reply with quote

Working with Item ID Lists

- Walking a PIDL
- Calculating the Size of an Identifier List
- Making a Copy of a PIDL
- Obtaining the Parent of a PIDL
- Relative and Full PIDLs
- Deleting a PIDL
- Simple ID Lists


msdn: Shell Constants, Enumerations and Flags and CSIDL values:

"CSIDL values provide a unique system-independent way to identify
special folders used frequently by applications, but which may not have
the same name or location on any given system. For example, the
system folder may be "C:\Windows" on one system and "C:\Winnt" on
another. These constants are defined in Shlobj.h and Shfolder.h."
Back to top
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Tue Jul 25, 2006 1:37 pm    Post subject: Shell Extensions tutorial Reply with quote

At The Code Project: The Complete Idiot's Guide to Writing Shell Extensions - Part I,
by Michael Dunn.

"A shell extension is a COM object that adds some kind of functionality to
the Windows shell (Explorer). There are all kinds of extensions out there,
but very little easy-to-follow documentation about what they are."


Edit: The Complete Idiot's Guide to Writing Shell Extensions - Index
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Jul 25, 2006 6:02 pm    Post subject: Reply with quote

The Code Project: How to Implement Drag and Drop Between Your Program and Explorer,
by Michael Dunn.

"A step-by-step description of how to drag and drop files between your
application and Explorer windows."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Jul 25, 2006 6:14 pm    Post subject: Reply with quote

"Minimize your application to system tray instead of the taskbar:"

Adding Icons to the System Tray,
by Chris Maunder

"This class is a light wrapper around the windows system tray stuff. It
adds an icon to the system tray with the specified ToolTip text and callback
notification value, which is sent back to the Parent window."


Easy Animated Tray Icon,
by Steve Schaneville

"This is a class (SS_TrayIcon) that creates a tray icon in the system
tray, allowing easy integration into any project, whether or not you use
MFC."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Jul 26, 2006 10:21 pm    Post subject: Reply with quote

Nice thread: IShelllink->Resolve shortcuts is drive A

" I am trying to resolve a shortcut whose target is at drive A (ex: a:\test.exe).
When there is no diskette in drive A, an error dialog will pop, saying "No disk
in drive A".


And this one: IShell GetPath results in Access Violation (on some machines infrequently)

"I am trying to resolve a shortcut link (target.lnk) using IShellLink/IPersistFile
interfaces. Here is the code that does it. Is there something wrong with this?"


MSDN: Shell Links

"A Shell link is a data object that contains information used to access
another object in the Shell's namespace—that is, any object visible
through Microsoft Windows Explorer. The types of objects that can be
accessed through Shell links include files, folders, disk drives, and
printers. A Shell link allows a user or an application to access an object
from anywhere in the namespace. The user or application does not need
to know the current name and location of the object."


Last edited by delovski on Wed Nov 15, 2006 5:06 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mike
Guest





PostPosted: Mon Jul 31, 2006 7:53 pm    Post subject: Reply with quote

Strange, unexpected: Shell extensions for an operating system

"Conventional operating systems include shells that provide user
interfaces. Unfortunately, such shells are often limited in their capabilities
and in the flexibility of options that they provide to an applications
developer. For example, such conventional operating systems often
provide shells that define context menus for each file system object. The
list of menu items and associated operations provided by the shells for
the context menus are often limited. Moreover, the menu items cannot be
changed by applications."
Back to top
Malik
Guest





PostPosted: Thu Sep 07, 2006 1:02 pm    Post subject: Reply with quote

At CodeGuru: Copying a folder with subfolders

"Is there a way to programatically copy a whole folder with all it's
subfolders without having to iterate all files and subfolder singlehandedly?
If not but somebody has written such a thing please post it here."


"Check out SHFileOperation in MSDN. This allows for wildcards which could
simplify your life a litle."


And a thread on Groups: SHCreateDirectoryEx: CreateDirectory and full path

"... It should create all subdirectories in the current one, nested and all.
I seem to recall this should work -- you guessed right, it didn't."
Back to top
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Sat Sep 09, 2006 8:42 pm    Post subject: WallPaper Reply with quote

how to call a windows function(media player, change desktop paper)

Code:
hr = CoCreateInstance (&CLSID_ActiveDesktop,  NULL, CLSCTX_INPROC_SERVER,
                       &IID_IActiveDesktop,(void**)&pActiveDesktop);
if (hr == S_OK)  {
   hr = pActiveDesktop->SetWallpaper(tempstr, 0);
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Sep 24, 2006 12:44 pm    Post subject: Reply with quote

Shell Blog by MSFT Shell Team

"FYI - for those interested in the Shell, the Windows Shell Team has started
a blog where you can interact directly with the team members."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Oct 01, 2006 8:07 pm    Post subject: Reply with quote

Shell Blog:

Common Questions Concerning the SHFileOperation API: Part 1

"SHFileOperation isn't returning ERROR_INVALID_CATEGORY. In this
example it is actually returning DE_OPCANCELLED (0x75). Don't bother
searching for what DE_OPCANCELLED is. It's not documented.

Many of the error codes returned from SHFileOperation are either old
DOS codes from the pre- Win32 era, or custom error codes defined in the
copy engine for the old File Manager. The SHFileOperation API was
created from this code and first appeared in Windows 95/NT 4."


Common Questions Concerning the SHFileOperation API: Part 2

"Always double-null terminate your paths. This is the most common
error so I am listing it first. The SHFILEOPSTRUCT takes a buffer for the
source (pFrom) and destination (pTo) path(s). These buffers can be
composed of multiple null-delimited paths that are ended with a double
null terminator."
Back to top
View user's profile Send private message Visit poster's website
Sancho
Guest





PostPosted: Sat Dec 02, 2006 7:47 pm    Post subject: Reply with quote

Anyone told you that your forum is amazing? I mean really!

OK, and here is the question: Does anyone here know if there's a book on
the windows shell api, or maybe if some of the COM books covers shell
programming?

I'm looking for something with sample code if possible.

S
Back to top
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Dec 07, 2006 5:14 pm    Post subject: Reply with quote

There is one:

"Visual C++ Windows Shell Programming" by Dino Esposito. I still don't
have it because it's out of print for some time and Amazon would not ship
used books to Croatia.



If you look around, you'll see that a lot of programmers realy like this book.


Last edited by delovski on Fri Feb 09, 2007 3:38 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Wed Jan 17, 2007 11:01 pm    Post subject: Reply with quote

Shell blog: How to reveal a file in Windows Explorer?

"If you want to create a new instance of Windows Explorer, and show the
respective folder in it, just fill in a SHELLEXECUTEINFO structure and specify
the command as "explorer <path>", e.g. "explorer c:\windows\system32\"."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Feb 26, 2007 7:48 pm    Post subject: Reply with quote

Raymond Chen: Please feel free to stop using DDE

"The last shell interface to employ DDE was the communication with Program
Manager to create program groups and items inside those groups. This was
replaced with Explorer and the Start menu back in Windows 95. DDE has been
dead as a shell interface for over ten years."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri May 04, 2007 6:08 pm    Post subject: Reply with quote

OldNewThing: How to manually add a DLL to the allow list

"I learned the hard way when I was creating a shell extension recently that
verclsid.exe will not allow Explorer to load your DLL if you haven't finished
implementing the interfaces you say you implement.

During development, it may be helpful to manually add your shell extension
to the allow list:

http://support.microsoft.com/kb/918165

That's kind of a hackish approach, and you've got to make sure to remove
the entry before you deploy to make sure your final DLL will get verclsid's
blessing."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Thu Sep 27, 2007 5:27 pm    Post subject: Reply with quote

shell blog: Shell Namespace Extension: Adding Custom Command Module Items

"If you are developing your own Namespace and want to include the default
buttons and/or add your own elements to the Commands Module as well, how
do you accomplish this? The answer: you must implement the IExplorerCommand,
IExplorerCommandProvider and IEnumExplorerCommand interfaces."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Wed Nov 07, 2007 1:47 pm    Post subject: Reply with quote

CodeGuru - Wallpaper Changer (VB), by Hannes du Preez

"One of my hobbies is collecting wallpapers. This hobby inspired me to create
an application that can automatically or manually change my computer's
wallpaper. One more thing that inspired me to write this wallpaper changer
was the fact that having a wallpaper changing frequently gives an entire
different feel to the computer screen, as opposed to having one wallpaper
for the entire year."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Thu May 22, 2008 5:37 pm    Post subject: Reply with quote

The Code Project - Accessing All of Windows Special Folders,
by Warrick Procter

"... the WinAPI provides access to those and another 49. Each of the Windows
Special Folders is accessed via an integer constant and the definition of the 58
constants with associated descriptive documentation is a tedious assignment.
I’ve done it and present it here for your future file-fest."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Win32 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group