DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Location
    Canberra, Australia
    Posts
    3

    NetShareGetInfo API Call

    Hi All,

    I hope this is the right forum where I can ask a question about API calls in VB.NET, because I have tried in various other forums and got no responses. I'm a newbie to using this forum and generally only tend to use newsgroups after extensively searching the net for a solution.

    I've been trying to get the API NetShareGetInfo running in VB.NET.
    Does anyone have any working examples of getting this to work?

    I am using the following declaration which I don't even know if it is
    correct, but I also need an example of how to use this call this as
    well as I have tried Strings, Char Arrays, everything I can think of
    but there is always errors.

    Declare Auto Function NetShareGetInfo Lib "NETAPI32" ( _
    ByRef ServerName As String, _
    ByRef NetName As String, _
    ByVal Level As Integer, _
    ByRef Buffer As IntPtr _
    ) As Integer

    Thanks in advance!

  2. #2
    Join Date
    Aug 2004
    Location
    Canberra, Australia
    Posts
    3
    Hi again,

    Since there was no replies I have to assume that trying to get .NET to do this API call was a waste of time - and I'll just have to use the VB code that actually works and put a wrapper around it since .NET is incapable of performing this API call.

  3. #3
    Join Date
    Dec 2003
    Posts
    2,750
    I've personally never used it. There is a C# example at:

    http://www.google.com/groups?hl=en&l...D100%26hl%3Den

    I would think that you could also use either WMI or Directory Services as well.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  4. #4
    Join Date
    Aug 2004
    Location
    Canberra, Australia
    Posts
    3
    Thanks Paul - I'll try and translate it!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links