Hi, i would like to use the SHBrowseForFolder API in vb.net
this site
i copied it to my vb.net program, i changed all the long's to integers because intergs now are 32bit, Replaced Type with Structure
and used this code to run it...
VB Code:
Dim bi As New BROWSEINFO() Dim pidl As Integer bi.hOwner = Me.Handle.ToInt32 bi.pidlRoot = 0& bi.lpszTitle = "Select Directory" bi.ulFlags = BIF_RETURNONLYFSDIRS pidl = SHBrowseForFolder(bi) Call CoTaskMemFree(pidl)
now if i run that, i get a error on line
pidl = SHBrowseForFolder(bi) with this error..
Additional information: Object reference not set to an instance of an object.
can someone please explain what is wrong?
thanks
P.S nearly 100 Posts![]()




Reply With Quote