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
Download Visual Studio Add-In

Search Results for "SHARE_INFO_2" in [All]

netapi32

.

            ByRef buf As SHARE_INFO_2, _

.

    #Region "SHARE_INFO_2 Structure Definition"

.

    Public Structure SHARE_INFO_2

.

This function will take as it's third parameter, a number of structures. The second parameter defines which level the third parameter structure is. Acceptable structures are SHARE_INFO_2, SHARE_INFO_502, and under Windows 9x/ME, SHARE_INFO_50.

.

Dim shi2 As SHARE_INFO_2

.

            Dim t As Type = IIf((2 = level), GetType(SHARE_INFO_2), GetType(SHARE_INFO_1))

.

                Dim si As SHARE_INFO_2 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_2)

.

Dim shi2 As SHARE_INFO_2

.

   nStructSize = Marshal.SizeOf(GetType(SHARE_INFO_2))

.

     shi2 = Marshal.PtrToStructure(currentPtr, GetType(SHARE_INFO_2))

.

     currentPtr = New IntPtr(currentPtr.ToInt32 + Marshal.SizeOf(GetType(SHARE_INFO_2)))

.

    Structure SHARE_INFO_2

.

        Dim t As Type = IIf((2 = level), GetType(SHARE_INFO_2), GetType(SHARE_INFO_1))

.

            Dim si As SHARE_INFO_2 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_2)

.
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.
.

    Structure SHARE_INFO_2

.

        Dim pBuffer As New IntPtr(Marshal.SizeOf(GetType(SHARE_INFO_2)))

.

        Dim pCurrent As SHARE_INFO_2

.

            ' Convert Buffer to SHARE_INFO_2

.

            pCurrent = CType(Marshal.PtrToStructure(currentPtr, GetType(SHARE_INFO_2)), SHARE_INFO_2)

.

        struct SHARE_INFO_2

.

                SHARE_INFO_2 shareInfo = (SHARE_INFO_2)

.

                    Marshal.PtrToStructure(ptr, typeof(SHARE_INFO_2));

Structures

.

    public struct SHARE_INFO_2

.

    Private Structure SHARE_INFO_2

.
Documentation
[SHARE_INFO_2] on MSDN

Enums

.
Summary
Defines the values of the Type field for the SHARE_INFO_2 struct
.
Documentation
[SHARE_INFO_2] on MSDN

 
Access PInvoke.net directly from VS: