Desktop Functions: Smart Device Functions:
|
Search Results for "32" in [All]netapi32
[DllImport("netapi32.dll", CharSet=CharSet.Auto)]
Declare Function DsAddressToSiteNames Lib "netapi32.dll" (TODO) As TODO
throw new Win32Exception(result);
throw new Win32Exception(result);
[DllImport("Netapi32.dll", CallingConvention=CallingConvention.Winapi, SetLastError=true, CharSet=CharSet.Auto)]
Declare Function DsEnumerateDomainTrusts Lib "netapi32.dll" (TODO) As TODO
[DllImport("Netapi32.dll", CallingConvention=CallingConvention.Winapi, SetLastError=true, CharSet=CharSet.Auto)]
[DllImport("Netapi32.dll",EntryPoint="NetApiBufferFree")] 4: DsGetDcClose
[DllImport("Netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
Declare Function DsGetDcClose Lib "netapi32.dll" (TODO) As TODO 5: DsGetDcName
[DllImport("Netapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
Declare Function DsGetDcName Lib "netapi32.dll" (TODO) As TODO
[DllImport("Netapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
[DllImport("Netapi32.dll", SetLastError=true)]
throw new Win32Exception(val); 6: DsGetDcNext
using DWORD = System.UInt32;
[DllImport("netapi32.dll", SetLastError=true)]
[DllImport("Netapi32.dll", EntryPoint = "DsGetDcNextW", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
Declare Function DsGetDcNext Lib "netapi32.dll" (TODO) As TODO
throw new Win32Exception(); //internally calls GetLastWin32Error()
if (!Win32.IsNullHandle(pDnsHostName)) //pNnsHostName != IntPtr.Zero; 7: DsGetDcOpen
using DWORD = System.UInt32;
[DllImport(Netapi32, CharSet=CharSet.Auto, SetLastError=true)]
[DllImport("Netapi32.dll", EntryPoint = "DsGetDcOpenW", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
Declare Function DsGetDcOpen Lib "netapi32.dll" (TODO) As TODO
[DllImport("NetApi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
internal static extern System.Int32 DsGetDcSiteCoverage(
[DllImport("NetApi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
static extern UInt32 DsGetSiteName([MarshalAs(UnmanagedType.LPTStr)]string ComputerName, out IntPtr SiteNameBuffer);
<DllImport("NetApi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
<Out()> ByRef SiteNameBuffer As IntPtr) As UInt32 UInt32 result = DsGetSiteName(ComputerName, out pBuffer);
Dim result As UInt32 = DsGetSiteName("MEASUS", pBuffer) 10: DsRoleFreeMemory
[DllImport("netapi32.dll")]
Declare Function DsRoleFreeMemory Lib "netapi32.dll" (TODO) As TODO
/// <returns>Win32 error code.</returns>
[DllImport("netapi32.dll", CharSet = CharSet.Unicode)]
Declare Function DsRoleGetPrimaryDomainInformation Lib "netapi32.dll" (TODO) As TODO
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
/// <exception cref="Win32Exception">Thrown when the domain information cannot be retrieved.</exception>
int lastWin32Error = DsRoleGetPrimaryDomainInformation(server, infoLevel, out buffer);
if (lastWin32Error != 0)
throw new Win32Exception(lastWin32Error); 15: GOYI4F8Q3D6OTHD0Y3SDEKT4U01CUGOJHY1TIR11XG2AAJV2CNKDL5LQ9CCI5Y6LB6SZB2KSIDX6OO247TWSSCFYN3STVBTUKMXU ��8U5DJ7��y7�Z�r%�32n.0�x�[����X�f���vqev[��A�כ�bf��� tFh�7��bW8E��)�|����F���f����\�J�K�ܬY{ :��c�@���51�Ip�K���@�%��a}5��4�6�S�1��w�N5���JM�G�w8��<:�5|��B�D K>(LP�Rҽ�`����]��m2HZ&戓�H��%"}�J��z��Ʃ�cr"W�H��Y�k�﹄��v�נ�����q��h#x��A�i� Wk�k���J���yW�s�;U�ϧPh/��/ŕ�o�e2ώ�q�������gB���O���H�lk�5����}?��Ѵ=鏔��6���� C����D<���9�gr�Rx(���ޕ��Wi4��Ug��ٓ��[��%{�Ў۳䫯�No2a���-t���٢&�U�N��?�46�{�����/DPhJ� ���A)�uRL��p6u5���w��kh������n�Bz'��q��z"V��WA��ّ�r�L���� W����'ĩ�/7܁��|R�5�\�������ctBu��#Z�U��(���6�7���c���U5*�aӤh��Ō��p�g60e,E���u�T��t!�2��-��Gs��}f���Y�:�r�7�B��,�:��y���&z�QPZԤ���JG�=:�扻��<�"�A8��ö�ڦ�Y^;�Uv�.66�$:°8����AF?N�ObI��3V��1��Bh�pCqt�}o�v�MWrV&d����hQ��1�F>egܭ c�ެ[���f~�ꤥ?�3r�Z��ZS�}�x�"%���/x2�h�lG�����3f��E��Cs{ ��>��6p��f���}ꇬB H%G��.L;���۔Q6/Jș��.w0��� �%h�̊�|��G4N�o�4��dCB���ar�K�5�5�LJ�4(H̄���:�6�2v�ZP&hq����E;E�ޛ:�`���ۦM��o�B�ĜW��n������z?�t�ϖfƅ?5� ��� ՜7/"�C��,���)�)f5�<��}��Kwa��% U����a��#�1H0�g�:\h�;�E}t�X�=������3ME��)&�8��������C(d��g'~�Ǻ�YUV@순�plz��gǏH�]e�t�Fw�B�u$ر�ߵ�/B���W�<C�妢Jwz� bPDRق:/!�bFL(�Ē�{�R}:�����Zc0�9i�|����B>���[���h�q��x�mNxػ�o'��32��d���R��SJv��C(��γ��z�C' ����=l*`��0��^ [DllImport("Advapi32.dll",SetLastError=true, PreserveSig = true)] Declare Function LsaQueryInformationPolicy Lib "Advapi32.dll" (ByVal PolicyHandle As IntPtr, ByVal InformationClass As UInteger, ByRef Buffer As IntPtr) As UInteger
err = Marshal.GetLastWin32Error();
err = Marshal.GetLastWin32Error();
public Int32 MaximumAuditEventCount;
[DllImport("netapi32.dll", SetLastError=true)]
Declare Function NetApiBufferAllocate Lib "netapi32.dll" (TODO) As TODO 18: NetApiBufferFree
[DllImport("Netapi32.dll", SetLastError=true)]
Declare Unicode Function NetApiBufferFree Lib "netapi32.dll" _ 19: NetDfsAdd
[DllImport("Netapi32.dll", CharSet=CharSet.Auto, SetLastError=true)] Declare Function NetDfsAdd Lib "NETAPI32.DLL" (ByVal DfsEntryPath As String, ByVal ServerName As String, ByVal ShareName As String, ByVal Comment As String, ByVal Flags As Long) As Long Declare Function NetDfsAdd Lib "NETAPI32.DLL" (<Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal DfsEntryPath As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal ServerName As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal ShareName As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal Comment As String, ByVal Flags As Uint32) As Long I had a mapping error using the flag as a long. A DWORD is a unsigned 32 bit int. I modified this to match. 20: NetDfsEnum
[DllImport("Netapi32.dll", CharSet = CharSet.Auto/*, SetLastError=true //Return value (NET_API_STATUS) contains error */)]
<DllImport("Netapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Dim State As UInt32
Dim NumberOfStorages As UInt32
UInt32 State;
UInt32 NumberOfStorages;
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
Declare Function NetDfsGetClientInfo Lib "netapi32.dll" (TODO) As TODO
[DllImport("netapi32.dll", SetLastError=true)]
Declare Function NetDfsGetClientInfo Lib "netapi32.dll" (TODO) As TODO 23: NetDfsGetInfo
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode/*, SetLastError=true //Return value (NET_API_STATUS) contains error */)]
<DllImport("Netapi32.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
Dim State As UInt32
Dim NumberOfStorages As UInt32
Dim state As Int32 Declare Unicode Function NetDfsGetInfo Lib "NETAPI32.DLL" (ByVal DfsEntryPath As String, ByVal ServerName As String, ByVal ShareName As String, ByVal Level As Integer, ByRef Buffer As IntPtr) As Integer
Public State As Int32
Public NumberOfStorages As Int32
Public storage As Int32 24: NetDfsMove
/// <param name="Path">The current Win32 path for a Dfs link. The link path should include the Dfs root; for example, '\\MyServer\public\old\link'. </param>
/// <param name="NewPath">The new Win32 path for a Dfs link. The link path should include the Dfs root; for example, '\\MyServer\public\new\link'. </param>
[DllImport("Netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
'/ <param name="Path">The current Win32 path for a Dfs link. The link path should include the Dfs root; for example, '\\MyServer\public\old\link'. </param>
'/ <param name="NewPath">The new Win32 path for a Dfs link. The link path should include the Dfs root; for example, '\\MyServer\public\new\link'. </param>
<DllImport("Netapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _ 25: NetDfsRemove
[DllImport("Netapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
Declare Function NetDfsRemove Lib "NETAPI32.DLL" (<Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> _ 26: NetDfsSetInfo
[DllImport("Netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
Declare Function NetDfsSetInfo Lib "netapi32.dll" (TODO) As TODO
throw new Win32Exception(result); 27: NetFileClose
[DllImport("netapi32.dll", SetLastError=true, CharSet = CharSet.Unicode)]
Declare Unicode Function NetFileClose Lib "netapi32.dll" _ 28: NetFileEnum
[DllImport("netapi32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
Declare Unicode Function NetFileEnum Lib "netapi32.dll" ( _
IntPtr iPtr = new IntPtr(pBuffer.ToInt32() + (dwIndex * Marshal.SizeOf(pCurrent)));
iPtr = New IntPtr(pBuffer.ToInt32 + (dwIndex * Marshal.SizeOf(pCurrent))) 29: NetGetDCName
[DllImport("Netapi32.dll")]
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode)]
<DllImport("Netapi32.dll")> _
<DllImport("Netapi32.dll", CharSet:=CharSet.Unicode)> _
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
Private Declare Unicode Function NetGetJoinInformation Lib "Netapi32.dll" ( _
// Win32 Result Code Constant
[DllImport("Netapi32.dll")]
Private Declare Unicode Function NetGetJoinInformation Lib "Netapi32.dll" ( _
Private Declare Function NetApiBufferFree Lib "Netapi32.dll" _ 31: NetGroupAdd
[DllImport("NetApi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern Int32 NetGroupAdd(
UInt32 level, //info level
out Int32 parm_err //Parameter error index Public Declare Function NetGroupAdd Lib "netapi32.dll" (ServerName As Any ByVal level As Long, Buffer As GroupInfo1, ParmError As Long) As Long 32: NetJoinDomain
[DllImport("netapi32.dll", CharSet=CharSet.Unicode)]
Declare Unicode Function NetJoinDomain Lib "Netapi32.dll" _
[DllImport("netapi32.dll", CharSet = CharSet.Unicode)] 33: NetlGroupEnum
[DllImport("Netapi32.dll")]
Declare Function NetlGroupEnum Lib "netapi32.dll" (TODO) As TODO
[DllImport("NetApi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern Int32 NetLocalGroupAddMembers(
UInt32 level, //info level
UInt32 totalentries //number of entries
Declare Function NetLocalGroupAddMembers Lib "netapi32.dll" (TODO) As TODO
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[DllImport("netapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static class Win32ErrorCodes
byte[] baSid = new byte[] { 1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2 };
if (result == Win32ErrorCodes.NERR_Success || result == Win32ErrorCodes.MemberInAlias)
throw new Win32Exception(result); 35: NetLocalGroupDel
[DllImport("NetApi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern Int32 NetLocalGroupDelMembers(
UInt32 level,
UInt32 totalentries
Declare Function NetLocalGroupDelMembers Lib "netapi32.dll" (TODO) As TODO
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static class Win32ErrorCodes
byte[] baSid = new byte[] { 1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2 };
if (result == Win32ErrorCodes.NERR_Success || result == Win32ErrorCodes.MemberNotInAlias)
throw new Win32Exception(result);
[DllImport("NetApi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern Int32 NetLocalGroupDelMembers(
UInt32 level,
UInt32 totalentries
Declare Function NetLocalGroupDelMembers Lib "netapi32.dll" (TODO) As TODO
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
byte[] baSid = new byte[] { 1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2 };
[DllImport("Netapi32.dll")]
Declare Function NetLocalGroupEnum Lib "netapi32.dll" (TODO) As TODO
[DllImport("Netapi32.dll")]
[DllImport("Netapi32.dll")]
[DllImport("NetAPI32.dll", CharSet=CharSet.Unicode)]
Declare Function NetLocalGroupGetMembers Lib "netapi32.dll" (TODO) As TODO
[DllImport("netapi32.dll")]
Public Declare Function NetMessageBufferSend Lib "netapi32.dll" _
[DllImport("netapi32.dll")]
[DllImport("Netapi32.dll")]
Declare Function NetQueryDisplayInformation Lib "Netapi32.dll"
Declare Function NetQueryDisplayInformation Lib "Netapi32.dll" _
[DllImport( "advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
[DllImport("Netapi32.dll")] static extern int NetQueryDisplayInformation([MarshalAs(UnmanagedType.LPWStr)] string serverName,
[DllImport("netapi32.dll", CharSet=CharSet.Auto, SetLastError=true)] private static extern int NetApiBufferFree (System.IntPtr pBuffer);
[DllImport("Netapi32.dll", EntryPoint = "NetRemoteComputerSupports", CharSet = CharSet.Unicode)]
private static extern Int32 NetRemoteComputerSupports(String uncServerName, NetSupportOption optionsWanted,ref NetSupportOption optionsSupported);
Declare Unicode Function NetRemoteComputerSupports Lib "Netapi32.dll" ( _
Local = 32
Local = 32,
[DllImport("Netapi32.dll", EntryPoint = "NetRemoteComputerSupports", CharSet = CharSet.Unicode)]
private static extern Int32 NetRemoteComputerSupports(String uncServerName, NetSupportOption optionsWanted,ref NetSupportOption optionsSupported); 42: NetRemoteTOD
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode)]
<DllImport("netapi32", CharSet:=CharSet.Unicode)> Function NetRemoteTOD( _
[DllImport( "netapi32.dll" , EntryPoint="NetRemoteTOD", SetLastError=true,
[DllImport( "netapi32.dll")] private static extern void NetApiBufferFree(IntPtr bufptr);
if ( pintError > 0 ) { throw new System.ComponentModel.Win32Exception ( pintError ); }
[DllImport("netapi32.dll", SetLastError=true, CharSet = CharSet.Unicode)]
Declare Function NetRenameMachineInDomain Lib "netapi32.dll" (TODO) As TODO 1326 - ERROR_LOGON_FAILURE
[DllImport("netapi32.dll", SetLastError=true, CharSet = CharSet.Unicode)]
[DllImport("Netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
<DllImport("Netapi32.dll", CharSet := CharSet.Unicode, SetLastError := True)> _ 45: netserverenum
[DllImport("netapi32.dll",EntryPoint="NetServerEnum")]
[DllImport("netapi32.dll",EntryPoint="NetApiBufferFree")]
Private Declare Unicode Function NetServerEnum Lib "netapi32" _
namespace Microsoft.Win32
[DllImport("Netapi32", CharSet = CharSet.Auto, SetLastError = true), SuppressUnmanagedCodeSecurityAttribute]
[DllImport("Netapi32", SetLastError = true), SuppressUnmanagedCodeSecurityAttribute]
throw new System.ComponentModel.Win32Exception(ret);
throw new System.ComponentModel.Win32Exception(ret);
namespace Win32
public class NetApi32
public UInt32 sv101_platform_id;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_version_major;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_version_minor;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_type;
[DllImport("netapi32.dll",EntryPoint="NetServerEnum")]
[DllImport("netapi32.dll",EntryPoint="NetApiBufferFree")]
[DllImport ("Netapi32", CharSet=CharSet.Unicode)]
public static ArrayList GetServerList( NetApi32.SV_101_TYPES ServerType)
//Cast the pointer to a ulong so this addition will work on 32-bit or 64-bit systems. 46: NetServerGetInfo
[DllImport("Netapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
Declare Function NetServerGetInfo Lib "netapi32.dll" (ByVal ServerName As String, _
[DllImport("Netapi32", CharSet = CharSet.Auto, SetLastError = true)]
throw new System.ComponentModel.Win32Exception(ret); 47: NetSessionDel
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
<DllImport("netapi32.dll", SetLastError:=True)> Private Shared Function NetSessionDel(<MarshalAs(UnmanagedType.LPWStr)> ByVal serverName As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal UncClientName As String, <MarshalAs(UnmanagedType.LPWStr)> ByVal username As String) As Integer 48: NetSessionEnum
[DllImport("netapi32.dll", SetLastError=true)]
Int32 Level,
ref Int32 entriesread,
ref Int32 totalentries,
ref Int32 resume_handle);
<DllImport("netapi32.dll", SetLastError:=True)> _
Public sesi502_num_opens As UInt32
Public sesi502_time As UInt32
Public sesi502_idle_time As UInt32
Public sesi502_user_flags As UInt32
Int32 er=0,tr=0,resume=0;
Int32 p = BufPtr.ToInt32();
ptr = bufptr.ToInt32 + (Marshal.SizeOf(Result(i)) * i) 49: NetShareAdd
[DllImport("Netapi32.dll")]
Int32 dwLevel,
Declare Unicode Function NetShareAdd Lib "netapi32.dll" ( _
public Int32 shi502_permissions;
public Int32 shi502_max_uses;
public Int32 shi502_current_uses;
public Int32 shi502_reserved; 50: NetShareCheck
[DllImport("netapi32.dll", SetLastError=true)]
Declare Function NetShareCheck Lib "netapi32.dll" (TODO) As TODO 51: NetShareDel
[DllImport("netapi32.dll", SetLastError=true)]
Int32 reserved //must be 0
Declare Unicode Function NetShareDel Lib "netapi32.dll" _
<DllImport("netapi32", CharSet:=CharSet.Unicode)> _ 52: NetShareEnum
[DllImport("Netapi32.dll", CharSet=CharSet.Unicode)]
Declare Unicode Function NetShareEnum Lib "netapi32.dll" _
<DllImport("Netapi32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Dim i As Integer = 0, lpItem As Integer = pBuffer.ToInt32()
currentPtr = New IntPtr(currentPtr.ToInt32 + Marshal.SizeOf(GetType(SHARE_INFO_2)))
currentPtr = new IntPtr(currentPtr.ToInt32() + nStructSize);
[DllImport("Netapi32.dll", SetLastError = true)]
[DllImport("Netapi32.dll", CharSet = CharSet.Unicode)]
//Remember, 64-bit systems have 64-bit pointers. Using ToInt32 will cause an ArithmeticOverview exception.
currentPtr = new IntPtr(currentPtr.ToInt32() + nStructSize);
Declare Unicode Function NetShareEnum Lib "netapi32.dll" _
Declare Unicode Function NetShareGetInfo Lib "netapi32.dll" _
Declare Unicode Function NetApiBufferFree Lib "netapi32.dll" _
Dim i As Integer = 0, lpItem As Integer = pBuffer.ToInt32() 53: NetShareGetInfo
[DllImport("Netapi32.dll", SetLastError=true)]
Int32 level,
Declare Unicode Function NetShareGetInfo Lib "netapi32.dll" _
Declare Unicode Function NetShareGetInfo Lib "netapi32.dll" _
Declare Unicode Function NetApiBufferFree Lib "netapi32.dll" _ [DllImport("Netapi32.dll", SetLastError=true)]
Int32 level,
public Int32 shi502_permissions;
public Int32 shi502_max_uses;
public Int32 shi502_current_uses;
public Int32 shi502_reserved;
[DllImport("Netapi32", CharSet=CharSet.Auto)]
[DllImport("Netapi32", CharSet=CharSet.Auto)]
oManager = New ManagementClass("Win32_Share") 54: NetShareSetInfo
[DllImport("netapi32.dll", SetLastError=true)]
static extern UInt32 NetShareSetInfo(String servername, String netname, UInt32 level, ref object buf, out UInt32 parm_err);
Declare Function NetShareSetInfo Lib "netapi32.dll" (TODO) As TODO 55: NetStatisticsGet
[DllImport("Netapi32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
Declare Function NetStatisticsGet Lib "Netapi32.dll" (TODO) As TODO 56: NetUnjoinDomain
[DllImport("netapi32.dll", SetLastError=true, CharSet = CharSet.Auto)]
<DllImport("netapi32.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _ 57: NetUseAdd
using DWORD = System.UInt32;
using NET_API_STATUS = System.UInt32;
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] using DWORD = System.UInt32; using NET_API_STATUS = System.UInt32;
throw new Win32Exception((int)returnCode); 58: NetUseDel
const UInt32 USE_NOFORCE = 0;
const UInt32 USE_FORCE = 1;
const UInt32 USE_LOTS_OF_FORCE = 2;
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern UInt32 NetUseDel(
UInt32 ForceCond
Declare Function NetUseDel Lib "netapi32.dll" (TODO) As TODO
throw new Win32Exception((int)returnCode); 59: NetUseEnum
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
<DllImport("netapi32.dll", SetLastError:=True)> _
ByVal Level As UInt32, _
ByVal PreferedMaximumSize As UInt32, _
Public ui2_status As UInt32
Public ui2_asg_type As UInt32
Public ui2_refcount As UInt32
Public ui2_usecount As UInt32
// lInfo=(USE_INFO_2)Marshal.PtrToStructure(new IntPtr(lBuffer.ToInt32()+(Marshal.SizeOf(typeof(USE_INFO_2))*li)),typeof(USE_INFO_2));
NetUseEnum(Nothing, 2, lBuffer, UInt32.MaxValue, lRead, lTotal, lHandle)
Dim RawPos As IntPtr = lBuffer.ToInt32() + (Marshal.SizeOf(GetType(USE_INFO_2)) * i) 60: NetUserAdd
[DllImport("netapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
UInt32 level,
out UInt32 parm_err);
Private Declare Function NetUserAdd Lib "Netapi32.dll" ( _
Private Declare Function NetUserAdd Lib "Netapi32.dll" ( _
Return New System.ComponentModel.Win32Exception(RetVal).Message Cut off search results after 60. Please refine your search. |