Desktop Functions: Smart Device Functions:
|
Search Results for "time" in [All]misc1: Comments Please note that this page has now been superseded by the Support Forum - this page has been left here for the time being to avoid losing historical comments, but all new comments should be posted here: http://www.red-gate.com/MessageBoard/viewforum.php?f=62 There is also IE (6.0.2800.1106.xpsp2) bug: clicking "Edit This Page" brings up error message "A runtime error has occurred... Line: 15 Error: 'ButtonBar' is undefined". Harmless but annoying.
Thank you very much, I've been waiting for something like this for a long time now. 2: FAQ
using System.Runtime.InteropServices; Hi, would tapi32.dll functions be available anytime? - Ashish I'd love to see all the Platform SDK headers added as HTML pages that could then be searched. Much of the time spent making a function call work is looking for the correct value of a constant or #DEFINE in a header file somewhere. query4: lorem37 Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. Constants
public static Guid KSCATEGORY_REALTIME = new Guid("EB115FFC-10C8-4964-831D-6DCB02E6F23F"); 6: LOCALE_
public const int LOCALE_STIME = 0x0000001E;
public const int LOCALE_STIMEFORMAT = 0x00001003;
public const int LOCALE_ITIME = 0x00000023;
public const int LOCALE_ITIMEMARKPOSN = 0x00001005; 7: 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 8: MAPI
/// The message identifiers returned should be in the order of time received. 9: 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; 10: PROPERTYKEY
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; 12: ShellAPI
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); 13: ShellAPI
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); 14: STATUS_
UInt32 STATUS_TIMEOUT = (UInt32)0x00000102L; 15: Window styles 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. 16: WINERROR 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); 17: WM
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 printui18: lorem37 Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. oleacc
if ( SendMessageTimeout(hWnd, nMsg, UIntPtr.Zero, IntPtr.Zero,
SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lRes) == IntPtr.Zero ) creduiTo determine required buffer size, call first with pPackedCredentials = IntPtr.Zero. Should return error code 160, but pcbPackedCredentials will be populated with the expected buffer size. Use Marshal.AllocCoTaskMem() to allocate the appropriate buffer, then call again, this time passing the allocated buffer.
<System.Runtime.InteropServices.DllImport("credui.dll", EntryPoint:="CredUIPromptForWindowsCredentials", CharSet:=CharSet.Unicode)> <CLSCompliant(False)> _
else errorcode = 1326; //Else display an error message inside the dialog next time (The errorcodes are defined in 'winerror.h') comdlg3222: PrintDlg
Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _ 23: PrintDlgEx
Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1), System.Runtime.InteropServices.ComVisible(False)> _ dtl24: DTL_C_DEFINE
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout); 25: DTL_DRIVER_CLOSE
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
Dtl.DtlDriverClose(_driverId, TimeoutInMs); 26: DTL_DRIVER_OPEN
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
protected void OpenDriver(string driverName, int timeoutFactor)
dtlSts = Dtl.DtlDriverOpen(_driverId, _driverName, _timeoutFactor * 3); 27: DTL_ERROR_S
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout); 28: DTL_INIT
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
protected void OpenDriver(string driverName, int timeoutFactor)
dtlSts = Dtl.DtlDriverOpen(_driverId, _driverName, _timeoutFactor * 3); 29: DTL_READ_W
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
dtlSts = Dtl.DtlReadW(_nameId, _rawData, ref ioStat, TimeoutInMs); 30: DTL_UNDEF
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout); 31: DTL_UNINIT
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout); 32: DTL_WRITE_W
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
/// <param name="timeOut">time out in milliseconds</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlDriverOpen(int driverId, string driverName, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_OPEN(driverId, driverName, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlReadW(int nameId, byte[] readData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_READ_W(nameId, readData, ref ioStat, timeOut));
/// <param name="timeOut">timeout in milliseconds</param>
public static int DtlWriteW(int nameId, byte[] writeData, ref uint ioStat, int timeOut)
return (UnsafeNativeMethods.DTL_WRITE_W(nameId, writeData, ref ioStat, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
static extern public int DTL_DRIVER_OPEN(int driver_id, string szDriverName, int timeout);
static extern public int DTL_READ_W(int name_id, byte[] data, ref uint iostat, int timeout);
static extern public int DTL_WRITE_W(int name_id, byte[] data, ref uint iostat, int timeout);
dtlSts = Dtl.DtlReadW(_nameId, currentData, ref readIoStat, TimeoutInMs);
dtlSts = Dtl.DtlWriteW(_nameId, currentData, ref writeIoStat, TimeoutInMs);
dtlSts = Dtl.DtlReadW(_nameId, readBackData, ref readIoStat, TimeoutInMs); powrprof
private const int PBT_APMRESUMEAUTOMATIC = 18; // (0x12) - Operation is resuming automatically from a low-power state.This message is sent every time the system resumes.
Console.WriteLine("\tOperation is resuming automatically from a low-power state.This message is sent every time the system resumes."); 34: SetSuspendState
using System.Runtime.InteropServices; netapi3235: DsGetDcName
DS_TIMESERV_REQUIRED = 0x00000800,
DS_GOOD_TIMESERV_PREFERRED = 0x00002000, 36: NetDfsAdd Declare Function NetDfsAdd Lib "NETAPI32.DLL" (<Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal DfsEntryPath As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal ServerName As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal ShareName As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> ByVal Comment As String, ByVal Flags As Uint32) As Long 37: NetDfsRemove
Declare Function NetDfsRemove Lib "NETAPI32.DLL" (<Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> _
ByVal DfsEntryPath As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> _
ByVal ServerName As String, <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.LPWStr)> _
Imports System.Runtime.InteropServices
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; Add 'private const uint MAX_PREFERRED_LENGTH = 4294967294;' to the defines and request 100 records at a time thus:
uint reqRecs = 100; // Number of records to get (Win2K+ only allows 100 at a time) 42: NetRemoteTOD using System.Runtime.InteropServices;
public struct structTIME_OF_DAY_INFO
public int itod_timezone;
structTIME_OF_DAY_INFO result = new structTIME_OF_DAY_INFO();
// Get the time of day.
result = (structTIME_OF_DAY_INFO)Marshal.PtrToStructure(pintBuffer, typeof(structTIME_OF_DAY_INFO));
TOD_INFO[6] = result.itod_timezone; using System.Runtime.InteropServices;
Console.Write("\r\nDate/Time from {0} : {1}.{2}.{3} {4}:{5}:{6} TZ = {7}\r\n", If you need to get the time from a domain controller:
Console.WriteLine(c.CurrentTime);
/// Time the job is run. Expressed in milliseconds from midnight of the day the
public uint JobTime; 44: netserverenum
using System.Runtime.InteropServices;
TimeSource= 0x00000020,
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
namespace System.Runtime.InteropServices
using System.Runtime.InteropServices;
SV_TYPE_TIME_SOURCE= 0x00000020,
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_version_major;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_version_minor;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)] public UInt32 sv101_type;
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public string sv101_comment; 45: NetServerGetInfo
TimeSource= 0x00000020,
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] 46: NetSessionEnum
''' <item>10 - Return the name of the computer, name of the user, and active and idle times for the session. The bufptr parameter points to an array of SESSION_INFO_10 structures. </item>
public uint sesi502_time;
public uint sesi502_idle_time;
/// Unable to contact resource. Connection timed out.
Public sesi502_time As UInt32
Public sesi502_idle_time As UInt32 47: NetShareEnum
Imports System.Runtime.InteropServices 48: NetShareGetInfo
Imports System.Runtime.InteropServices
using System.Runtime.InteropServices; 49: NetStatisticsGet
// I found the following at http://www.codeproject.com/KB/cs/GetLastRebootTime.aspx by Gautham Jayaraman
DateTime aRebootTime = DateTime.FromFileTime(wks.StatisticsStartTime);
System.Console.WriteLine(aRebootTime); 50: NetUseAdd using System.Runtime.InteropServices; 51: NetUserGetInfo Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices.UnmanagedType Imports System.Runtime.InteropServices.Marshal Imports System.Runtime.InteropServices.StructLayoutAttribute
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 53: NetValidateName
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 54: NetWkstaUserEnum Shared Function NetWkstaUserEnum(ByVal servername As String, ByVal level As Integer, <System.Runtime.InteropServices.Out()> ByRef bufptr As IntPtr, ByVal prefmaxlen As Integer, <System.Runtime.InteropServices.Out()> ByRef entriesread As Integer, <System.Runtime.InteropServices.Out()> ByRef totalentries As Integer, ByRef resume_handle As Integer) As Integer
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
public Int64 StatisticsStartTime; comctl3257: ImageList_DrawEx
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 59: TaskDialog 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: Cut off search results after 60. Please refine your search. |