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

wintrust

.

        WholeChain = 0x00000001

.

        NoIe4ChainFlag = 0x00000002,

.

        RevocationCheckChain = 0x00000040,

.

        RevocationCheckChainExcludeRoot = 0x00000080,

.

        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

.

        WinTrustDataProvFlags ProvFlags = WinTrustDataProvFlags.RevocationCheckChainExcludeRoot;

.

         SubjectNotTrusted = 0x800b0004,         // Subject failed the specified verification action

.

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

difxapi

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,msvcrt,Constants,Delegates,Enums,Interfaces,Structures

dtl

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

.

            foreach (KeyValuePair<string, int> id in _driverLookupList)

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

.

            foreach (KeyValuePair<string, int> id in _driverLookupList)

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

.

    /// Contains unsafe dtl dll calls

urlmon

.

The return value from CoInternetSetFeatureEnabled should be passed to the static ThrowExceptionForHR method on the Marshal class as well, in case a fail code is returned (or better yet, a wrapper can be created to this method).

.

    // static void Main()

.

     public static unsafe void Main()

.

      Public Sub Main(ParamArray args As String())

.

       Main(args)

.

    ''' <summary>Internet Explorer 6 for Windows XP SP2 and later. Perform MIME-type detection if "text/plain" is proposed, even if data sniffing is otherwise disabled. Plain text may be converted to text/html if HTML tags are detected. </summary>

.

    IgnoreMIMETextPlain = &H4

.

    ''' <summary>Internet Explorer 8. Use the authoritative MIME type specified in pwzMimeProposed. Unless <see cref="MIMEFlags.IgnoreMIMETextPlain "/> is specified, no data sniffing is performed.</summary>

.

    ''' <summary>Internet Explorer 9. Do not perform detection if "text/plain" is specified in pwzMimeProposed.</summary>

.

    RespectTextPlain = &H10

.

Trace.Write("MimeType is " + MimeTypeFrom(Encoding.ASCII.GetBytes("%PDF-"), "text/plain"));

15: SnFLas
.

Tz7z1A <a href="http://beaiqqlwgezg.com/">beaiqqlwgezg</a>, [url=http://vvbkyavavtqc.com/]vvbkyavavtqc[/url], [link=http://mgeuboixasnf.com/]mgeuboixasnf[/link], http://gxtzlypvyfhs.com/

.

/// The URLMON library contains this function, URLDownloadToFile, which is a way

.

This can be used in place of IWebBrowser2.ExecWB( Save-As, Dont-Prompt ) which will always prompt the user anyway. The function does not return until the transfer finishes or fails.

.

/// The URLMON library contains this function, URLDownloadToFile, which is a way

.

This function does not prompt user for file location, as does ExecWB (even when you specify DONTPROMPT), and it does not return until file transfer finishes or fails.

.

    If (My.Computer.Network.IsAvailable) Then

secur32

.

Check InitializeSecurityContext for details

.

     /// The domain-only version includes trailing backslashes (\\).

.

     /// The domain-only version includes a trailing forward slash (/).

.

     /// is replaced with a new line character (\n), even in a domain-only case

.

     /// The DNS domain name followed by a backward-slash and the SAM user name.

.

     NameDnsDomain = 12

.

This may be required because System.Environment.UserDomainName is broken. If the local machine has a user account that is the same name as a logged in domain user (machineName\bob & domainName\bob) UserDomainName returns the machine name, not the domain name.

.

     NameDnsDomain = 12

.

      public String GetUserDomain()

.

    NameDnsDomain = 12

.

[System.Environment.UserDomainName]

.

    public uint cbSecurityTrailer;

.

                    throw new Exception("InitializeSecurityContext() failed!!!");                

.

                    throw new Exception("AcceptSecurityContext() failed!!!");                

.

                throw new Exception("QueryContextAttribute() failed!!!");                    

.

            ThisSecHelper[1] = new MultipleSecBufferHelper(new byte[ContextSizes.cbSecurityTrailer],SecBufferType.SECBUFFER_TOKEN);

.

                    throw new Exception("EncryptMessage() failed!!!");                    

.

            int SecurityTrailerLength = encryptedBuffer.Length - messageLength;

.

            byte[] SecurityTrailer = new byte[SecurityTrailerLength];

.

            Array.Copy(encryptedBuffer,messageLength,SecurityTrailer,0,SecurityTrailerLength);

.

            ThisSecHelper[1] = new MultipleSecBufferHelper(SecurityTrailer,SecBufferType.SECBUFFER_TOKEN);

.

                    throw new Exception("DecryptMessage() failed!!!");                    

.

                throw new Exception("QueryContextAttribute() failed!!!");                    

.

                    throw new Exception("MakeSignature() failed!!!");                    

.

                    throw new Exception("VerifySignature() failed!!!");                    

.

        static void Main(string[] args)

.

Whidbey makes it trivial to Kerberize your application using NegotiateStream. Check the Beta documentation for details...

.

    /// <param name="LsaHandle">[in] Handle obtained from a previous call to LsaRegisterLogonProcess or LsaConnectUntrusted.</param>

.

    /// <param name="AuthenticationPackage">[in] Supplies the identifier of the authentication package. This value is obtained by calling LsaLookupAuthenticationPackage.</param>

.

    /// <returns>If the function succeeds, the return value is STATUS_SUCCESS. Check the ProtocolStatus parameter to obtain the status returned by the authentication package.

.

    /// If the function fails, the return value is an NTSTATUS code. The following are possible error codes.

.

    public LSA_UNICODE_STRING LoginDomain;

.

    public LSA_UNICODE_STRING DnsDomainName;

.

      string domain =  Marshal.PtrToStringUni(data.LoginDomain.buffer).Trim();    //domain for this account  

.

      listBox1.Items.Add("User: " + username + " *** Domain: " + domain + " *** Login Type: (" + data.LogonType + ") " + secType.ToString() +" *** Login Time: "+time.ToLocalTime().ToString());

.

    /// This sample uses S4U security, which requires Windows Server 2003 and a W2003 domain controller

.

                    string Domain,

.

                    using (OSCalls.KerbS4ULogon authPackage = new OSCalls.KerbS4ULogon(UserName,Domain))

.

        /// Requires Windows Server 2003 domain account running in Win2003 native domain mode

.

        /// Raises an exception with error information if the user cannot log in

.

                       new Win32.HandleSecurityToken(credential.UserName,credential.Domain,(Win32.OSCalls.WinLogonType)logonType))

.

System.Security.Principal.WindowsIdentity has a constructor that you can use if you know the user's principal name (UPN). It does not work however for domain\username.

.
Summary
The LsaLookupAuthenticationPackage function obtains the unique identifier of an authentication package.
.

This may be required to obtain the UPN (or other format) of a user's credentials. Minimum supported OS is Windows 2000. Full documentation of the native API is available from http://msdn.microsoft.com/en-us/library/ms725484(VS.85).aspx.

.

          NameDnsDomain = 12

.

      public string GetTranslatedName(string domain, string user)

.

          string samCompatibleName = domain.ToUpper() + "\\" + username;

winhttp

.

/// <param name="lpcwszUrl">A pointer to a null-terminated Unicode string that contains the URL of the HTTP request that the application is preparing to send.</param>

.

/// <returns>If the function succeeds, the function returns <c>true</c>. If the function fails, it returns <c>false</c>. For extended error data, call <see cref="System.Runtime.InteropServices.Marshal.GetLastWin32Error"/>.</returns>

.

ERROR_WINHTTP_LOGIN_FAILURE - The login attempt failed. When this error is encountered, close the request handle with WinHttpCloseHandle. A new request handle must be created before retrying the function that originally produced this error.

.

ERROR_NOT_ENOUGH_MEMORY - Not enough memory was available to complete the requested operation. (Windows error code)

.

WinHttpGetProxyForUrl must be called on a per-URL basis, because the PAC file can return a different proxy server for different URLs. This is useful because the PAC file enables an IT department to implement proxy server load balancing by mapping (hashing) the target URL (specified by the lpcwszUrl parameter) to a certain proxy in a proxy server array.

.

static extern bool WinHttpQueryDataAvailable(

.

            ref UInt32 lpdwNumberOfBytesAvailable

.

Declare Function WinHttpQueryDataAvailable Lib "winhttp.dll" (ByVal hRequest As IntPtr, ByRef lpdwNumberOfBytesAvailable As Integer) As Boolean

.
Documentation
[WinHttpQueryDataAvailable] on MSDN
.
Summary
The WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure contains the Internet Explorer proxy configuration information.

iphlpapi

.

        public string DomainName;

.

Some, but not, all the information provided by the P/Invoke are available from the managed System.Net.NetworkInformation.NetworkInterface (http://msdn.microsoft.com/en-us/library/system.net.networkinformation.networkinterface.aspx) class.

.

        IF_TYPE_MEDIAMAILOVERIP = 139,  // Multimedia Mail over IP

.

        public uint Dhcpv6Iaid;

.

         // Lease Obtained (convert from "time_t" to C# DateTime)

.

         DateTime pdatDate = new DateTime(1970, 1, 1).AddSeconds( entry.LeaseObtained ).ToLocalTime();

.

         Console.WriteLine( "Lease Obtained: {0}", pdatDate.ToString() );

.

     throw new InvalidOperationException( "GetAdaptersInfo failed: " + ret );

.

    static void Main(string[] args)

.
Summary
The GetExtendedTcpTable function retrieves a table that contains a list of TCP endpoints available to the application.
.

      MIB_TCP_STATE_FIN_WAIT1,

.

      MIB_TCP_STATE_FIN_WAIT2,

.

      MIB_TCP_STATE_CLOSE_WAIT,

.

      MIB_TCP_STATE_TIME_WAIT,

.

    $StateList=@("UNKNOWN","CLOSED","LISTEN","SYN-SENT","SYN-RECEIVED","ESTABLISHED","FIN-WAIT-1","FIN-WAIT-2","CLOSE-WAIT","CLOSING","LAST-ACK","TIME-WAIT","DELETE-TCB")

.

          static void Main(string[] args)

.

            // Make the call again. If it did not succeed, then

.

            // raise an error.

.

        ' Make the call again. If it did not succeed, then

.

        ' raise an error.

.

        //try again w/ bigger buffer:

.

    Private Const MAX_DOMAIN_NAME_LEN As Integer = 128

.

    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=MAX_DOMAIN_NAME_LEN + 4)>

.

    Public DomainName As String

.

        'Try again w/ bigger buffer

.
Summary
.

        /// <para>If the function fails, the return value is one of the following error codes:

.

    static void Main(string[] args)

.

            string[] hostDetail = targetHost.Split(new string[] { "," }, StringSplitOptions.None);

.

            if (hostDetail != null && hostDetail.Length == 3)

.

            uint iDstAddr = lIpFromString(hostDetail[0]);

.

            uint iDstMask = lIpFromString(hostDetail[1]);

.

            filter.wDstPort = UInt16.Parse(hostDetail[2]);

.

            filter.wDstPortHighRange = UInt16.Parse(hostDetail[2]);

.

    static void Main(string[] args)

.

            string[] hostDetail = targetHost.Split(new string[] { "," }, StringSplitOptions.None);

.

            if (hostDetail != null && hostDetail.Length == 3)

.

            uint iDstAddr = lIpFromString(hostDetail[0]);

.

            uint iDstMask = lIpFromString(hostDetail[1]);

.

            filter.wDstPort = UInt16.Parse(hostDetail[2]);

.

            filter.wDstPortHighRange = UInt16.Parse(hostDetail[2]);

.

    /// The bMustBeUnique parameter can turn a shared interface into a unique one. However, using bMustBeUnique in this way can cause the function to fail.</param>

.

    static void Main(string[] args)

.

            string[] hostDetail = targetHost.Split(new string[] { "," }, StringSplitOptions.None);

.

            if (hostDetail != null && hostDetail.Length == 3)

.

            uint iDstAddr = lIpFromString(hostDetail[0]);

.

            uint iDstMask = lIpFromString(hostDetail[1]);

.

            filter.wDstPort = UInt16.Parse(hostDetail[2]);

.

            filter.wDstPortHighRange = UInt16.Parse(hostDetail[2]);

.

    /// <param name="pInterface">[in] Specifies an interface handle obtained from a previous call to PfCreateInterface.</param>

.

    throw new Win32Exception(retValue, "SendARP failed.");

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

winspool

.

    MessageBox.Show(String.Format("Adding the monitor failed.\n\nError: {0}", errorMessage), sErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);

.

    MessageBox.Show(String.Format("Adding the monitor failed:\n\nException: {0}", e.ToString()), sErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);

.

     MessageBox.Show(String.Format("Deleting the monitor failed.\n\nError: {0}", errorMessage), sErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);

.

   MessageBox.Show(String.Format("Deleting the monitor failed.\n\nException: {0}", ex.ToString()), sErrorTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);

.

Obtain a pointer to the DEVMODE struct (either printerHandle or printerName can be NULL | IntPtr.ZERO):

.

On a Win8 x64 system, I encountered the issue when I was trying to target x86 compiling. The call to DocumentProperties would fail and return -1 for sizeNeeded.

.

If I target x64 or AnyCPU, everything is working fine. However, because of other constraints, I had to target x86 and couldn't make it work without using the IntPtr.Zero fix. Now it works in every configuration.

.

    /// structure contains printer driver information

.

        /// Pointer to a null-terminated string that specifies a file name or a full path and file name for the file that contains the device driver (for example, C:\DRIVERS\Pscript.dll).

.

        /// Pointer to a null-terminated string that specifies a file name or a full path and file name for the file that contains driver data (for example, C:\DRIVERS\Qms810.ppd).

.

        /// A pointer to a MultiSZ buffer that contains a sequence of null-terminated strings. Each null-terminated string in the buffer contains the name of a file the driver depends on. The sequence of strings is terminated by an empty, zero-length string. If pDependentFiles is not NULL and does not contain any file names, it will point to a buffer that contains two empty strings.

.
Summary
Contains printer driver information.
.

    'this call will always fail (return non-0)

.

        throw new Exception("EnumMonitors should fail!");

.
Summary
Enum all Available Ports in a System.
.

        throw new Exception("EnumPorts should fail!");

.

        'to zero. The call will fails specifying

.

        throw new Exception("EnumPrinters should fail!");

.

    // length contains the path length

.

    // str contains the path

.

As always, only do SetLastError=true if you actually intend to call GetLastError (This includes throwing a Win32Exception if the call fails)

54: SetJob
.

    Public Const JOB_CONTROL_RETAIN = &H8

.

    // Returns true on success, false on failure.

.

    bool    bSuccess = false; // Assume failure unless you specifically succeed.

.

        // hXvc contains an Xcv data handle to a local TCPMON port

faultrep

.

    static void Main(string[] args)

setupapi

.
Summary
The CM_Get_Child function obtains a device instance handle to the child node of a specified device node, in the local machine's device tree. If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h
.

property, A CM_DRP_-prefixed constant value that identifies the device property to be obtained from the registry. These constants are defined in Cfgmgr32.h.

.

Also Microsoft.Win32.RegistryValueKind only contains enumerations for the basic kinds.

.

// from SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetail so please see those examples

.
Summary
The CM_Get_DevNode_Status function obtains the status of a device instance from its device node, in the local machine's device tree.

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


 
Access PInvoke.net directly from VS: