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 "out" in [All]

glossary

.

Youtube.com

misc

.
Summary
A place to leave general comments about the site.
.

I was quite excited when I found this site, but I was somewhat disappointed with the incomplete nature of some of the information. For example, I was looking for some assistance with the SHBrowseForFolder call from Shell32, and I did find it -- but it is only a tease since the definition for BROWSEINFO is not available! OK, so I had figured most of that part out myself, but I then looked for details on SHGetDesktopFolder, and the same thing is true -- there is no definition of the output of that call!

.

I need to use this call to permit the user to browse the network neighborhood and select a specific computer system, and the .Net implementation of the wrapper for this does not seem to support the BIG_BROWSEFORCOMPUTER option! If anyone has figured this out, could they please post the information to this web site and let me know at MAILTO:kendrhyd@sympatico.ca? Thanks.

.

Upon seeing this I realized that a Microsoft.Win32.dll is possible. Has anyone tried 'mechancally' creating such a library? I'm sure others are thinking about it. Cut and paste is nice, but no work is better Maybe there would be Micrsoft.XP.Win32.dll, Microsoft.2000.Win32.dll as well? I'm ready to go to work, any takers?

.

You should also check out these automatically generated PInvoke stubs which covers much of the WIn32 API

.

How about a directory for the Compact Framework/coredll? - Ian Darling

.
  • Charlie, I'll have to consider other means of tracking. In the meantime, it would be great if folks fill out the "Identity" text box when making edits. Also, you can click on the "Show Recent Changes" link to see the most-recently-updated pages across the site.
.

Great idea. I would also be interested in a category on PInvoke how-tos. for example I'm still trying to figure out how to unmarshal an array of delegates on the unmanaged side - feel free to chime in if you happen to know that

.

Greate Job! I installed Flexwiki out of the box and it is not the same. This site is much better (you fixed and improved a lot of things in Flexwiki). Now I am learning more about PInvoke

.

If I may suggest, how about code syntax highlighting similar or better to what is done in http://wikiserver.has.it ? That is, for example, in the preformatted part, <PRE> If it starts with '//' highlight Csharp words until the end </PRE>. Great for sample codes in this site. Or since this wiki is all about codes in C#, why not do syntax coloring in all preformatted texts? Just a thought.

.

public static bool CPAcquireContext(out IntPtr phProv, StringBuilder pszContainer, uint dwFlags, byte[] pVTable){

.

    return CPAcquireContextCe(out phProv, pszContainer, dwFlags, pVTable);

.

    return CPAcquireContextXp(out phProv, pszContainer, dwFlags, pVTable);

.

private static extern bool CPAcquireContextCe(out IntPtr phProv, StringBuilder pszContainer, uint dwFlags, byte[] pVTable);

.

private static extern bool CPAcquireContextXp(out IntPtr phProv, StringBuilder pszContainer, uint dwFlags, byte[] pVTable);

.

This site's been live for about a month, now -- either it's not getting indexed completely by Google, or there is nearly complete neglect for SetLastError=true. Or both.

.

I'd go so far as to recommend always mandating SetLastError -- explicitly setting SetLastError=false, to call out the (comparatively rare) Win32 functions that don't expose a failure path through GetLastError.

.

Any ideas about M3JPEG32.dll ? I'm trying to call a function from my code, but I probably don't have the correct parameters. I'll attach it in email. Thanks, Mechi

.

"Folks like you are sharing gotchas, tips, and samples specific to managed code. For example, check out why you shouldn't call CoInitializeSecurity from managed code."

3: FAQ
.

For additional help checkout the help pages at www.flexwiki.com. http://www.flexwiki.com/default.aspx/FlexWiki/FormattingRules.html

.
Summary
Books & websites about .NET interoperability with unmanaged code.
.

You definately need to get the site working in non-IE browsers. And you may want to consider removing the fading page transitions. I don't know about other people but I personally find them irritating. -- Adrian Ritchie (http://www.gringod.com)

oleaut32

.

   [MarshalAs(UnmanagedType.IUnknown)] out Object ppunk);

.

   [MarshalAs(UnmanagedType.IUnknown)] out Object ppunk);

.

   <MarshalAs(UnmanagedType.IUnknown), Out> ppunk As Object) As Integer

.

static extern int LoadTypeLib(string fileName, out ITypeLib typeLib);

.
Summary
The RegisterTypeLib function adds information about a type library to the registry.
.

static extern int VarBstrFromDisp(IntPtr Disp, int lcid, int dwFlags, [MarshalAs(UnmanagedType.BStr)] out string pbstrOut);

.

Declare Function VarBstrFromDisp Lib "oleaut32.dll" (Byval Disp as IntPtr, Byval lcid As Integer, Byref pbstrOut as String) As Integer

.

   string pbstrOut;

.

   int hr = VarBstrFromDisp(Marshal.GetIDispatchForObjectInContext(pComObject), Thread.CurrentThread.CurrentCulture.LCID, 0, out pbstrOut);

.

    private extern static int VariantChangeTypeEx([MarshalAs(UnmanagedType.Struct)]out object pvargDest,

.

There is a lot to write about automation variables. E.g. a parameter can be optional and thus, have a default value which is in the TYpeLib. Or VT_ERROR | DISP_E_PARAMNOTFOUND (which is equivalent to VarType() = vbMissing). This is passed to .NET as Type.Missing. See sample code.

.

     int hr = VariantChangeTypeEx(out Conv, ref OptionValue, Thread.CurrentThread.CurrentCulture.LCID, 0, (short)VarEnum.VT_BSTR);

.

Public Shared Sub memset(<[In](), Out()> ByVal dest As IntPtr, _

userenv

.

static extern bool CreateEnvironmentBlock( out IntPtr lpEnvironment, IntPtr hToken, bool bInherit );

.

    static extern int CreateProfile( [MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath);

.

            public static extern int CreateProfile([MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath);

.

  __out     PGROUP_POLICY_OBJECT* ppGPOList

.

        out IntPtr pGPOList);

.

[in, out] Pointer to a PROFILEINFO structure. LoadUserProfile will fail and return ERROR_INVALID_PARAMETER if the dwSize member of the structure is not set to sizeof(PROFILEINFO) or if the lpUserName member is NULL. For more information, see the following Remarks section.

netapi32

.

        // Read the string out of memory

.

        // If a site could not be found for this address, pSiteName will be 0, so only marshal out the string if

.

                            out IntPtr Domains,

.

                            out uint DomainCount);

.

     DS_DOMAIN_DIRECT_OUTBOUND     = 0x0002,  // Domain is directly trusted

.

[StructLayout(LayoutKind.Sequential)]

.

Domains is an out parameter that receives a pointer to an array of DS_DOMAIN_TRUSTS structures. Each structure in this array contains trust data about a domain. The caller must free this memory when it is no longer required by calling NetApiBufferFree.

.

     uint trustTypes = (uint)(DS_DOMAIN_TRUST_TYPE.DS_DOMAIN_PRIMARY | DS_DOMAIN_TRUST_TYPE.DS_DOMAIN_DIRECT_OUTBOUND);

.

                           out buf,

.

                           out numDomains);

.

     [StructLayout(LayoutKind.Sequential)]

.

     DS_DOMAIN_DIRECT_OUTBOUND     = 0x0002,  // Domain is directly trusted

.

     out IntPtr Domains,

.

     out uint DomainCount);

.

    out IntPtr pDOMAIN_CONTROLLER_INFO

.

Pointer to a PDOMAIN_CONTROLLER_INFO value that receives a pointer to a DOMAIN_CONTROLLER_INFO structure that contains data about the domain controller selected. This structure is allocated by DsGetDcName. The caller must free the structure using the NetApiBufferFree function when it is no longer required.

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    out IntPtr pDOMAIN_CONTROLLER_INFO

.

     DSGETDCNAME_FLAGS.DS_IP_REQUIRED, out pDCI);

.

     out IntPtr DnsHostName //will have to marshal this one manually

.

    [In, Out] ref IntPtr sockAddressCount,

.

    out IntPtr sockAdresses, out IntPtr dnsHostName);

.

[out, optional] Pointer to a ULONG value that receives the number of elements in the SockAddresses array. If this parameter is NULL, socket addresses are not retrieved.

.

[out, optional] Pointer to an array of SOCKET_ADDRESS structures that receives the socket address data for the domain controller. SockAddressCount receives the number of elements in this array.

.

[out, optional] Pointer to a string pointer that receives the DNS name of the domain controller. This parameter receives NULL if no host name is known. The caller must free this memory when it is no longer required by calling NetApiBufferFree.

.

         out pDnsHostName

.

        iReturn = DsGetDcOpen("domain1.mydomains.com", 1, "MYADSITE", (System.IntPtr)null, null, 0, out pDcContext);

.

                int rc = DsGetDcNext(pDcContext,ref ptr1,out ptr2,out pDnsHostName);

.

     out IntPtr RetGetDcContext

.

    out IntPtr retGetDcContext

.

out Pointer to a HANDLE value that receives the domain controller enumeration context handle. This handle is used with the DsGetDcNext function to identify the domain controller enumeration operation. This handle is passed to DsGetDcClose to close the domain controller enumeration operation.

.

    iReturn = DsGetDcOpen("domain1.mydomains.com", 0, null, (System.IntPtr)null, null, 0, out pDcContext);

.

    iReturn = DsGetDcOpen("domain1.mydomains.com", 1, "MYADSITE", (System.IntPtr)null, null, 0, out pDcContext);

.

    out System.Int64 EntryCount,

.

    out IntPtr SiteNames

.

int i = DsGetDcSiteCoverage("myDCname.domain1.mydomains.com", out lEntryCount, out pSiteNames);

.

static extern UInt32 DsGetSiteName([MarshalAs(UnmanagedType.LPTStr)]string ComputerName, out IntPtr SiteNameBuffer);

.

    <Out()> ByRef SiteNameBuffer As IntPtr) As UInt32

.

UInt32 result = DsGetSiteName(ComputerName, out pBuffer);

.

        [Out] out IntPtr buffer);

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

        int lastWin32Error = DsRoleGetPrimaryDomainInformation(server, infoLevel, out buffer);

.

private static extern uint LsaQueryInformationPolicy(IntPtr PolicyHandle, uint InformationClass, out IntPtr Buffer);

.

        if (!LookupAccountName(this.ResourceName, this.UserName, Sid, ref cbSid, referencedDomainName, ref cchReferencedDomainName, out sidUse))

.

            if (!LookupAccountName(this.ResourceName, this.UserName, Sid, ref cbSid, referencedDomainName, ref cchReferencedDomainName, out sidUse))

.

        uint aOpenPolicyResult = LsaOpenPolicy(ref aSystemName, ref aObjectAttributes, aAccess, out aPolicyHandle);

.

        uint retval = LsaQueryInformationPolicy(aPolicyHandle, infoclass, out bufptr);

.

    /// The NetDfsEnum function enumerates all the Distributed File System (Dfs) links in the named Dfs root. The function returns information about the Dfs links based on information specified by the Level parameter.

.

    /// <param name="Buffer">[out] Pointer to the address of a buffer that receives the requested information structures. The format of this data depends on the value of the Level parameter. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. </param>

.

    /// <param name="EntriesRead">[out] Pointer to a value that receives the actual enumerated DFS link count. </param>

.

    /// <param name="ResumeHandle">[in, out] Pointer to a value that contains a handle which is used to continue the enumeration. The handle should be zero on the first call and left unchanged for subsequent calls. For more information, see the following Remarks section. Windows Server 2003:  If ResumeHandle is NULL, then no resume handle is stored.</param>

.

        out IntPtr Buffer,

.

        [MarshalAs(UnmanagedType.I4)]out int EntriesRead,

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.
Summary
The NetDfsGetClientInfo function retrieves information about a Distributed File System (Dfs) root or a link in the named Dfs root. The information represents the current computer's cached copy of the information about the Dfs link.
.

    out IntPtr Buffer                        // API allocates and returns buffer with requested info

.

    int result = NetDfsGetClientInfo(arguments[0], null, null, 3, out buffer);

.

    int result = NetDfsGetClientInfo(arguments[0], null, null, 3, out buffer);

.

    out IntPtr Buffer                    // API allocates and returns buffer with requested info

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _

.

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _

.

        int res=NetDfsGetInfo(args[0], null, null, 4, out buf);      

.

        out IntPtr Buffer

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]

.
Summary
The NetFileEnum function returns information about some or all open files on a server, depending on the parameters specified
.

     out int entriesread,

.

     out int totalentries,

.

    int dwStatus = NetFileEnum(null, null, null, 3, ref pBuffer, MAX_PREFERRED_LENGTH, out dwReadEntries, out dwTotalEntries, IntPtr.Zero );

.

static extern NetApiStatus NetGetDCName(string serverName, string domainName, out IntPtr buffer);

.

        NetApiStatus result = NetGetDCName(null, null, out domainInfo);

.

  out IntPtr domain,

.

  out NetJoinStatus status);

.

        result = NetGetJoinInformation(null, out pDomain, out status);

.

    out Int32 parm_err     //Parameter error index

.

             out IntPtr bufptr,

.

             out int entriesread,

.

             out int totalentries,

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential)]

.

The largest challenge is marshaling the pointer to the array of structures which the output is placed in.

.

In this example, I use a do/while which doubles the size of the buffer until it is large enough to contain all of the groups that are on the server. The API call is designed so that you can read sequentially (ERROR_MORE_DATA), but I didn't want to deal with marshaling returned data stored in more than one of the pointers to the array of structures which the output is placed in!

.

                    out bufptr,

.

                    out entriesread,

.

                    out totalentries,

.

        out SID_NAME_USE SIDUse);

.

    [StructLayout(LayoutKind.Sequential)]

.

        if (!LookupAccountSid(null, baSid, sbName, ref uiName, sbReferencedDomainName, ref uiReferencedDomainNameCount, out eUse))

.

            out SID_NAME_USE SIDUse);

.

        [StructLayout(LayoutKind.Sequential)]

.

            if (!LookupAccountSid(null, baSid, sbName, ref uiName, sbReferencedDomainName, ref uiReferencedDomainNameCount, out eUse))

.

            out SID_NAME_USE SIDUse);

.

            if (!LookupAccountSid(null, baSid, sbName, ref uiName, sbReferencedDomainName, ref uiReferencedDomainNameCount, out eUse))

.
Summary
Returns information about each local group account on the specified server.
.

       out IntPtr bufptr,

.

       out int entriesread,

.

       out int totalentries,

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential)]

.

The largest challenge is marshaling the pointer to the array of structures which the output is placed in.

.

In this example, I use a do/while which doubles the size of the buffer until it is large enough to contain all of the groups that are on the server. The API call is designed so that you can read sequentially (ERROR_MORE_DATA), but I didn't want to deal with marshaling returned data stored in more than one of the pointers to the array of structures which the output is placed in!

.

                    out bufptr,

.

                    out entriesread,

.

                    out totalentries,

.

               out IntPtr bufptr,

.

               out int entriesread,

.

               out int totalentries,

.

                res = NetLocalGroupEnum(serverName, level, out buffer, MAX_PREFERRED_LENGTH,

.

                    out read, out total, ref handle);

.

            out IntPtr bufptr,

.

            out int entriesread,

.

            out int totalentries,

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

            int val = NetLocalGroupGetMembers(ServerName, GroupName, 2, out bufPtr, -1, out EntriesRead, out TotalEntries, Resume);

.

       out uint entriesRead,

.

       out IntPtr Buffer);

.

lret = NetQueryDisplayInformation(strDomain, 3, lindex, 100, MAX_PREFERRED_LENGTH, out lread , out x);

.

        lret = NetQueryDisplayInformation(DomainController, 1, lindex, reqRecs, MAX_PREFERRED_LENGTH, out lread, out UsrBuf);

.

    [ StructLayout( LayoutKind.Sequential)]

.

    [StructLayout( LayoutKind.Sequential )]

.

    [StructLayout( LayoutKind.Sequential )]

.

    int Level,     int ResumeHandle,     int EntriesRequested,    int prefMaxLength,    out int entriesRead,     out System.IntPtr Buffer);

.

        lret = NetQueryDisplayInformation(strDomain, 3, lindex, 1, 1024, out lread , out x);

.

        lret = NetQueryDisplayInformation(strDomain, 1, lindex, 1, 1024, out lread , out x);

.

        lret = NetQueryDisplayInformation(strDomain, 2, lindex, 1, 1024, out lread , out x);

.

        [StructLayout(LayoutKind.Sequential)]

.

    /// <param name="JobId">An output parameter.</param>

.

        (string Servername, IntPtr Buffer, out int JobId);

.

    ''' <param name="JobId">An output parameter.</param>

.

    [StructLayout(LayoutKind.Sequential)]

.

    /// Flags to specify info about the jobs.

.

    out IntPtr bufptr,

.

    out int entriesread,

.

    out int totalentries,

.

            out IntPtr bufptr,

.

            out int entriesread,

.

            out int totalentries,

.

        [StructLayout(LayoutKind.Sequential)]

.

        [StructLayout(LayoutKind.Sequential)]

.

                int ret = NetServerEnum(null, 100, out bufptr, MAX_PREFERRED_LENGTH, out entriesRead, out totalEntries, serverTypes, domain, resumeHandle);

.

                int ret = NetServerEnum(null, 101, out bufptr, MAX_PREFERRED_LENGTH, out entriesRead, out totalEntries, serverTypes, domain, resumeHandle);

.

        [StructLayout(LayoutKind.Sequential)]

.

            out IntPtr bufptr,

.

                int ret = NetServerEnum(null,101,out buf,-1,

.

    out IntPtr pSERVER_INFO_XXX);

.

[StructLayout(LayoutKind.Sequential)]

.

[StructLayout(LayoutKind.Sequential)]

.

[StructLayout(LayoutKind.Sequential)]

.

<StructLayout(LayoutKind.Sequential)> _

.

private static extern int NetServerGetInfo(string serverName, int level, out IntPtr pSERVER_INFO_XXX);

.

       int ret = NetServerGetInfo(serverName, level, out ptr);

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    if(DsGetDcName(null, null, null, null, 0, out pDCI)==0)

.

        if(NetServerGetInfo(domainInfo.DomainControllerName, 101, out pSI)==0)

.

I don't know about the LPWStr's, they might not need to be there.

.
Summary
The NetSessionEnum function provides information about sessions established on a server.
.

            out IntPtr bufptr,

.

    ''' The NetSessionEnum function provides information about sessions established on a server.

.

    ''' [out] Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter.

.

    ''' <param name="entriesread">[out] Pointer to a value that receives the count of elements actually enumerated.</param>

.

    ''' <param name="totalentries">[out] Pointer to a value that receives the total number of entries that could have been enumerated from the current resume position. Note that applications should consider this value only as a hint.</param>

.

    ''' <param name="resume_handle">[in, out] Pointer to a value that contains a resume handle which is used to continue an existing session search. The handle should be zero on the first call and left unchanged for subsequent calls. If resume_handle is NULL, no resume handle is stored.</param>

.

    [ StructLayout( LayoutKind.Sequential )]public struct SESSION_INFO_502

.

        /// Out of memory.

.

        /// Unable to contact resource. Connection timed out.

.

    <StructLayout(LayoutKind.Sequential)> Public Structure SESSION_INFO_502

.

        /// <param name="server">Server to get shares for without preceding backslashes.</param>

.

                res = NetSessionEnum(server,null,null,502,out BufPtr,-1,ref er,ref tr,ref resume);

.

        out uint parm_err

.

        [StructLayout(LayoutKind.Sequential)]

.

    <StructLayout(LayoutKind.Sequential)> _

.

    uint result = NetShareAdd(server, 502, ref info, out error);

.

    out SHARE_TYPE type

.

    NetError result = (NetError)NetShareCheck(server, localPath, out shareType);

.

        case NetError.ERROR_NOT_ENOUGH_MEMORY: throw new OutOfMemoryException();

.

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

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.

.

Dim dwEntriesread As Integer     'out

.

Dim dwTotalentries As Integer    'out

.

Dim dwResumehandle As Integer    'out

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

' Added by: Pieter E Jordaan - South Africa

.

    <StructLayout(LayoutKind.Sequential)> _

.

    <StructLayout(LayoutKind.Sequential)> _

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

    out IntPtr bufPtr );

.

    <StructLayout(LayoutKind.Sequential)> _

.

            out IntPtr bufPtr );

.

        [ StructLayout( LayoutKind.Sequential )]

.

int Result = NetShareGetInfo("ArunGanesh", "public",502,out pBuffer);

.

The NetShareGetInfo function retrieves information about a particular shared resource on a server.

.

Check the output result "Result" with the following values to find whether the given folder is shared or not.

.

The following is a C# example; much the same as above. For questions comments feel free to mail mailto:wshore@dstoutput.ca

.

         [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]

.
Summary
The equivalent counter-part to NetShareGetInfo. This lets you set information about an existing share.
.

static extern UInt32 NetShareSetInfo(String servername, String netname, UInt32 level, ref object buf, out UInt32 parm_err);

.

        out IntPtr BufPtr);

.

  int val = NetStatisticsGet(null, "LanmanWorkstation", 0, 0, out bufPtr);

.

     out DWORD ParmError);

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

uint returnCode = NetUseAdd(null, 2, ref useInfo, out paramErrorIndex);

.

            out int EntriesRead,

.

            out int TotalEntries,

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> Public Structure USE_INFO_2

.

            NetUseEnum(null,2,ref lBuffer,0xffffffff,out lRead,out lTotal,lHandle);

.

     out UInt32 parm_err);

.

  <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.

    Dim Out As Integer

.

    Dim RetVal As Integer = NetUserAdd(Server, 1, NewUser, Out)

.
Summary
The NetUserEnum function provides information about all user accounts on a server.
.

       out IntPtr bufptr,

.

       out int entriesread,

.

       out int totalentries,

.

       out int resume_handle);

.

    NetUserEnum(server, 0, FILTER_NORMAL_ACCOUNT, out bufPtr, MAX_PREFERRED_LENGTH, out EntriesRead, out TotalEntries, out Resume);

.

             out IntPtr bufptr,

.

             out int entriesread,

.

             out int totalentries);

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential)]

.

        [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

             out IntPtr bufptr,

.

             out int entriesread,

.

             out int totalentries);

.

            ErrorCode = NetUserGetGroups(ServerName,Username,Flags,out bufPtr,1024,out EntriesRead, out TotalEntries);

.

        out IntPtr BufPtr);  

.

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

                IntPtr bufPtr; // because it's an OUT, we don't need to Alloc

.

                int lngReturn = NetUserGetInfo(MachineName, AccountName, 10, out bufPtr ) ;

.

Imports System.Runtime.InteropServices.StructLayoutAttribute

.

            out IntPtr bufptr,

.

            out int entriesread,

.

            out int totalentries);

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

    [StructLayout(LayoutKind.Sequential)]

.

        [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

             out IntPtr bufptr,

.

             out int entriesread,

.

             out int totalentries);

.

            ErrorCode = NetUserGetLocalGroups(ServerName,Username,0,Flags,out bufPtr,-1,out EntriesRead, out TotalEntries);

.

          [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

          [StructLayout(LayoutKind.Sequential)]

.

            out IntPtr bufptr,

.

            out int entriesread,

.

            out int totalentries);

.

              api.NetUserGetLocalGroups(ServerName,Username,0,Flags,out bufPtr,1024,out EntriesRead, out TotalEntries);

.

              //ErrorCode = api.NetUserGetLocalGroups(ServerName,Username,0,Flags,out bufPtr,1024,out EntriesRead, out TotalEntries);

.

            [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

                out IntPtr bufptr,

.

                out Int64 entriesread,

.

                out Int64 totalentries);

.

                api.NetUserGetLocalGroups(ServerName, Username, 0, Flags, out bufPtr, 1024, out EntriesRead, out TotalEntries);

.

                //ErrorCode = api.NetUserGetLocalGroups(ServerName,Username,0,Flags,out bufPtr,1024,out EntriesRead, out TotalEntries);

.

static extern uint NetUserModalsGet(string server, int level, out IntPtr BufPtr);

.

IntPtr bufPtr; // because it's an OUT, we don't need to Alloc

.

uint lngReturn = NetUserModalsGet(@"\\" + Environment.MachineName, 0, out bufPtr);

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: