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

getuname

.

[DllImport("getuname.dll", SetLastError=true)]

hhctrl

.

[DllImport("hhctrl.ocx", SetLastError=true, EntryPoint = "HtmlHelpW", CharSet = CharSet.Unicode)]

.

<DllImport("hhctrl.ocx", SetLastError:=True, EntryPoint:="HtmlHelpW", CharSet:=CharSet.Unicode)> _

.

[DllImport("hhctrl.ocx", SetLastError = true, EntryPoint = "HtmlHelpW", CharSet = CharSet.Unicode)]

.

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

ntdsapi

.

CharSet = CharSet.Unicode, EntryPoint = "DsBindWithCredW", SetLastError = true)]

.

CharSet = CharSet.Unicode, EntryPoint = "DsBindWithCredW", SetLastError = true)]

.

[DllImport("ntdsapi.dll", CharSet=CharSet.Auto)]

.

Note Do not confuse the values of the format elements of the formatOffered parameter used by the DsCrackNames function with the similarly named format elements as defined in the ADS_NAME_TYPE_ENUM enumeration used by the IADsNameTranslate interface. The two sets of element formats are not equivalent and are not interchangeable.

.

       [DllImport(NTDSAPI, CharSet = CharSet.Auto)]

.

       [DllImport(NTDSAPI, CharSet = CharSet.Auto)]

.

       [DllImport(NTDSAPI, CharSet = CharSet.Auto)]

.

       [DllImport(NTDSAPI, CharSet = CharSet.Auto)]

.

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

.

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

.

[DllImport("ntdsapi.dll", CharSet=CharSet.Auto)]

.

[DllImport("Ntdsapi.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode,

.

EntryPoint = "DsFreePasswordCredentials", SetLastError = true)]

.

    [DllImport("Ntdsapi.dll", SetLastError = true)]

.

[DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

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

.

        public string NtdsDsaObjectName;      // CN=NTDS Settings,CN=SDBAD10004,CN=Servers,CN=BAD1,CN=Sites,CN=Configuration,DC=ad,DC=sys

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

[DllImport("Ntdsapi.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode,

.

EntryPoint = "DsMakePasswordCredentialsW", SetLastError = true)]

.

    [DllImport("Ntdsapi.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

    <DllImport("Ntdsapi.dll", CharSet := CharSet.Auto, SetLastError := True)> _

.

    [DllImport("Ntdsapi.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

    [DllImport("Ntdsapi.dll", SetLastError = true)]

.

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

.

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

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

    [DllImport("ntdsapi.dll", CharSet = CharSet.Auto)]

.

[DllImport("ntdsapi.dll", CharSet=CharSet.Auto)]

.

CharSet = CharSet.Unicode, EntryPoint = "DsUnBindW", SetLastError = true)]

wininet

.

        SetLastError = true,

.

        CharSet = CharSet.Auto,

.

      SetLastError:=True, _

.

      CharSet:=CharSet.Auto, _

.

    [DllImport(@"wininet", SetLastError = true, CharSet = CharSet.Auto, EntryPoint = "DeleteUrlCacheGroup", CallingConvention = CallingConvention.StdCall)]

.

       SetLastError:=True, _

.

       CharSet:=CharSet.Auto, _

.

[DllImport(@"wininet",SetLastError=true,CharSet=CharSet.Auto,EntryPoint="FindFirstUrlCacheEntryA",CallingConvention=CallingConvention.StdCall)]

.

       SetLastError:=True, _

.

       CharSet:=CharSet.Auto, _

.

<DllImport("wininet.dll", SetLastError:=True, _

.

       CharSet:=CharSet.Auto, _

.

    [DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)]

.

        SetLastError:=True, _

.

        CharSet:=CharSet.Auto, _

.

       SetLastError:=True, _

.

       CharSet:=CharSet.Auto, _

.

[DllImport("wininet.dll", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]

.

fExpectResponse (in) A Boolean value that indicates whether the application expects a data connection to be established by the FTP server. This must be set to TRUE if a data connection is expected, or FALSE otherwise.

.

dwFlags(in) A parameter that can be set to one of the following values.

.

phFtpCommand (out) A pointer to a handle that is created if a valid data socket is opened. The fExpectResponse parameter must be set to TRUE for phFtpCommand to be filled.

.

[DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto)]

.

  <DllImport("wininet.dll", SetLastError := True, CharSet := CharSet.Auto)> _

.

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

Useful flags setting for binary download: INTERNET_FLAG_TRANSFER_BINARY + INTERNET_FLAG_RELOAD

.

    [DllImport("wininet.dll", EntryPoint = "InternetConnectW", CharSet = CharSet.Auto, SetLastError = true)]

.

    [DllImport("wininet.dll", EntryPoint = "InternetOpenW", CharSet = CharSet.Auto, SetLastError = true)]

.

    [DllImport("wininet.dll", EntryPoint = "FtpGetFile", SetLastError = true, CharSet = CharSet.Auto)]

.

    [DllImport("wininet.dll", EntryPoint = "FtpOpenFile", SetLastError = true, CharSet = CharSet.Auto)]

.

    public ushort FTPPort { get; set; }

.

    public string FTPSite { get; set; }

.

    public string FTPUsername { get; set; }

.

    public string FTPPassword { get; set; }

.

        public string SourceFileName { get; set; }

.

        public string DesctinationFileName { get; set; }

.

        public FTPTransferType TransferType { get; set; }

.

[DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto)]

.

[DllImport("wininet.dll", SetLastError=true, CharSet = CharSet.Auto)]

.

[DllImport("wininet.dll", CharSet = CharSet.Auto)]

.

[DllImport("wininet.dll", CharSet=CharSet.Auto, SetLastError=true)]

.

static extern bool FtpSetCurrentDirectory(IntPtr hFtpConnection, string lpszDirectory);

.

Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hConnect As IntPtr, ByVal lpszDirectory As String) As Boolean

.

Dim changed As Boolean = FtpSetCurrentDirectory(hINetConn, changePath)

.
Documentation
[FtpSetCurrentDirectory] on MSDN
.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError = true)]

.

[DllImport("wininet.dll", SetLastError = true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto)]

.

    Number of the TCP/IP port on the server to connect to. Can be one of the values in the following list. If this parameter is set to INTERNET_INVALID_PORT_NUMBER, the function uses the default port for the specified service. These values do not cause the function to use this protocol. The value sets the port to be used. A flag must be used to set the service.

.

    Address of a null-terminated string that contains the password to use to log on. If both lpszPassword and lpszUsername are NULL, the function uses the default anonymous password. In the case of FTP, the default anonymous password is the user's e-mail name. If lpszPassword is NULL, but lpszUsername is not NULL, the function uses a blank password. The following table describes the behavior for the four possible settings of lpszUsername and lpszPassword:

.

[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

///     is connected.If FALSE is returned, the INTERNET_CONNECTION_CONFIGURED flag may be set to indicate that autodial is

.

[DllImport("wininet.dll", SetLastError=true)]

.

   [DllImport("wininet.dll", SetLastError = true)]

.

[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

    [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto)]

.

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

.

    /// Connection name to set/query options

.

    /// Number of options to set/query

.

[DllImport("wininet.dll", SetLastError=true)]

.
Summary
Used to query Windows' current Internet proxy settings.
.

[DllImport("wininet.dll", SetLastError=true)]

.

<DllImport("wininet.dll", SetLastError:=True)> Shared Function InternetQueryOption(ByVal hInternet As IntPtr, ByVal dwOption As UInteger, ByVal  lpBuffer() As Char, ByRef lpdwBufferLength As Integer) As Boolean

.

In order to set new proxy settings use InternetSetOption.

.

    [DllImport("wininet.dll", CharSet=CharSet.Auto, SetLastError=true)]

.

    static extern bool InternetSetCookie(string lpszUrl, string lpszCookieName, string lpszCookieData);

.

     <DllImport("wininet.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _

.

      Public Shared Function InternetSetCookie(lpszUrl As String, _

.

bool b = InternetSetCookie("http://localhost/", "keyname", "value; Expires = " + DateTime.Now.AddDays(10).ToString("R"));

.
Documentation
[InternetSetCookie] on MSDN
.

    [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]

.

    static extern bool InternetSetCookieEx(string lpszUrlName, string lpszCookieName, string lpszCookieData, uint dwFlags, IntPtr dwReserved );

.

InternetSetCookieEx("http://foo.bar.baz", "COOKIE_NAME", "COOKIE_VALUE" "; Expires = " DateTime.Now.AddDays(10).ToString("R"), 2147484672, IntPtr.Zero);

.

[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)]

.

public static extern bool InternetSetOption(IntPtr hInternet, int

.

<DllImport("wininet.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _

.

Public Shared Function InternetSetOption(hInternet As IntPtr, dwOption As Integer, lpBuffer As IntPtr, dwBufferLength As Integer) As Boolean

.

For querying current settings use InternetQueryOption.

.

[DllImport("wininet.dll", SetLastError = true)]

.

     private static extern bool InternetSetOption(IntPtr hInternet,

.

private void RefreshIESettings(string strProxy)

.

     bool iReturn = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, Marshal.SizeOf(struct_IPI));

.

     RefreshIESettings("1.2.3.4:8080");

.

     //or RefreshIESettings("http://1.2.3.4:8080"); //both worked

.

     //or RefreshIESettings("http=1.2.3.4:8080"); //both worked

.
Documentation
[InternetSetOption] on MSDN
.

    <FieldOffset(0)> Public dwStructSize As UInt32

.

    <FieldOffset(4)> Public lpszSourceUrlName As IntPtr

.

    <FieldOffset(8)> Public lpszLocalFileName As IntPtr

.

    <FieldOffset(12)> Public CacheEntryType As UInt32

.

    <FieldOffset(16)> Public dwUseCount As UInt32

.

    <FieldOffset(20)> Public dwHitRate As UInt32

.

    <FieldOffset(24)> Public dwSizeLow As UInt32

.

    <FieldOffset(28)> Public dwSizeHigh As UInt32

.

    <FieldOffset(32)> Public LastModifiedTime As FILETIME

.

    <FieldOffset(40)> Public ExpireTime As FILETIME

.

    <FieldOffset(48)> Public LastAccessTime As FILETIME

.

    <FieldOffset(56)> Public LastSyncTime As FILETIME

.

    <FieldOffset(64)> Public lpHeaderInfo As IntPtr

.

    <FieldOffset(68)> Public dwHeaderInfoSize As UInt32

.

    <FieldOffset(72)> Public lpszFileExtension As IntPtr

.

    <FieldOffset(76)> Public dwReserved As UInt32

.

    <FieldOffset(76)> Public dwExemptDelta As UInt32

.

    <FieldOffset(0)> Public dwStructSize As UInt32

.

    <FieldOffset(4)> Public lpszSourceUrlName As IntPtr

.

    <FieldOffset(8)> Public lpszLocalFileName As IntPtr

.

    <FieldOffset(12)> Public CacheEntryType As UInt32

.

    <FieldOffset(16)> Public dwUseCount As UInt32

.

    <FieldOffset(20)> Public dwHitRate As UInt32

.

    <FieldOffset(24)> Public dwSizeLow As UInt32

.

    <FieldOffset(28)> Public dwSizeHigh As UInt32

.

    <FieldOffset(32)> Public LastModifiedTime As FILETIME

.

    <FieldOffset(40)> Public ExpireTime As FILETIME

.

    <FieldOffset(48)> Public LastAccessTime As FILETIME

.

    <FieldOffset(56)> Public LastSyncTime As FILETIME

.

    <FieldOffset(64)> Public lpHeaderInfo As IntPtr

.

    <FieldOffset(68)> Public dwHeaderInfoSize As UInt32

.

    <FieldOffset(72)> Public lpszFileExtension As IntPtr

.

    <FieldOffset(76)> Public dwReserved As UInt32

.

    <FieldOffset(76)> Public dwExemptDelta As UInt32

.

[DllImport("wininet.dll", SetLastError=true)]

.

[DllImport("wininet.dll", SetLastError=true)]

.

    <DllImport("wininet.dll", SetLastError:=True, CharSet:=CharSet.Auto, EntryPoint:="PrivacySetZonePreferenceW", CallingConvention:=CallingConvention.StdCall)> _

.

    Shared Function PrivacySetZonePreference( ByVal dwZone As Integer, ByVal dwType As Integer, ByVal dwTemplate As Integer, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpszPreference As StringBuilder) As Integer

.
Summary
.

[DllImport("wininet.dll", SetLastError=true)]

.

static extern TODO PrivacySetZonePreference(TODO);

.

    <DllImport("wininet.dll", SetLastError:=True, CharSet:=CharSet.Auto, EntryPoint:="PrivacySetZonePreferenceW", CallingConvention:=CallingConvention.StdCall)> _

.

    Shared Function PrivacySetZonePreference( ByVal dwZone As Integer, ByVal dwType As Integer, ByVal dwTemplate As Integer, <MarshalAs(UnmanagedType.LPWStr)> ByVal lpszPreference As StringBuilder) As Integer

.

    Private Sub cmdSetPolicy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSetPolicy.Click

.

    sTmp = cmbSetTemplate.SelectedItem

.

    lResult = WininetAPI.PrivacySetZonePreference(dwZone, dwParty, dwTemplate, sPreference)

.
Documentation
[PrivacySetZonePreference] on MSDN

ntdll

.

[DllImport("ntdll.dll", ExactSpelling=true, SetLastError=false)]

.

  <DllImport("ntdll.dll", ExactSpelling:=True, SetLastError:=False)> _

.

[DllImport("ntdll.dll", ExactSpelling = true, SetLastError = true)]

.

[DllImport("ntdll.dll", ExactSpelling = true, SetLastError = true)]

.

[DllImport("ntdll.dll", SetLastError=true)]

.

[DllImport("ntdll.dll", SetLastError=true)] static extern IntPtr NtQueryInformationFile(IntPtr fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);

.

        FileMailslotSetInformation

.

        FileMailslotSetInformation,       // 27

.

        FileMailslotSetInformation,        // 27

.

        [FieldOffset(0)]

.

        [FieldOffset(8)]

.

        [FieldOffset(16)]

.

        [FieldOffset(24)]

.

        [FieldOffset(32)]

.

    [DllImport("ntdll.dll", SetLastError = true)]

.

        File.SetAttributes(path2file, FileAttributes.Normal);

.

[DllImport("ntdll.dll", SetLastError=true)]

.

[DllImport("NTDLL.DLL", SetLastError=true)]

.

[DllImport("ntdll.dll", SetLastError=true)]

.

[DllImport("ntdll.dll", SetLastError=true)]

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


 
Access PInvoke.net directly from VS: