VB.Net and My Network places

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been a VB programmer for about 2 years. I'm a new user to VB.net,
about two weeks; I'm trying to write just a small App to start with, that
will do a Net send function. I would like to fill a combobox with data from
My Network places, in VB6 we can use the API function WNetOpenenum and
WNetEnumResource, VB.Net seems to have a lot of problems with these functions
for it has a Parameter declared AsAny. I have tried to change the parameter
declaration but have been unable to find the correct declaration. Does anyone
out there no of a Class or Function in VB.Net that handle Enumeration of My
Network Places. The System.Envoriment.Systemfolders only handles the paths
and doesn’t seem to handle My Network Places.
 
"My Network Places" is a special Shell Namespace Extension. I'm not sure
how you access them if they aren't in the list of "Special Folders"
available via System.Environment.

I wish I knew though!
 
Hi,

Maybe this will help
http://www.onteorasoftware.com/downloads/remoteregistry.zip

Ken
-------------------------
I have been a VB programmer for about 2 years. I'm a new user to VB.net,
about two weeks; I'm trying to write just a small App to start with, that
will do a Net send function. I would like to fill a combobox with data from
My Network places, in VB6 we can use the API function WNetOpenenum and
WNetEnumResource, VB.Net seems to have a lot of problems with these
functions
for it has a Parameter declared AsAny. I have tried to change the parameter
declaration but have been unable to find the correct declaration. Does
anyone
out there no of a Class or Function in VB.Net that handle Enumeration of My
Network Places. The System.Envoriment.Systemfolders only handles the paths
and doesn't seem to handle My Network Places.
 
Hope this helps ...

Public Structure NETRESOURCE

Dim dwScope As Integer

Dim dwStructure As Integer

Dim dwDisplayStructure As Integer

Dim dwUsage As Integer

Dim lpLocalName As String

Dim lpRemoteName As String

Dim lpComment As String

Dim lpProvider As String

End Structure

Public Declare Function WNetOpenEnum Lib "mpr.dll" Alias "WNetOpenEnumA"
(ByVal dwScope As Integer, ByVal dwStructure As Integer, ByVal dwUsage As
Integer, lpNetResource As NETRESOURCE, lphEnum As Integer) As Integer

----------------------------------------------------------------------------
------

Public Structure NETRESOURCE

Dim dwScope As Integer

Dim dwStructure As Integer

Dim dwDisplayStructure As Integer

Dim dwUsage As Integer

Dim lpLocalName As String

Dim lpRemoteName As String

Dim lpComment As String

Dim lpProvider As String

End Structure

Public Declare Function WNetEnumResource Lib "mpr.dll" Alias
"WNetEnumResourceA" (ByVal hEnum As Integer, lpcCount As Integer, lpBuffer
As NETRESOURCE, lpBufferSize As Integer) As Integer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top