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

odbc32

.

    const short SQL_SUCCESS_WITH_INFO   =   1;    

.

    const short SQL_NO_DATA             = 100;

.

    const short SQL_ERROR               = (-1);

.

public const ushort SQL_HANDLE_ENV = 1;

.

    private const short SQL_HANDLE_ENV = 1;

.

    private const short DEFAULT_RESULT_SIZE = 1024;

.

                int start = txt.IndexOf("{") + 1;

.

            StringBuilder completedConnString = new StringBuilder(1024);

.

            short retcode = SQLDriverConnect(dbcHandle, IntPtr.Zero, connectionString, 256, completedConnString, 1024, out strLength, SQL_DRIVER_COMPLETE);

.

   short nameLength1, string userName, short nameLength2,

.

/// <param name="BufferLength1">[Input] Length of the *ServerName buffer, in characters; this does not need to be longer than SQL_MAX_DSN_LENGTH plus the null-termination character.</param>

.

/// <param name="NameLength1Ptr">[Output] Pointer to a buffer in which to return the total number of bytes (excluding the null-termination byte)

.

/// available to return in *ServerName. If the number of bytes available to return is greater than or equal to BufferLength1, the data

.

/// source name in *ServerName is truncated to BufferLength1 minus the length of a null-termination character. </param>

.

    StringBuilder ServerName, short BufferLength1, ref short NameLength1Ptr,

.

    ByVal ServerName As String, ByVal BufferLength1 As Short, ByRef NameLength1Ptr As Short, _

.

public const ushort SQL_HANDLE_ENV = 1;

.

public const short SQL_SUCCESS_WITH_INFO = 1;

.

public const short SQL_NO_DATA = 100;

.

public const short SQL_FETCH_NEXT = 1;

.

    StringBuilder desc_name = new StringBuilder(128);

.

            i = i + 1

.

        For intCount = 0 To intKeyValues - 1

.

    public const ushort SQL_DRIVER_COMPLETE          = 1;

.

    public const short SQL_SUCCESS_WITH_INFO   =   1;    

.

    public const short SQL_NO_DATA             = 100;

.

    public const short SQL_ERROR               = (-1);

.

        const short    MAX_CONNECT_LEN = 1024;

.

            lastError = err.Substring(bracketPos+1).Trim();

.

public const ushort SQL_HANDLE_ENV = 1;

.

const int  SQL_DROP         = 1;

.

public const int   SQL_C_CHAR      = 1;

.

        StringBuilder val = new StringBuilder(1024);

.

We hit a bug with getting odbc data sources under 64 bit. Oddly it only seemed to affect people with visual studio 2012 installed. Maybe the problem is with .NET framework 4.5. The c# signatures had "ushort attribute" and we changed it to "int attribute". Then things seemed to work for people with Visual Studio 2010 or 2012.

.

            string CatalogName, short NameLength1,

.

    const int  SQL_DROP         = 1;

.

    string table_cat   = cmd.GetFieldValue(1); //database name

wintrust

.

SafeFileHandle invalidHandle = new SafeFileHandle(new IntPtr(-1), true);

.

        All = 1,

.

        WholeChain = 0x00000001

.

        File = 1,

.

        Verify = 0x00000001,

.

        UseIe4TrustFlag = 0x00000001,

.

        RevocationCheckNone = 0x00000010,

.

        SaferFlag = 0x00000100,        // Used by software restriction policies. Should not be used.

.

        CacheOnlyUrlRetrieval = 0x00001000,      // affects CRL retrieval and AIA retrieval

.

        DisableMD2andMD4 = 0x00002000      // Win7 SP1+: Disallows use of MD2 or MD4 in the chain except for the root

.

        Install = 1

.

            // On Win7SP1+, don't allow MD2 or MD4 signatures

.

                ((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor > 1)) ||

.

                ((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor == 1) && !String.IsNullOrEmpty(Environment.OSVersion.ServicePack)))

.

         ProviderUnknown = 0x800b0001,           // Trust provider is not recognized on this system

.

         FileNotSigned = 0x800B0100,         // TRUST_E_NOSIGNATURE - File was not signed

.

         SubjectExplicitlyDistrusted = 0x800B0111,   // Signer's certificate is in the Untrusted Publishers store

.

         SignatureOrFileCorrupt = 0x80096010,    // TRUST_E_BAD_DIGEST - file was probably corrupt

.

         SubjectCertExpired = 0x800B0101,        // CERT_E_EXPIRED - Signer's certificate was expired

.

         SubjectCertificateRevoked = 0x800B010C,     // CERT_E_REVOKED Subject's certificate was revoked

.

         UntrustedRoot = 0x800B0109          // CERT_E_UNTRUSTEDROOT - A certification chain processed correctly but terminated in a root certificate that is not trusted by the trust provider.

.

        private static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);

.

        private const string WINTRUST_ACTION_GENERIC_VERIFY_V2 = "{00AAC56B-CD44-11d0-8CC2-00C04FC295EE}";

.

Working examples: [http://github.com/kg/shootblues/blob/master/SignatureCheck.cs], and [http://stackoverflow.com/a/6597017/640326]

wininet

.

http://support.microsoft.com/kb/q311289/

.

http://support.microsoft.com/kb/q311289/

.

http://support.microsoft.com/kb/q311289/

.

http://support.microsoft.com/kb/q311289/

.

http://support.microsoft.com/kb/q311289/

.

http://support.microsoft.com/kb/q311289/

.

        Form1.List_Files.Items.Add(strItemName)

.

    private const long INTERNET_OPEN_TYPE_DIRECT = 1;

.

    private const ushort INTERNET_DEFAULT_FTP_PORT = 21;

.

    private const uint INTERNET_SERVICE_FTP = 1;

.

    private const uint FILE_ATTRIBUTE_NORMAL = 128;

.

    private const string IPADDRESS_PATTERN = @"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";

.

        ASCII = 1,

.

const int FTP_TRANSFER_TYPE_ASCII   = 0x00000001;

.

const int INTERNET_FLAG_NEED_FILE   = 0x00000010;

.

        HttpQueryInfo(hRequest, 536870917, ref lLength, ref lBufferLen, ref lHeaderIndex);

.

if (InternetCheckConnection("http://www.google.com/", 1, 0))

.

const short INTERNET_DEFAULT_FTP_PORT = 21;

.

const short INTERNET_DEFAULT_SOCKS_PORT = 1080;

.

    Address of a null-terminated string that contains the host name of an Internet server. Alternately, the string can contain the IP number of the site in ASCII dotted-decimal format (for example, 11.0.1.45).

.

    INTERNET_DEFAULT_FTP_PORT     Use the default port for FTP servers (port 21).

.

{ // Ref: http://msdn.microsoft.com/en-us/library/aa385149(VS.85).aspx

.

    INTERNET_SCHEME_UNKNOWN = -1,

.

///         <term>INTERNET_CONNECTION_MODEM (0x01)</term>

.

///         <term>INTERNET_RAS_INSTALLED (0x10)</term>

.

    Modem = 0x1,

.

    RasInstalled = 0x10,

.

    Modem = &H1

.

    RasInstalled = &H10

.

    Console.WriteLine(string.Format("Is connected :{0} Flags:{1}", isConnected, flags));

.
VB
.

        UInt32 datasize = 256*1024;

.

    Dim message As String = Space(_buffSize + 1)

.

const int INTERNET_OPEN_TYPE_DIRECT = 1; // direct to net

.

Const INTERNET_OPEN_TYPE_DIRECT = 1 ' // direct to net

.

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

.

http://msdn.microsoft.com/en-us/library/aa385107(VS.85).aspx

.

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

.

     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

.

     axWebBrowser1.Navigate("http://willstay.tripod.com", ref nullObject, ref nullObjStr, ref nullObjStr, ref nullObjStr);

.

    <FieldOffset(12)> Public CacheEntryType As UInt32

.

    <FieldOffset(16)> Public dwUseCount As UInt32

.

    <FieldOffset(12)> Public CacheEntryType As UInt32

.

    <FieldOffset(16)> Public dwUseCount As UInt32

.

    INTERNET_SCHEME_UNKNOWN = -1

.

    Public Const URLZONE_INTRANET As Integer = URLZONE_LOCAL_MACHINE + 1

.

    Public Const URLZONE_TRUSTED As Integer = URLZONE_INTRANET + 1

.

    Public Const URLZONE_INTERNET As Integer = URLZONE_TRUSTED + 1

.

    Public Const URLZONE_UNTRUSTED As Integer = URLZONE_INTERNET + 1

.

    Public Const URLZONE_USER_MIN As Integer = 1000

.

    Public Const URLZONE_USER_MAX As Integer = 10000

.

    Public Const COOKIE_STATE_ACCEPT As Integer = &H1

.

    Public Const PRIVACY_TYPE_THIRD_PARTY As Integer = 1

.

    Public Const PRIVACY_TEMPLATE_HIGH As Integer = 1

.

    Public Const PRIVACY_TEMPLATE_CUSTOM As Integer = 100

.

    Public Const PRIVACY_TEMPLATE_ADVANCED As Integer = 101

.

    dwZone = cmbZone1.SelectedIndex

.

    dwParty = cmbParty1.SelectedIndex

.

    ' 1MB in size should be enough for this test

.

        MsgBox("1st Party: There was an error: Code " & CStr(System.Runtime.InteropServices.Marshal.GetLastWin32Error()))

.

        If (dwBufferLength <= 1) Then

.

    Public Const URLZONE_INTRANET As Integer = URLZONE_LOCAL_MACHINE + 1

.

    Public Const URLZONE_TRUSTED As Integer = URLZONE_INTRANET + 1

.

    Public Const URLZONE_INTERNET As Integer = URLZONE_TRUSTED + 1

.

    Public Const URLZONE_UNTRUSTED As Integer = URLZONE_INTERNET + 1

.

    Public Const URLZONE_USER_MIN As Integer = 1000

.

    Public Const URLZONE_USER_MAX As Integer = 10000

.

    Public Const COOKIE_STATE_ACCEPT As Integer = &H1

.

    Public Const PRIVACY_TYPE_THIRD_PARTY As Integer = 1

.

    Public Const PRIVACY_TEMPLATE_HIGH As Integer = 1

.

    Public Const PRIVACY_TEMPLATE_CUSTOM As Integer = 100

.

    Public Const PRIVACY_TEMPLATE_ADVANCED As Integer = 101

.

    If (sTmp.Substring(2, 1) = ")") Then

.

        dwTemplate = sTmp.Substring(1, 1)

.

        dwTemplate = sTmp.Substring(1, 3)

irprops

.

    MITMProtectionRequired           = 0x01,

.

    MITMProtectionRequired           = 0x01,

.

XP SP1 required.

.

XP SP1 required.

.

XP SP1 required.

.

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

.

    <StructLayout(LayoutKind.Sequential, pack:=1)> _

.

    <StructLayout(LayoutKind.Sequential, pack:=1)> _

.

        Public byte1 As Byte

.

        Public byte10 As Byte    ' bytes

.

        Public byte11 As Byte

.

        Public byte12 As Byte

.

            Return String.Format("{0}:{1}:{2}:{3}:{4}:{5}", byte10.ToString("x"), byte9.ToString("x"), _

.

XP SP1 required.

.

XP SP1 required.

.

XP SP1 required.

.

XP SP1 required.

.

        Dim fmt As String = "({0}:{1}:{2}:{3}:{4}:{5})"

.

                 ((Address >> 16) And &HFF).ToString("x2"), _

.

XP SP1 required.

.

XP SP1 required.

.

XP SP1 required.

imm32

.

    private const int IME_CHOTKEY_SHAPE_TOGGLE = 0x11;

.

private void button1_Click(object sender, System.EventArgs e)

.

    listBox1.Items.Clear();

.

    listBox1.Items.AddRange(GetReverseConversion(this.Handle,textBox1.Text));

user32

.

ASFW_ANY = -1 // by MSDN

.

AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE or AnimateWindowFlags.AW_HIDE)

.

AnimateWindow(f2.Handle, 1000, (uint) AnimateWindowFlags.AW_VER_NEGATIVE | (uint) AnimateWindowFlags.AW_SLIDE);

.

AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE or AnimateWindowFlags.AW_HIDE)

.

This function is provided only for compatibility with 16-bit versions of Microsoft Windows. It is generally not useful.

.

     MF_REMOVE = 0x1000,

.

    MF_BYPOSITION = 1024

.

        MF_BYPOSITION = 1024

.

        CDS_UPDATEREGISTRY = 0x00000001,

.

        CDS_SET_PRIMARY = 0x00000010,

.

        CDS_ENABLE_UNSAFE_MODES = 0x00000100,

.

        CDS_NORESET = 0x10000000

.

        CDS_UPDATEREGISTRY = &H1

.

        CDS_SET_PRIMARY = &H10

.

        CDS_ENABLE_UNSAFE_MODES = &H100

.

        CDS_NORESET = &H10000000

.

http://msdn2.microsoft.com/en-us/library/aa719104(vs.71).aspx

.

int deviceID=1; // This is only for my device setting. Go through the whole EnumDisplayDevices to find your device  

.

dm.dmPelsWidth = 1024;

.

        CDS_UPDATEREGISTRY = 0x00000001,

.

        CDS_SET_PRIMARY = 0x00000010,

.

        CDS_ENABLE_UNSAFE_MODES = 0x00000100,

.

        CDS_NORESET = 0x10000000

.

    CDS_UPDATEREGISTRY = &H1

.

    CDS_SET_PRIMARY = &H10

.

    CDS_ENABLE_UNSAFE_MODES = &H100

.

    CDS_NORESET = &H10000000

.

        None=0, AlreadyAllowed=1, AlreadyDisAllowed=2, AllowedHigher=3

.

        Reset = 0, Allow = 1, DisAllow = 2

.

        Add = 1

.

     CWP_SKIPINVISIBLE = 0x0001,

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


 
Access PInvoke.net directly from VS: