Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "NetShareEnum" in [All]

netapi32

.

retval = NetShareEnum(SvrNameBldr, 2, BufPtr, MAX_PREFERRED_LENGTH, dwEntriesread, dwTotalentries, dwResumehandle)

.

private static extern int NetShareEnum(

.

Declare Unicode Function NetShareEnum Lib "netapi32.dll" _

.

    Public Shared Function NetShareEnum( _

.

I believe that all of these samples are slightly incorrect in that they do not deal with the case where NetShareEnum does not retrieve all of the shares on a server in a single call. The caller is supposed to check for ERROR_MORE_DATA and then do the appropriate thing. This may be an edge case not worrying about, but anyone writing code for big environments should validate the assumption that all shares will be fetched with a single call.

.

        nRet = NetShareEnum(server, level, pBuffer, -1, entriesRead, totalEntries, _

.

            nRet = NetShareEnum(server, level, pBuffer, -1, entriesRead, totalEntries, _

.

retval = NetShareEnum(SvrNameBldr, 2, BufPtr, MAX_PREFERRED_LENGTH, dwEntriesread, dwTotalentries, dwResumehandle)

.

     int ret = NetShareEnum(server,0,ref bufPtr,MAX_PREFERRED_LENGTH,ref entriesread,ref totalentries,ref resume_handle);

.

    private static extern int NetShareEnum(

.

        int ret = NetShareEnum(server, 1, ref bufPtr, MAX_PREFERRED_LENGTH, ref entriesread, ref totalentries, ref resume_handle);

.

    Declare Unicode Function NetShareEnum Lib "netapi32.dll" _

.

        nRet = NetShareEnum(svr, level, pBuffer, -1, entriesRead, totalEntries, _

.

        nRet = NetShareEnum(svr, level, pBuffer, -1, entriesRead, totalEntries, _

.
Documentation
[NetShareEnum] on MSDN
.
Summary
Gets information about a single share. BufPtr points to a SHARE_INFO_2 structure. See NetShareEnum for example code of how to convert this to a usable structure.

 
Access PInvoke.net directly from VS: