473,839 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using Ishellfolder in vb.net 2005

Hi all.

Does anyone can suggest a good webpage or site, where I could read about how
to use IShellFolder interface in vb .net ?

E.g., I have added reference to IShellFolderEx_ TLB.dll, but what next?
How to pass ITEMIDLIST structures
to IShellFolder components? E.g., I have parsed a name to Parent
IShellfolder in order to get an ITEMIDLIST of subfolder, I get its's
pointer as PIDL of type IntPtr, but the BidToObject method requires first
variable as Integer, and such things as converting ItrPtr.ToInt32 produces
error. I need smth else for passing, but what?
How to manipulate overall with such structures as ITEMIDLIST in vb .net (I
mean extracting pidls using CopyMemory functions and so on)??

All the examples or advices I found in Internet are only for C++ or
acceptable only in VB5-VB6, not for vb.net
Thanks in advance.
Jan 6 '06 #1
2 2709
E.g., I have added reference to IShellFolderEx_ TLB.dll, but what next?
That's a typelib made for VB6 isn't it? I wouldn't recommend using
that for a .NET application, it just complicates things. It's better
to declare the interfaces in managed code and take full advantage of
what the CLR marshaler can do for you.

but the BidToObject method requires first variable as Integer,
That's the kind of problems you avoid by not using the old typelib.

and such things as converting ItrPtr.ToInt32 produces error.
What error?

How to manipulate overall with such structures as ITEMIDLIST in vb .net (I
mean extracting pidls using CopyMemory functions and so on)??


Usually you don't have to directly manipulate ITEMIDLISTs, just pass
around PIDLs. If you have to do it there are APIs for it. But
Marshal.Copy may also be useful.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jan 6 '06 #2
Ok, thanks, I will take Your suggestions in my mind.
"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:e9******** ******@TK2MSFTN GP14.phx.gbl...
E.g., I have added reference to IShellFolderEx_ TLB.dll, but what next?


That's a typelib made for VB6 isn't it? I wouldn't recommend using
that for a .NET application, it just complicates things. It's better
to declare the interfaces in managed code and take full advantage of
what the CLR marshaler can do for you.

but the BidToObject method requires first variable as Integer,


That's the kind of problems you avoid by not using the old typelib.

and such things as converting ItrPtr.ToInt32 produces error.


What error?

How to manipulate overall with such structures as ITEMIDLIST in vb .net (I
mean extracting pidls using CopyMemory functions and so on)??


Usually you don't have to directly manipulate ITEMIDLISTs, just pass
around PIDLs. If you have to do it there are APIs for it. But
Marshal.Copy may also be useful.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Jan 7 '06 #3

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

Similar topics

1
2799
by: neha | last post by:
hi, i m trying to integrate python with apache on linux.For this i m using mod_python. I dont see any problem with the versions of python,apache and mod_python i m using. the versions i m using are apache version2. mod_python v3.1.14 python2.4 The problem is,when i m running my python script,after starting apache
15
4786
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is not validate based on some given rules. I also have a custom error handling page to show the...
8
1536
by: Mike Owen | last post by:
Hi, I am trying to pre-compile a project prior using ASP.Net 2.0, VS 2005, to putting it onto a live server. The reason for doing this is that other people have access to the server, and I thereofre want to keep the code secure. If I use the 'Build/Publish Web Site' option, it asks me to tell it the 'Target location' which in this case is 'C:\Temp\PrecompiledWeb\Project1'
10
2088
by: Bob | last post by:
Hi there, Can anyone point me to anything relating to using XP's built-in CD writing support from VB.Net... or even C#, or classic VB...? I just want to write files to the CD and finalise the session and disk. Cheers
4
2253
by: Robin Tucker | last post by:
I can't get this damned IEnumIDList thing to work correctly. I've got the desktop folder as an IShellObject (which I've verified by being able to get the display name etc. from it). I can also get a pointer to the IEnumIDList object via. GetIEnum. It even allows me to execute the "Fetch" method on the interface (changed from "Next" because next is a VB keyword - in any case, its just a function pointer in the VTable). But COM_pIDL...
4
368
by: Nicola Garone | last post by:
Hi all, I need to enumerate pidl in a directory which I got (I think) the rigt pidl, but I don't know how to procede. here is a piece of code (folder is a IShellFolder object and it seems to work correctly) Dim idEnum As IEnumIDList Dim pidEnum As IntPtr folder.EnumObjects(IntPtr.Zero, _
1
2134
by: Andrius B. | last post by:
Hi. My problem concerns vb .net 2005. I want to use IShellFolder interface for such functions as ParseDisplayname. But how to parse a string - folder name (I mean, adding terminating nullchar or smth.) to parsedisplay method? For exzample, if I want to get PIDL for drive C: , should I use smth. like "C:\" & vbNullChar ??? This code below gets no PIDL (t.i, zero). Private Declare Function SHGetDesktopFolder Lib "shell32.dll" _...
0
1198
by: ME | last post by:
I can't seem to delete records using an objectdatasource. The object is a Typed Collection built by Visual Studio that access a SQL Database. When I try to delete using the ObjectDataSource it displays a message that says: Value cannot be null. Parameter name: Original_Description This URL is supposed to be a documented titled "Data Deletion Using the ObjectDataSource Control" but it doesn't seem to work (as of posting)....
3
1958
by: Tom | last post by:
I'm building a web application using VS 2005. This application uses Windows authentication to 'authenticate'. However, when I test it (debug) via the VS 2005 built-in test server, it doesn't work. I.E. It won't authenticate. Is there a way to do Windows authentication using the built-in VS 2005 test server? Thanks in advance. Tom --
0
10586
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...
1
10648
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10293
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
9426
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...
1
7828
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7017
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
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
5866
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3134
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.