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

user32

.

/// <para>This function typically fails for one of the following reasons:</para>

.

''' <para>This function typically fails for one of the following reasons:</para>

.

This seems to work reasonably:

.

static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason);

.

static extern bool ExitWindowsEx(uint uFlags, uint dwReason);

.

     ByVal dwReason As ShutdownReason) As <MarshalAs(UnmanagedType.Bool)> Boolean

.
  • dwReason - See ShutdownReason
.

        static extern bool ExitWindowsEx(uint uFlags, uint dwReason);

.

            ExitWindowsEx(ExitWindows.LogOff, ShutdownReason.MajorOther | ShutdownReason.MinorOther);

.

Changed the sample code Reason parameter from "&" to "ShutdownReason.MajorOther | ShutdownReason.MinorOther". Amperstand (&) is the binary AND condition, and the values ANDed together would be zero. The intended condition is that the flags be ORed together. (|)

.
Summary
.
Summary
Indicates that the system cannot be shut down and sets a reason string to be displayed to the user if system shutdown is initiated.
.

static extern bool ShutdownBlockReasonCreate(IntPtr hWnd, [MarshalAs(UnmanagedType.LPWStr)] string reason);

.

Declare Function ShutdownBlockReasonCreate Lib "user32.dll" (ByVal hWnd As IntPtr, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal reason As String) As Boolean

.

reason - The reason the application must block system shutdown.

.
  • Invisible windows won't show up in Vista's "Running Applications" dialog on shutdown/logoff and therefore the reason set with this method will not be visible to the end-user .
.

if (!ShutdownBlockReasonCreate(handleForShutdownBlocker, UIMessages.GetString("ShutdownBlockReason"))) {

.

    log.Error(string.Format("Failed calling ShutdownBlockReasonCreate. Error code: {0}, blocking form handle: {1}", error, handleForShutdownBlocker));

.
Documentation
[ShutdownBlockReasonCreate] on MSDN
.
Summary
Indicates that the system can be shut down and frees the reason string.
.

static extern bool ShutdownBlockReasonDestroy(IntPtr hWnd);

.

Declare Function ShutdownBlockReasonDestroy Lib "user32.dll" (hWnd As IntPtr) As Boolean

.
Documentation
[ShutdownBlockReasonDestroy] on MSDN

winmm

.

When recording waveform audio, usually buffers are allocated with unmanaged functions and kept in an IntPtr() array; for this reason the function is provided in two versions, one processing a WAVEHDR ByRef and the other working with an IntPtr.

wtsapi32

.

I observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of "Bulkington! Bulkington! where's Bulkington?" and darted out of the house in pursuit of him.

odbccp32

.

SQLInstallerError does not post error values for itself. SQLInstallerError returns SQL_NO_DATA when it is unable to retrieve any error information (in which case pfErrorCode is undefined). If SQLInstallerError cannot access error values for any reason that would normally return SQL_ERROR, SQLInstallerError returns SQL_ERROR but does not post any error values. If either the lpszErrorMsg argument is NULL or the cbErrorMsgMax is less than or equal to 0, this function returns SQL_ERROR. If the buffer for the error message is too short, SQLInstallerError returns SQL_SUCCESS_WITH_INFO and returns the correct pfErrorCode value for SQLInstallerError.

Constants

.

I observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of "Bulkington! Bulkington! where's Bulkington?" and darted out of the house in pursuit of him.

.

    public static PropertyKey PKEY_ParentalRatingReason = new PropertyKey( 0x10984E0A, 0xF9F2, 0x4321, 0xB7, 0xEF, 0xBA, 0xF1, 0x95, 0xAF, 0x43, 0x19, 100);

.

    public static Guid FMTID_ParentalRatingReason = new Guid("10984E0A-F9F2-4321-B7EF-BAF195AF4319");

12: REASON
.
Summary
Values from reason.h
.

private const UInt32 SHTDN_REASON_MAJOR_OTHER    = 0x00000000;

.

private const UInt32 SHTDN_REASON_MINOR_OTHER    = 0x00000000;

.

private const UInt32 SHTDN_REASON_FLAG_PLANNED    = 0x80000000;

.

Private Const SHTDN_REASON_MAJOR_OTHER    = 0

.

Private Const SHTDN_REASON_MINOR_OTHER    = 0

.

Private Const SHTDN_REASON_FLAG_PLANNED    = &H80000000

.

        /// Logon failure: user account restriction.  Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced.

.

        /// The modification was not permitted for security reasons.

.

        /// The attribute is not allowed to be replicated to the GC because of security reasons.

.

        /// For security reasons, the operation must be run on the destination DC.

.

        /// For security reasons, the source DC must be NT4SP4 or greater.

.

        /// Rejected for administrative reasons - bad credentials.

.

        /// Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE service.  Kerberos authentication will not function.  The most likely reason for this is lack of domain membership.  This is normal if your computer is a member of a workgroup.

.

        /// The transaction failed to commit for an unknown reason. The transaction was aborted.

coredll

.

Getting at the device id is relatively straight forward but requires either some C++ or a reasonable amount of interop code. The api is something like this:

wlanapi

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

Public Shared Function WlanHostedNetwrokStartUsing(hClientHandle As IntPtr, <Out> pFailReason As WLAN_HOSTED_NETWORK_REASON, pReserved As IntPtr) As UInteger

.

     [Out] out WLAN_HOSTED_NETWORK_REASON pFailReason,

.

public static extern uint WlanReasonCodeToString(uint dwReasonCode,uint dwBufferSize,string pStringBuffer,IntPtr pReserved);

.

Declare Function WlanReasonCodeToString Lib "wlanapi.dll" (TODO) As TODO

.

uint pwdReasonCode=524289,dwBufferSize=64;

.

WlanReasonCodeToString(pwdReasonCode,dwBufferSize,pStringBuffer,new IntPtr());

.
Documentation
[WlanReasonCodeToString] on MSDN

cfgmgr32

.

vetoType, If not NULL, this points to a location that, if the removal request fails, receives a PNP_VETO_TYPE-typed value indicating the reason for the failure.

.

I observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of "Bulkington! Bulkington! where's Bulkington?" and darted out of the house in pursuit of him.

urlmon

.

/// security reasons".  This function gets around those reasons.

.

/// security reasons".  This function gets around those reasons.

kernel32

.

    /// always pass this with AttachConsole in .NET for stability reasons and mainly because

.

    /// always pass this with AttachConsole in .NET for stability reasons and mainly because

.

    CopyProgressCallbackReason dwCallbackReason,

.

    enum CopyProgressCallbackReason : uint

.

    private CopyProgressResult CopyProgressHandler(long total, long transferred, long streamSize, long StreamByteTrans, uint dwStreamNumber,CopyProgressCallbackReason reason, IntPtr hSourceFile, IntPtr hDestinationFile, IntPtr lpData)

.

        ByVal dwStreamNumber As UInteger, ByVal dwCallbackReason As CopyProgressCallbackReason, _

.

    Private Enum CopyProgressCallbackReason As UInteger

.

    Private Function CopyProgressHandler(ByVal total As Long, ByVal transferred As Long, ByVal streamSize As Long, ByVal StreamByteTrans As Long, ByVal dwStreamNumber As UInteger, ByVal reason As CopyProgressCallbackReason, _

.

    CopyProgressCallbackReason dwCallbackReason,

.

    enum CopyProgressCallbackReason : uint

.

    private CopyProgressResult CopyProgressHandler(long total, long transferred, long streamSize, long StreamByteTrans, uint dwStreamNumber,CopyProgressCallbackReason reason, IntPtr hSourceFile, IntPtr hDestinationFile, IntPtr lpData)

.

        ByVal dwStreamNumber As UInteger, ByVal dwCallbackReason As CopyProgressCallbackReason, _

.

    Private Enum CopyProgressCallbackReason As UInteger

.

    Private Function CopyProgressHandler(ByVal total As Long, ByVal transferred As Long, ByVal streamSize As Long, ByVal StreamByteTrans As Long, ByVal dwStreamNumber As UInteger, ByVal reason As CopyProgressCallbackReason, _

.

I was trying to put the "GetShortName" into a module and calling it from my Form (as I am used to doing). What I found, and it works for some reason, was to put this in my module:

.

    CopyProgressCallbackReason dwCallbackReason,

.

    enum CopyProgressCallbackReason : uint

.

    private CopyProgressResult CopyProgressHandler(long total, long transferred, long streamSize, long StreamByteTrans, uint dwStreamNumber,CopyProgressCallbackReason reason, IntPtr hSourceFile, IntPtr hDestinationFile, IntPtr lpData)

.

    CopyProgressCallbackReason dwCallbackReason,

.

    enum CopyProgressCallbackReason : uint

.

    private CopyProgressResult CopyProgressHandler(long total, long transferred, long streamSize, long StreamByteTrans, uint dwStreamNumber,CopyProgressCallbackReason reason, IntPtr hSourceFile, IntPtr hDestinationFile, IntPtr lpData)

.

        ++info.srWindow.Bottom;                    // reasons for these is unknown

.

The third argument (lpNewFilePointer) is of type LARGE_INTEGER, which has a size of 64 bits. For this reason use a UInt64 for this argument. (See sample below)

.

The third argument (lpNewFilePointer) is of type LARGE_INTEGER, which has a size of 64 bytes. For this reason use a UInt64 for this argument. (See sample below)

.

SetThreadAffinityMask() alters the Win32 thread affinity mask. The same Win32 thread may be used for multiple different System.Threading.Thread instances (I believe not concurrently, but the underlying Win32 thread will be reused for performance reasons once an existing System.Threading.ThreadStart delegate exits).

advapi32

.
Summary
The CryptDestroyHash function destroys the hash object referenced by the hHash parameter. After a hash object has been destroyed, it can no longer be used. The destruction of hash objects after their use is finished is recommended for security reasons.
.

    UInt32 dwReason);

.

     ByVal dwReason As UInt32) As UInt32 ' returns ERROR_SUCCESS (&H0) if successful

.
Summary
Initiates a shutdown and optional restart of the specified computer, and optionally records the reason for the shutdown.
.

    ShutdownReason dwReason);

.

  public enum ShutdownReason : uint

.

    // Microsoft major reasons.

.

    SHTDN_REASON_MAJOR_OTHER        = 0x00000000,

.

    SHTDN_REASON_MAJOR_NONE         = 0x00000000,

.

    SHTDN_REASON_MAJOR_HARDWARE         = 0x00010000,

.

    SHTDN_REASON_MAJOR_OPERATINGSYSTEM      = 0x00020000,

.

    SHTDN_REASON_MAJOR_SOFTWARE         = 0x00030000,

.

    SHTDN_REASON_MAJOR_APPLICATION      = 0x00040000,

.

    SHTDN_REASON_MAJOR_SYSTEM           = 0x00050000,

.

    SHTDN_REASON_MAJOR_POWER        = 0x00060000,

.

    SHTDN_REASON_MAJOR_LEGACY_API       = 0x00070000,

.

    // Microsoft minor reasons.

.

    SHTDN_REASON_MINOR_OTHER        = 0x00000000,

.

    SHTDN_REASON_MINOR_NONE         = 0x000000ff,

.

    SHTDN_REASON_MINOR_MAINTENANCE      = 0x00000001,

.

    SHTDN_REASON_MINOR_INSTALLATION     = 0x00000002,

.

    SHTDN_REASON_MINOR_UPGRADE          = 0x00000003,

.

    SHTDN_REASON_MINOR_RECONFIG         = 0x00000004,

.

    SHTDN_REASON_MINOR_HUNG         = 0x00000005,

.

    SHTDN_REASON_MINOR_UNSTABLE         = 0x00000006,

.

    SHTDN_REASON_MINOR_DISK         = 0x00000007,

.

    SHTDN_REASON_MINOR_PROCESSOR        = 0x00000008,

.

    SHTDN_REASON_MINOR_NETWORKCARD      = 0x00000000,

.

    SHTDN_REASON_MINOR_POWER_SUPPLY     = 0x0000000a,

.

    SHTDN_REASON_MINOR_CORDUNPLUGGED    = 0x0000000b,

.

    SHTDN_REASON_MINOR_ENVIRONMENT      = 0x0000000c,

.

    SHTDN_REASON_MINOR_HARDWARE_DRIVER      = 0x0000000d,

.

    SHTDN_REASON_MINOR_OTHERDRIVER      = 0x0000000e,

.

    SHTDN_REASON_MINOR_BLUESCREEN       = 0x0000000F,

.

    SHTDN_REASON_MINOR_SERVICEPACK      = 0x00000010,

.

    SHTDN_REASON_MINOR_HOTFIX           = 0x00000011,

.

    SHTDN_REASON_MINOR_SECURITYFIX      = 0x00000012,

.

    SHTDN_REASON_MINOR_SECURITY         = 0x00000013,

.

    SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014,

.

    SHTDN_REASON_MINOR_WMI          = 0x00000015,

.

    SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016,

.

    SHTDN_REASON_MINOR_HOTFIX_UNINSTALL     = 0x00000017,

.

    SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018,

.

    SHTDN_REASON_MINOR_MMC          = 0x00000019,

.

    SHTDN_REASON_MINOR_TERMSRV          = 0x00000020,

.

    SHTDN_REASON_FLAG_USER_DEFINED      = 0x40000000,

.

    SHTDN_REASON_FLAG_PLANNED           = 0x80000000,

.

    SHTDN_REASON_UNKNOWN            = SHTDN_REASON_MINOR_NONE,

.

    SHTDN_REASON_LEGACY_API         = (SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED),

.

    SHTDN_REASON_VALID_BIT_MASK         = 0xc0ffffff

.

     ByVal ShutdownReason As ShutdownReason) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

    Public Enum ShutdownReason As UInteger

.

    ' Microsoft major reasons.

.

    SHTDN_REASON_MAJOR_OTHER = &H0UI

.

    SHTDN_REASON_MAJOR_NONE = &H0UI

.

    SHTDN_REASON_MAJOR_HARDWARE = &H10000UI

.

    SHTDN_REASON_MAJOR_OPERATINGSYSTEM = &H20000UI

.

    SHTDN_REASON_MAJOR_SOFTWARE = &H30000UI

.

    SHTDN_REASON_MAJOR_APPLICATION = &H40000UI

.

    SHTDN_REASON_MAJOR_SYSTEM = &H50000UI

.

    SHTDN_REASON_MAJOR_POWER = &H60000UI

.

    SHTDN_REASON_MAJOR_LEGACY_API = &H70000UI

.

    ' Microsoft minor reasons.

.

    SHTDN_REASON_MINOR_OTHER = &H0UI

.

    SHTDN_REASON_MINOR_NONE = &HFFUI

.

    SHTDN_REASON_MINOR_MAINTENANCE = &H1UI

.

    SHTDN_REASON_MINOR_INSTALLATION = &H2UI

.

    SHTDN_REASON_MINOR_UPGRADE = &H3UI

.

    SHTDN_REASON_MINOR_RECONFIG = &H4UI

.

    SHTDN_REASON_MINOR_HUNG = &H5UI

.

    SHTDN_REASON_MINOR_UNSTABLE = &H6UI

.

    SHTDN_REASON_MINOR_DISK = &H7UI

.

    SHTDN_REASON_MINOR_PROCESSOR = &H8UI

.

    SHTDN_REASON_MINOR_NETWORKCARD = &H0UI

.

    SHTDN_REASON_MINOR_POWER_SUPPLY = &HAUI

.

    SHTDN_REASON_MINOR_CORDUNPLUGGED = &HBUI

.

    SHTDN_REASON_MINOR_ENVIRONMENT = &HCUI

.

    SHTDN_REASON_MINOR_HARDWARE_DRIVER = &HDUI

.

    SHTDN_REASON_MINOR_OTHERDRIVER = &HEUI

.

    SHTDN_REASON_MINOR_BLUESCREEN = &HFUI

.

    SHTDN_REASON_MINOR_SERVICEPACK = &H10UI

.

    SHTDN_REASON_MINOR_HOTFIX = &H11UI

.

    SHTDN_REASON_MINOR_SECURITYFIX = &H12UI

.

    SHTDN_REASON_MINOR_SECURITY = &H13UI

.

    SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = &H14UI

.

    SHTDN_REASON_MINOR_WMI = &H15UI

.

    SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = &H16UI

.

    SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = &H17UI

.

    SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = &H18UI

.

    SHTDN_REASON_MINOR_MMC = &H19UI

.

    SHTDN_REASON_MINOR_TERMSRV = &H20UI

.

    SHTDN_REASON_FLAG_USER_DEFINED = &H40000000UI

.

    SHTDN_REASON_FLAG_PLANNED = &H80000000UI

.

    SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE

.

    SHTDN_REASON_LEGACY_API = (SHTDN_REASON_MAJOR_LEGACY_API Or SHTDN_REASON_FLAG_PLANNED)

.

    SHTDN_REASON_VALID_BIT_MASK = &HC0FFFFFFUI

.

dwReason: The ShutdownReason enum can be used for this parameter.

.
Summary
Initiates a shutdown and optional restart of the specified computer, and optionally records the reason for the shutdown.
.

    ShutdownReason dwReason);

.

  public enum ShutdownReason : uint

.

    // Microsoft major reasons.

.

    SHTDN_REASON_MAJOR_OTHER        = 0x00000000,

.

    SHTDN_REASON_MAJOR_NONE         = 0x00000000,

.

    SHTDN_REASON_MAJOR_HARDWARE         = 0x00010000,

.

    SHTDN_REASON_MAJOR_OPERATINGSYSTEM      = 0x00020000,

.

    SHTDN_REASON_MAJOR_SOFTWARE         = 0x00030000,

.

    SHTDN_REASON_MAJOR_APPLICATION      = 0x00040000,

.

    SHTDN_REASON_MAJOR_SYSTEM           = 0x00050000,

.

    SHTDN_REASON_MAJOR_POWER        = 0x00060000,

.

    SHTDN_REASON_MAJOR_LEGACY_API       = 0x00070000,

.

    // Microsoft minor reasons.

.

    SHTDN_REASON_MINOR_OTHER        = 0x00000000,

.

    SHTDN_REASON_MINOR_NONE         = 0x000000ff,

.

    SHTDN_REASON_MINOR_MAINTENANCE      = 0x00000001,

.

    SHTDN_REASON_MINOR_INSTALLATION     = 0x00000002,

.

    SHTDN_REASON_MINOR_UPGRADE          = 0x00000003,

.

    SHTDN_REASON_MINOR_RECONFIG         = 0x00000004,

.

    SHTDN_REASON_MINOR_HUNG         = 0x00000005,

.

    SHTDN_REASON_MINOR_UNSTABLE         = 0x00000006,

.

    SHTDN_REASON_MINOR_DISK         = 0x00000007,

.

    SHTDN_REASON_MINOR_PROCESSOR        = 0x00000008,

.

    SHTDN_REASON_MINOR_NETWORKCARD      = 0x00000000,

.

    SHTDN_REASON_MINOR_POWER_SUPPLY     = 0x0000000a,

.

    SHTDN_REASON_MINOR_CORDUNPLUGGED    = 0x0000000b,

.

    SHTDN_REASON_MINOR_ENVIRONMENT      = 0x0000000c,

.

    SHTDN_REASON_MINOR_HARDWARE_DRIVER      = 0x0000000d,

.

    SHTDN_REASON_MINOR_OTHERDRIVER      = 0x0000000e,

.

    SHTDN_REASON_MINOR_BLUESCREEN       = 0x0000000F,

.

    SHTDN_REASON_MINOR_SERVICEPACK      = 0x00000010,

.

    SHTDN_REASON_MINOR_HOTFIX           = 0x00000011,

.

    SHTDN_REASON_MINOR_SECURITYFIX      = 0x00000012,

.

    SHTDN_REASON_MINOR_SECURITY         = 0x00000013,

.

    SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014,

.

    SHTDN_REASON_MINOR_WMI          = 0x00000015,

.

    SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016,

.

    SHTDN_REASON_MINOR_HOTFIX_UNINSTALL     = 0x00000017,

.

    SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018,

.

    SHTDN_REASON_MINOR_MMC          = 0x00000019,

.

    SHTDN_REASON_MINOR_TERMSRV          = 0x00000020,

.

    SHTDN_REASON_FLAG_USER_DEFINED      = 0x40000000,

.

    SHTDN_REASON_FLAG_PLANNED           = 0x80000000,

.

    SHTDN_REASON_UNKNOWN            = SHTDN_REASON_MINOR_NONE,

.

    SHTDN_REASON_LEGACY_API         = (SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED),

.

    SHTDN_REASON_VALID_BIT_MASK         = 0xc0ffffff

.

     ByVal ShutdownReason As ShutdownReason) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

    Public Enum ShutdownReason As UInteger

.

    ' Microsoft major reasons.

.

    SHTDN_REASON_MAJOR_OTHER = &H0UI

.

    SHTDN_REASON_MAJOR_NONE = &H0UI

.

    SHTDN_REASON_MAJOR_HARDWARE = &H10000UI

.

    SHTDN_REASON_MAJOR_OPERATINGSYSTEM = &H20000UI

.

    SHTDN_REASON_MAJOR_SOFTWARE = &H30000UI

.

    SHTDN_REASON_MAJOR_APPLICATION = &H40000UI

.

    SHTDN_REASON_MAJOR_SYSTEM = &H50000UI

.

    SHTDN_REASON_MAJOR_POWER = &H60000UI

.

    SHTDN_REASON_MAJOR_LEGACY_API = &H70000UI

.

    ' Microsoft minor reasons.

.

    SHTDN_REASON_MINOR_OTHER = &H0UI

.

    SHTDN_REASON_MINOR_NONE = &HFFUI

.

    SHTDN_REASON_MINOR_MAINTENANCE = &H1UI

.

    SHTDN_REASON_MINOR_INSTALLATION = &H2UI

.

    SHTDN_REASON_MINOR_UPGRADE = &H3UI

.

    SHTDN_REASON_MINOR_RECONFIG = &H4UI

.

    SHTDN_REASON_MINOR_HUNG = &H5UI

.

    SHTDN_REASON_MINOR_UNSTABLE = &H6UI

.

    SHTDN_REASON_MINOR_DISK = &H7UI

.

    SHTDN_REASON_MINOR_PROCESSOR = &H8UI

.

    SHTDN_REASON_MINOR_NETWORKCARD = &H0UI

.

    SHTDN_REASON_MINOR_POWER_SUPPLY = &HAUI

.

    SHTDN_REASON_MINOR_CORDUNPLUGGED = &HBUI

.

    SHTDN_REASON_MINOR_ENVIRONMENT = &HCUI

.

    SHTDN_REASON_MINOR_HARDWARE_DRIVER = &HDUI

.

    SHTDN_REASON_MINOR_OTHERDRIVER = &HEUI

.

    SHTDN_REASON_MINOR_BLUESCREEN = &HFUI

.

    SHTDN_REASON_MINOR_SERVICEPACK = &H10UI

.

    SHTDN_REASON_MINOR_HOTFIX = &H11UI

.

    SHTDN_REASON_MINOR_SECURITYFIX = &H12UI

.

    SHTDN_REASON_MINOR_SECURITY = &H13UI

.

    SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = &H14UI

.

    SHTDN_REASON_MINOR_WMI = &H15UI

.

    SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = &H16UI

.

    SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = &H17UI

.

    SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = &H18UI

.

    SHTDN_REASON_MINOR_MMC = &H19UI

.

    SHTDN_REASON_MINOR_TERMSRV = &H20UI

.

    SHTDN_REASON_FLAG_USER_DEFINED = &H40000000UI

.

    SHTDN_REASON_FLAG_PLANNED = &H80000000UI

.

    SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE

.

    SHTDN_REASON_LEGACY_API = (SHTDN_REASON_MAJOR_LEGACY_API Or SHTDN_REASON_FLAG_PLANNED)

.

    SHTDN_REASON_VALID_BIT_MASK = &HC0FFFFFFUI

.

dwReason: The ShutdownReason enum can be used for this parameter.

.

The reason behind using byte[] for a sid is a mystery to me. Has anyone documented this? I've just copied the techniques from other functions here and it seems to work.

mapi32

.

MSDN says that MAPI does not strictly adhere to the COM standard. Perhaps this is one reason why MS won't support this.

.

  For some unknown reason, you need to pass lpszName as a new object, not an existing reference, otherwise you get an AccessViolationException.

Interfaces

.

    int Abort(int hrReason, int options);

.

               int uReasonCode);

setupapi

.

           PNP_VETO_TYPE veto; // PNP_VETO_TYPE enumeration is used to identify the reason for rejection

Delegates

.

    CopyProgressCallbackReason dwCallbackReason,

.

CopyProgressResult, CopyProgressCallbackReason

gdi32

.

       //afterwards. If you for some reason don't want to do this you can use a

Enums

.
Summary
.

enum CopyProgressCallbackReason : uint

.
Documentation
[CopyProgressCallbackReason] on MSDN
.

    ///The transaction failed to commit for an unknown reason. The transaction was aborted.

.

    [Description("The transaction failed to commit for an unknown reason. The transaction was aborted.")]

.

    '''The transaction failed to commit for an unknown reason. The transaction was aborted.

.

    <Description("The transaction failed to commit for an unknown reason. The transaction was aborted.")> _

.

  /// Describes the reasons a restart of the system is needed.

.

  public enum RM_REBOOT_REASON : uint

.

    RmRebootReasonNone = 0x0,

.

    RmRebootReasonPermissionDenied = 0x1,

.

    RmRebootReasonSessionMismatch = 0x2,

.

    RmRebootReasonCriticalProcess = 0x4,

.

    RmRebootReasonCriticalService = 0x8,

.

    RmRebootReasonDetectedSelf = 0x10

.
Documentation
[RM_REBOOT_REASON] on MSDN
.
Summary
Defines the Shutdown reason for the user32.ExitWindowsEx method
.

enum ShutdownReason : uint

.

Enum ShutdownReason As UInteger

.
Documentation
[ShutdownReason] on MSDN
.

    ''' Reason for the notification.

.
Summary
The WLAN_HOSTED_NETWORK_REASON enumerated type specifies the possible values for the result of a wireless Hosted Network function call.
.

public enum WLAN_HOSTED_NETWORK_REASON

.

    wlan_hosted_network_reason_success = 0,

.

    wlan_hosted_network_reason_unspecified,

.

    wlan_hosted_network_reason_bad_parameters,

.

    wlan_hosted_network_reason_service_shutting_down,

.

    wlan_hosted_network_reason_insufficient_resources,

.

    wlan_hosted_network_reason_elevation_required,

.

    wlan_hosted_network_reason_read_only,

.

    wlan_hosted_network_reason_persistence_failed,

.

    wlan_hosted_network_reason_crypt_error,

.

    wlan_hosted_network_reason_impersonation,

.

    wlan_hosted_network_reason_stop_before_start,

.

    wlan_hosted_network_reason_interface_available,

.

    wlan_hosted_network_reason_interface_unavailable,

.

    wlan_hosted_network_reason_miniport_stopped,

.

    wlan_hosted_network_reason_miniport_started,

.

    wlan_hosted_network_reason_incompatible_connection_started,

.

    wlan_hosted_network_reason_incompatible_connection_stopped,

.

    wlan_hosted_network_reason_user_action,

.

    wlan_hosted_network_reason_client_abort,

.

    wlan_hosted_network_reason_ap_start_failed,

.

    wlan_hosted_network_reason_peer_arrived,

.

    wlan_hosted_network_reason_peer_departed,

.

    wlan_hosted_network_reason_peer_timeout,

.

    wlan_hosted_network_reason_gp_denied,

.

    wlan_hosted_network_reason_service_unavailable,

.

    wlan_hosted_network_reason_device_change,

.

    wlan_hosted_network_reason_properties_change,

.

    wlan_hosted_network_reason_virtual_station_blocking_use,

.

    wlan_hosted_network_reason_service_available_on_virtual_station

.

Enum WLAN_HOSTED_NETWORK_REASON

.
Documentation
[WLAN_HOSTED_NETWORK_REASON] on MSDN

opengl32

.

I observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of "Bulkington! Bulkington! where's Bulkington?" and darted out of the house in pursuit of him.

msports

.

I observed, however, that one of them held somewhat aloof, and though he seemed desirous not to spoil the hilarity of his shipmates by his own sober face, yet upon the whole he refrained from making as much noise as the rest. This man interested me at once; and since the sea-gods had ordained that he should soon become my shipmate (though but a sleeping-partner one, so far as this narrative is concerned), I will here venture upon a little description of him. He stood full six feet in height, with noble shoulders, and a chest like a coffer-dam. I have seldom seen such brawn in a man. His face was deeply brown and burnt, making his white teeth dazzling by the contrast; while in the deep shadows of his eyes floated some reminiscences that did not seem to give him much joy. His voice at once announced that he was a Southerner, and from his fine stature, I thought he must be one of those tall mountaineers from the Alleghanian Ridge in Virginia. When the revelry of his companions had mounted to its height, this man slipped away unobserved, and I saw no more of him till he became my comrade on the sea. In a few minutes, however, he was missed by his shipmates, and being, it seems, for some reason a huge favourite with them, they raised a cry of "Bulkington! Bulkington! where's Bulkington?" and darted out of the house in pursuit of him.

rapi

.

BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)

shlwapi

.

This interface does NOT have a way to tell the preview handler what file it should show!! For this reason, all preview handler COM objects must also support at least one of IInitializeWithFile or IInitializeWithStream, which is how they get this crucial piece of information.

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


 
Access PInvoke.net directly from VS: