Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: email Pin
Anonymous1-Feb-05 11:58
Anonymous1-Feb-05 11:58 
GeneralRe: email Pin
Anonymous1-Feb-05 12:30
Anonymous1-Feb-05 12:30 
GeneralListView with a multiline ColumnHeader Pin
Lin Qi31-Jan-05 15:35
Lin Qi31-Jan-05 15:35 
GeneralVBA to C# dll Addin Pin
mitsemaj31-Jan-05 13:53
mitsemaj31-Jan-05 13:53 
GeneralRe: VBA to C# dll Addin Pin
Heath Stewart31-Jan-05 14:01
protectorHeath Stewart31-Jan-05 14:01 
GeneralRe: VBA to C# dll Addin Pin
mitsemaj31-Jan-05 15:24
mitsemaj31-Jan-05 15:24 
GeneralUsing SHFILEINFO to retrieve Special Folder Icons Pin
Drakkhen31-Jan-05 13:20
Drakkhen31-Jan-05 13:20 
GeneralRe: Using SHFILEINFO to retrieve Special Folder Icons Pin
Heath Stewart31-Jan-05 13:48
protectorHeath Stewart31-Jan-05 13:48 
If you read the linked documentation in the Platform SDK PIDLs are discussed in great detail. The easiest way to get these is to navigate from the desktop to the shell namespace and/or folder to get the PIDL. You can do this easily by creating an RCW (runtime-callable wrapper) using either tlbimp.exe or adding a reference to your project using the COM tab for the "Microsoft Shell Controls and Automation" typelib.

See the Shell Objects for Scripting[^] for documentation. How you use the classes is essentially the same (though not 100%) because the automation objects provide functionality to automation clients like Windows Script, VB6, and RCWs.

It would be easier and require less dependency to P/Invoke SHParseDisplayName, but you really must read the documentation to understand what you're passing, since it requires that you also pass an IBindCtx (the interface is declared as System.Runtime.InteropServices.UCOMIBindCtx, but you must still get an instances by P/Invoking CreateBindCtx).

Experience with shell programming and COM is extremely helpful, and there's a lot of information in the Platform SDK to give you hints on how to do this. Understanding COM interop is also important.

If you have specific questions, please ask. Do first read the documentation, however, since you need to understand the native code in order to know what and how to P/Invoke it correctly, like redefining your SHGetFileInfo signature to access either a string marshaled correct (see the Marshal class for help) or a PIDL, which is an ITEMIDLIST structure which you may or may not have to define depending on how you use it (you could just declare it as an IntPtr if you don't need to parse it yourself).

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
Generalevent invocation Pin
cchere31-Jan-05 12:59
cchere31-Jan-05 12:59 
GeneralRe: event invocation Pin
Heath Stewart31-Jan-05 13:28
protectorHeath Stewart31-Jan-05 13:28 
GeneralRe: event invocation Pin
cchere31-Jan-05 18:05
cchere31-Jan-05 18:05 
GeneralRe: event invocation Pin
Heath Stewart1-Feb-05 6:10
protectorHeath Stewart1-Feb-05 6:10 
GeneralRe: event invocation Pin
cchere4-Feb-05 4:34
cchere4-Feb-05 4:34 
Generalcalling C++ dll function in C# Pin
isamir31-Jan-05 12:25
isamir31-Jan-05 12:25 
GeneralRe: calling C++ dll function in C# Pin
Heath Stewart31-Jan-05 13:14
protectorHeath Stewart31-Jan-05 13:14 
GeneralRotate Flip Image isn't working Pin
adonisv31-Jan-05 12:17
adonisv31-Jan-05 12:17 
GeneralRe: Rotate Flip Image isn't working Pin
Charlie Williams31-Jan-05 12:32
Charlie Williams31-Jan-05 12:32 
GeneralAhhhhhh Sank you sahh! Pin
adonisv31-Jan-05 16:11
adonisv31-Jan-05 16:11 
GeneralProgram crashes.... Pin
Christian Graus31-Jan-05 12:13
protectorChristian Graus31-Jan-05 12:13 
GeneralRe: Program crashes.... Pin
Heath Stewart31-Jan-05 13:19
protectorHeath Stewart31-Jan-05 13:19 
GeneralRe: Program crashes.... Pin
Christian Graus31-Jan-05 13:27
protectorChristian Graus31-Jan-05 13:27 
GeneralRe: Program crashes.... Pin
Heath Stewart31-Jan-05 13:36
protectorHeath Stewart31-Jan-05 13:36 
GeneralRe: Program crashes.... Pin
Christian Graus31-Jan-05 13:50
protectorChristian Graus31-Jan-05 13:50 
GeneralRe: Program crashes.... Pin
Heath Stewart31-Jan-05 13:56
protectorHeath Stewart31-Jan-05 13:56 
GeneralRe: Program crashes.... Pin
Christian Graus31-Jan-05 14:03
protectorChristian Graus31-Jan-05 14:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.