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

setupapi

.

[out, optional] Pointer to a buffer to receive the INF file name assigned to it at the time it was copied to the INF directory. The buffer, if specified, should typically be MAX_PATH in length. If the SP_COPY_NOOVERWRITE flag is specified and the SetupCopyOEMInf function fails with a return code of ERROR_FILE_EXISTS, this buffer will contain the name of the existing INF file. If the SP_COPY_OEMINF_CATALOG_ONLY flag is specified, this buffer will contain the destination INF filename if the INF file is already present in the INF directory. Otherwise, this buffer will be set to the empty string. This parameter can be NULL.

.

        public System.Runtime.InteropServices.ComTypes.FILETIME DriverDate;

.

If this function is called with a ReturnBuffer of NULL and a ReturnBufferSize of zero, the function puts the buffer size needed to hold the specified data into the variable pointed to by RequiredSize. If the function succeeds in this, the return value is a nonzero value. Otherwise, the return value is zero and extended error information can be obtained by calling GetLastError. You can call the function once to get the required buffer size, allocate the necessary memory, and then call the function a second time to retrieve the data. Using this technique, you can avoid errors due to an insufficient buffer size.

oleacc

.

if ( SendMessageTimeout(hWnd, nMsg, UIntPtr.Zero, IntPtr.Zero,

.

     SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lRes) == IntPtr.Zero )

dwmapi

.

This only appears to be an issue with VS2008, and it may have been fixed by the time you are reading this, so try to run the project first, and if you click on one of the 'TaskDialog' buttons and see it popup (ie you dont see an exception) then you do not need to take these steps, if you do get an exception, follow the steps below:

.

This only appears to be an issue with VS2008, and it may have been fixed by the time you are reading this, so try to run the project first, and if you click on one of the 'TaskDialog' buttons and see it popup (ie you dont see an exception) then you do not need to take these steps, if you do get an exception, follow the steps below:

mpr

.

[DllImport("mpr.dll", CharSet = System.Runtime.InteropServices.CharSet.Ansi)]

.

  using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

    [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpLocalName;

.

    [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpRemoteName;

.

    [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpComment;

.

    [MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)] public string lpProvider;

.

Imports System.Runtime.InteropServices

.

    <MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpLocalName As String

.

    <MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpRemoteName As String

.

    <MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpComment As String

.

    <MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPTStr)> Public lpProvider As String

dbghelp

.

    string dumpFileName = assemblyPath + "_" + DateTime.Now.ToString("dd.MM.yyyy.HH.mm.ss") + ".dmp";

httpapi

.
Summary
The HttpDeleteServiceConfiguration function deletes specified information, such as IP addresses or SSL Certificates, from the HTTP API configuration store, one record at a time.
.

        public int DefaultRevocationFreshnessTime;

.

        public int DefaultRevocationUrlRetrievalTimeout;

.

        configSslParam.DefaultRevocationFreshnessTime = 0;

.

        configSslParam.DefaultRevocationUrlRetrievalTimeout = 0;

.
Summary
The HttpTerminate function cleans up resources used by the HTTP API to process calls by an application. An application should call HttpTerminate once for every time it called HttpInitialize, with matching flag settings.

irprops

.

        Public timeoutMultiplier As Byte

.

        Public lastSeen As SystemTime

.

        Public lastUsed As SystemTime

.

            Me.lastSeen = New SystemTime

.

            Me.lastUsed = New SystemTime

.

    Private Structure SystemTime

Constants

.

    public static Guid KSCATEGORY_REALTIME = new Guid("EB115FFC-10C8-4964-831D-6DCB02E6F23F");

.

    public const int LOCALE_STIME = 0x0000001E;

.

    public const int LOCALE_STIMEFORMAT = 0x00001003;

.

    public const int LOCALE_ITIME = 0x00000023;

.

    public const int LOCALE_ITIMEMARKPOSN = 0x00001005;

17: LR_
.

    /// Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage for the

.

    ''' Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage for the

18: MAPI
.

  /// The message identifiers returned should be in the order of time received.

19: NERR_
.

        public const int ServiceCtlTimeout = 2186;

.

        /// <summary> 2241 - The user is not allowed to log on at this time. </summary>

.

        public const int TimeDiffAtDC = 2457;

.

    public static PropertyKey PKEY_Device_DriverDate = new PropertyKey(0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2);      // DEVPROP_TYPE_FILETIME

.

    public static PropertyKey PKEY_Calendar_ReminderTime = new PropertyKey( 0x72FC5BA4, 0x24F9, 0x4011, 0x9F, 0x3F, 0xAD, 0xD2, 0x7A, 0xFA, 0xD8, 0x18, 100);

.

    public static PropertyKey PKEY_Calendar_ShowTimeAs = new PropertyKey( 0x5BF396D4, 0x5EB2, 0x466F, 0xBD, 0xE9, 0x2F, 0xB3, 0xF2, 0x36, 0x1D, 0x6E, 100);

.

    public static PropertyKey PKEY_Calendar_ShowTimeAsText = new PropertyKey( 0x53DA57CF, 0x62C0, 0x45C4, 0x81, 0xDE, 0x76, 0x10, 0xBC, 0xEF, 0xD7, 0xF5, 100);

.

    public static PropertyKey PKEY_Document_MultimediaClipCount = new PropertyKey( 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 10);

.

    public static PropertyKey PKEY_Document_TotalEditingTime = new PropertyKey( 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 10);

.

    public static PropertyKey PKEY_Photo_ExposureTime = new PropertyKey( 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33434);

.

    public static PropertyKey PKEY_Photo_ExposureTimeDenominator = new PropertyKey( 0x55E98597, 0xAD16, 0x42E0, 0xB6, 0x24, 0x21, 0x59, 0x9A, 0x19, 0x98, 0x38, 100);

.

    public static PropertyKey PKEY_Photo_ExposureTimeNumerator = new PropertyKey( 0x257E44E2, 0x9031, 0x4323, 0xAC, 0x38, 0x85, 0xC5, 0x52, 0x87, 0x1B, 0x2E, 100);

.

    public static PropertyKey PKEY_RecordedTV_RecordingTime = new PropertyKey( 0xA5477F61, 0x7A82, 0x4ECA, 0x9D, 0xDE, 0x98, 0xB6, 0x9B, 0x24, 0x79, 0xB3, 100);

.

    public static PropertyKey PKEY_Search_GatherTime = new PropertyKey( 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 8);

.

    public static PropertyKey PKEY_Search_UrlToIndexWithModificationTime = new PropertyKey( 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 12);

.

    public static PropertyKey PKEY_DeviceDisplay_Last_Seen = new PropertyKey(0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000042);  // VT_FIELTIME

.

    public static PropertyKey PKEY_DeviceDisplay_Last_Connected = new PropertyKey(0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000043);  // VT_FILETIME

.

    public static PropertyKey PKEY_SSDP_DevLifeTime = new PropertyKey(0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001);   // VT_UI4

.

    public static PropertyKey WPD_IMAGE_EXPOSURE_TIME = new PropertyKey(0x63D64908, 0x9FA1, 0x479F, 0x85, 0xBA, 0x99, 0x52, 0x21, 0x64, 0x47, 0xDB, 7);

.

    public static PropertyKey WPD_MEDIA_LAST_ACCESSED_TIME = new PropertyKey(0x2ED8BA05, 0x0AD3, 0x42DC, 0xB0, 0xD0, 0xBC, 0x95, 0xAC, 0x39, 0x6A, 0xC8, 8);

.

    public static PropertyKey WPD_MEDIA_TIME_BOOKMARK = new PropertyKey(0x2ED8BA05, 0x0AD3, 0x42DC, 0xB0, 0xD0, 0xBC, 0x95, 0xAC, 0x39, 0x6A, 0xC8, 33);

.

    public static PropertyKey WPD_MEDIA_TIME_TO_LIVE = new PropertyKey(0x2ED8BA05, 0x0AD3, 0x42DC, 0xB0, 0xD0, 0xBC, 0x95, 0xAC, 0x39, 0x6A, 0xC8, 37);

.

    public static PropertyKey WPD_COMMON_INFORMATION_START_DATETIME = new PropertyKey(0xB28AE94B, 0x05A4, 0x4E8E, 0xBE, 0x01, 0x72, 0xCC, 0x7E, 0x09, 0x9D, 0x8F, 5);

.

    public static PropertyKey WPD_COMMON_INFORMATION_END_DATETIME = new PropertyKey(0xB28AE94B, 0x05A4, 0x4E8E, 0xBE, 0x01, 0x72, 0xCC, 0x7E, 0x09, 0x9D, 0x8F, 6);

.

    public static PropertyKey WPD_EMAIL_RECEIVED_TIME = new PropertyKey(0x41F8F65A, 0x5484, 0x4782, 0xB1, 0x3D, 0x47, 0x40, 0xDD, 0x7C, 0x37, 0xC5, 8);

.

    public static PropertyKey WPD_STILL_IMAGE_EXPOSURE_TIME = new PropertyKey(0x58C571EC, 0x1BCB, 0x42A7, 0x8A, 0xC5, 0xBB, 0x29, 0x15, 0x73, 0xA2, 0x60, 13);

.

    public static PropertyKey WPD_STILL_IMAGE_TIMELAPSE_NUMBER = new PropertyKey(0x58C571EC, 0x1BCB, 0x42A7, 0x8A, 0xC5, 0xBB, 0x29, 0x15, 0x73, 0xA2, 0x60, 25);

.

    public static PropertyKey WPD_STILL_IMAGE_TIMELAPSE_INTERVAL = new PropertyKey(0x58C571EC, 0x1BCB, 0x42A7, 0x8A, 0xC5, 0xBB, 0x29, 0x15, 0x73, 0xA2, 0x60, 26);

.

    public static PropertyKey WPD_SMS_TIMEOUT = new PropertyKey(0x7E1074CC, 0x50FF, 0x4DD1, 0xA7, 0x42, 0x53, 0xBE, 0x6F, 0x09, 0x3A, 0x0D, 3);

.

    public static PropertyKey WPD_DEVICE_DATETIME = new PropertyKey(0x26D4979A, 0xE643, 0x4626, 0x9E, 0x2B, 0x73, 0x6D, 0xC0, 0xC9, 0x2F, 0xDC, 11);

.

    public static PropertyKey SENSOR_DATA_TYPE_TIMESTAMP = new PropertyKey(0XDB5E0CF2, 0XCF1F, 0X4C18, 0XB4, 0X6C, 0XD8, 0X60, 0X11, 0XD6, 0X21, 0X50, 2); //[VT_FILETIME]

.

    public enum CalendarShowTimeAsValues

.

using System.Runtime.InteropServices;

.

    public const int ABM_SETAUTOHIDEBAR     = 0x00000008; // this can fail at any time.  MUST check the result

.

    public const int PO_REN_PORT    = 0x0034;  // PO_RENAME and PO_PORTCHANGE at same time.

.

    public const int SE_ERR_DDETIMEOUT      = 28;

.

    public const int NIN_BALLOONTIMEOUT     = (WM_USER + 4);

.

    public const int ABM_SETAUTOHIDEBAR     = 0x00000008; // this can fail at any time.  MUST check the result

.

    public const int PO_REN_PORT    = 0x0034;  // PO_RENAME and PO_PORTCHANGE at same time.

.

    public const int SE_ERR_DDETIMEOUT      = 28;

.

    public const int NIN_BALLOONTIMEOUT     = (WM_USER + 4);

.

UInt32 STATUS_TIMEOUT             = (UInt32)0x00000102L;

.

You can change the styles of a System.Windows.Forms.Control - derived class at creation time by overriding the CreateParams property and changing the Style and ExStyle properties.

.

It is documented that you should NOT use the pinvoke GetLastError() due to the fact that the runtime

.

that will record your call's ErrorCode until such time as you need to get it (although, most times, subsequent calls

.

using System.Runtime;

.

using System.Runtime.InteropServices;

.

        /// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.

.

        /// The system cannot start another process at this time.

.

        /// Cannot request exclusive semaphores at interrupt time.

.

        public const int ERROR_INVALID_AT_INTERRUPT_TIME = 104;

.

        /// The semaphore timeout period has expired.

.

        public const int ERROR_SEM_TIMEOUT = 121;

.

        /// The system cannot perform a JOIN or SUBST at this time.

.

        /// The path specified cannot be used at this time.

.

        /// The wait operation timed out.

.

        public const int WAIT_TIMEOUT = 258;

.

        /// The service did not respond to the start or control request in a timely fashion.

.

        public const int ERROR_SERVICE_REQUEST_TIMEOUT = 1053;

.

        /// The service cannot accept control messages at this time.

.

        /// A serial I/O operation completed because the timeout period expired.

.

        public const int ERROR_COUNTER_TIMEOUT = 1121;

.

        /// Attempting to log in during an unauthorized time of day for this account.

.

        public const int ERROR_LOGIN_TIME_RESTRICTION = 1239;

.

        /// Logon failure: account logon time restriction violation.

.

        /// Too many local user identifiers (LUIDs) were requested at one time.

.

        /// No more connections can be made to the service at this time because there are already as many connections as the service can accept.

.

        /// There is a time and/or date difference between the client and server.

.

        public const int ERROR_TIME_SKEW = 1398;

.

        /// This operation returned because the timeout period expired.

.

        public const int ERROR_TIMEOUT = 1460;

.

        /// The timeout value is invalid.

.

        public const int RPC_S_INVALID_TIMEOUT = 1709;

.

        /// The specified time is invalid.

.

        public const int ERROR_INVALID_TIME = 1901;

.

        /// The user's password must be changed before logging on the first time.

.

        /// The remote storage service is not operational at this time.

.

        /// The properties were stored but not all changes will take effect until the next time the resource is brought online.

.

        public const int ERROR_CTX_MODEM_RESPONSE_TIMEOUT = 7012;

.

        /// Dial tone not detected within the required time. Verify that the phone cable is properly attached and functional.

.

        public const int ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040;

.

        /// The file replication service cannot populate the system volume because of an internal timeout.

.

        public const int FRS_ERR_SYSVOL_POPULATE_TIMEOUT = 8014;

.

        /// The time limit for this request was exceeded.

.

        public const int ERROR_DS_TIMELIMIT_EXCEEDED = 8226;

.

        /// The directory service is too busy to complete the replication operation at this time.

.

        public const int ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614;

.

        public const int DNS_ERROR_RCODE_BADTIME = 9018;

.

        /// DNS record timed out.

.

        public const int DNS_ERROR_RECORD_TIMED_OUT = 9705;

.

        /// A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

.

        public const int WSAETIMEDOUT = 10060;

.

        /// WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.

.

        /// Negotiation timed out

.

        public const int ERROR_IPSEC_IKE_TIMED_OUT = 13805;

.

        /// The lifetime value received in the Responder Lifetime Notify is below the Windows 2000 configured minimum value.  Please fix the policy on the peer machine.

.

        public const int ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = 13879;

.

        /// There was an attempt to call CoInitialize a second time while single threaded

.

        public const int CO_E_SERVER_START_TIMEOUT = (int)(0x8000401E - 0x100000000);

.

        /// The common language runtime is not available

.

        /// The server started, but did not finish initializing in a timely fashion.

.

        public const int CO_E_SERVER_INIT_TIMEOUT = (int)(0x8000402A - 0x100000000);

.

        /// A time-out was specified, but time-outs are not supported.

.

        public const int XACT_E_NOTIMEOUT = (int)(0x8004D017 - 0x100000000);

.

        /// Resource manager reenlistment to determine transaction status timed out.

.

        public const int XACT_E_REENLISTTIMEOUT = (int)(0x8004D01E - 0x100000000);

.

        /// The component is configured to use synchronization and a thread has timed out waiting to enter the context.

.

        public const int CONTEXT_E_SYNCH_TIMEOUT = (int)(0x8004E006 - 0x100000000);

.

        /// COM+ activation failed because the activation could not be completed in the specified amount of time.

.

        public const int CO_E_ACTIVATIONFAILED_TIMEOUT = (int)(0x8004E024 - 0x100000000);

.

        /// The task is ready to run at its next scheduled time.

.

        /// The task will not run at the scheduled times because it has been disabled.

.

        /// Event triggers don't have set run times.

.

        /// The task has been configured with an unsupported combination of account settings and run time options.

.

        public const int RPC_S_WAITONTIMER = (int)(0x80010116 - 0x100000000);

.

        /// This operation returned because the timeout period expired.

.

        public const int RPC_E_TIMEOUT = (int)(0x8001011F - 0x100000000);

.

        public const int SEC_E_TIME_SKEW = (int)(0x80090324 - 0x100000000);

.

        /// See asn1code.h for a definition of the OSS runtime errors. The OSS

.

        public const int OSS_BAD_TIME = (int)(0x8009300C - 0x100000000);

.

        /// The timestamp signature and/or certificate could not be verified or is malformed.

.

        public const int TRUST_E_TIME_STAMP = (int)(0x80096005 - 0x100000000);

.

        /// A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.

.

        /// The machine selected for remote communication is not available at this time.

.

        /// An internal consistency timer has expired.

.

        /// The user-specified timeout value has expired.

.

        public const int SCARD_E_TIMEOUT = (int)(0x8010000A - 0x100000000);

27: WM
.
WM_COMPACTING 0x41 The WM_COMPACTING message is sent to all top-level windows when the system detects more than 12.5 percent of system time over a 30- to 60-second interval is being spent compacting memory. This indicates that system memory is low.
.
WM_ENTERSIZEMOVE 0x231 The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
.
WM_EXITSIZEMOVE 0x232 The WM_EXITSIZEMOVE message is sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns.
.
WM_MOUSEHOVER 0x2A1 The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call to TrackMouseEvent.
.
WM_NCMOUSEHOVER 0x2A0 The WM_NCMOUSEHOVER message is posted to a window when the cursor hovers over the nonclient area of the window for the period of time specified in a prior call to TrackMouseEvent.
.
WM_TIMECHANGE 0x1E A message that is sent whenever there is a change in the system time.
.
WM_TIMER 0x113 The WM_TIMER message is posted to the installing thread's message queue when a timer expires. The message is posted by the GetMessage or PeekMessage function.
.

private const UInt32 WM_TIMECHANGE         = 0x001E;

.

private const UInt32 WM_TIMER          = 0x0113;

.

   WM_TIMECHANGE = &H1E

.

   WM_TIMER = &H113

.

WM_TIMECHANGE         equ 01Eh

.

WM_TIMER          equ 113h

shell32

.

using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

    using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

Imports System.Runtime.InteropServices

.

using System.Runtime.InteropServices;

.
Summary
Describes the event that has occurred. Typically, only one event is specified at a time. If more than one event is specified, the values contained in the dwItem1 and dwItem2 parameters must be the same, respectively, for all specified events. This parameter can be one or more of the following values.
.

    /// Typically, only one event is specified at a time.

.

    /// operation that has been completed at the time the method is called.</param>

.

Imports System.Timers

.

Imports System.Runtime.InteropServices

.

    Dim PosfixTimer As New System.Timers.Timer

.

    <DllImport("User32.dll", ExactSpelling:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

using System.Runtime.InteropServices;

.

Imports System.Runtime.InteropServices

.

info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info)

.

     Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())

.

    info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);

.

   Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error())

.

I tried to use this to send files to the recycle bin. It failed (Marshal.GetLastWin32Error was 6, invalid handle) and sometimes threw a NullReferenceException. To make it work I did the following;

.

using System.Runtime.InteropServices;

.

    using System.Runtime.InteropServices;

.

    string s = System.Runtime.InteropServices.Marshal.PtrToStringUni( pPath );

.

    System.Runtime.InteropServices.Marshal.FreeCoTaskMem( pPath );

.

<System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHGetNameFromIDList")> _

.

   <System.Runtime.InteropServices.InAttribute()> _

.

Imports System.Runtime.InteropServices

.

    <System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="ILFree")> _

.

    Private Shared Sub ILFree(<System.Runtime.InteropServices.InAttribute()> ByVal pidl As System.IntPtr)

.

    <System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHGetNameFromIDList")> _

.

   <System.Runtime.InteropServices.InAttribute()> _

.

    <System.Runtime.InteropServices.DllImportAttribute("shell32.dll", EntryPoint:="SHParseDisplayName")> _

.

<System.Runtime.InteropServices.InAttribute(), _

.

System.Runtime.InteropServices.MarshalAsAttribute( _

.

System.Runtime.InteropServices.UnmanagedType.LPWStr)> _

.

ByVal pszName As String, <System.Runtime.InteropServices.InAttribute()> _

.

However not all of the enums are available (e.g. CSIDL_COMMON_DOCUMENTS missing on .NET 1.1) therefore this is needed sometimes.

.

  Imports System.Runtime.InteropServices

.

     QUNS_QUIET_TIME = 6

.

        /// Introduced in Windows 7. The current user is in "quiet time", which is the first hour after

.

        /// a new user logs into his or her account for the first time. During this time, most notifications

.

        /// Quiet time also occurs for each user after an operating system upgrade or clean installation.

.

        QuietTime = 6

.

Use the Documented IShellDispatch->Run(), but this can be a pain in C# if you are pressed for time.

secur32

.

                    out SECURITY_INTEGER ptsTimeStamp);

.

    ref SECURITY_INTEGER ptsExpiry); //PTimeStamp //TimeStamp ref

.

    out SECURITY_INTEGER ptsExpiry); //PTimeStamp

.

using System.Runtime.InteropServices;

.

    ref SECURITY_INTEGER ptsExpiry); //PTimeStamp //TimeStamp ref

.

    out SECURITY_INTEGER ptsExpiry); //PTimeStamp

.

            out SECURITY_INTEGER ptsExpiry); //PTimeStamp

.

                                                out SECURITY_INTEGER ptsTimeStamp);

.

                                                out SECURITY_INTEGER ptsTimeStamp);

.

            SECURITY_INTEGER ClientLifeTime = new SECURITY_INTEGER(0);            

.

                                            ref _hOutboundCred,ref ClientLifeTime) != SEC_E_OK)

.

                        IntPtr.Zero,    //Always zero first time around...

.

                        out ClientLifeTime); //ref IntPtr ptsExpiry ); //PTimeStamp

.

                            ref ServerToken,    //Always zero first time around...

.

                            out ClientLifeTime); //ref IntPtr ptsExpiry ); //PTimeStamp

.

            SECURITY_INTEGER NewLifeTime = new SECURITY_INTEGER(0);

.

                                            ref _hInboundCred,ref NewLifeTime) != SEC_E_OK)

.

                        IntPtr.Zero,                // [in/out] handle of partially formed context.  Always NULL the first time through

.

                        out NewLifeTime);        // [out] receives the life span of the security context

.

                        ref _hServerContext,                // [in/out] handle of partially formed context.  Always NULL the first time through

.

                        out NewLifeTime);        // [out] receives the life span of the security context

.

    public UInt64 LoginTime;

.

DateTime systime = new DateTime(1601, 1, 1, 0, 0, 0, 0); //win32 systemdate

.

      DateTime time = systime.AddTicks((long)data.LoginTime);                  //get the datetime the session was logged in

.

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

.

using System.Runtime.InteropServices;

.

                    Int64 TimeLimit;

user32

.

- The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo).

.

static extern bool AnimateWindow(IntPtr hwnd, int time, AnimateWindowFlags flags);

.

Imports System.Runtime.InteropServices

.

Shared Function AnimateWindow(ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean

.

[System.Runtime.InteropServices.DllImport("user32.dll")]

.

by using the 3 clipboard API's below first it work every time and you don't have to

.

CopyCursor reference will fail at runtime, according to documentation it is a macro:

.

    SetCaretBlinkTime(300)

.

If you come across this error "System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #6': Invalid managed/unmanaged type combination (this value type must be paired with Struct).", you may want to use

.

        [System.Runtime.InteropServices.ComRegisterFunctionAttribute()]

.

        [System.Runtime.InteropServices.ComUnregisterFunctionAttribute()]

.

I sometimes get error 1407 ("Cannot find window class.") when trying to create the window (after a successful call to RegisterClass)

.

using System.Runtime.InteropServices;

.

   IntPtr hConv, IntPtr hszItem, uint wFmt, uint wType, uint dwTimeout,

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


 
Access PInvoke.net directly from VS: