Desktop Functions: Smart Device Functions:
|
Search Results for "time" in [All]ole321: CoCancelCall
static extern void CoCancelCall(uint dwThreadID, uint ulTimeout);
static extern void CoFileTimeNow(out FILETIME time); FILETIME, which is defined in [System.Runtime.InteropServices] or [System.Runtime.InteropServices.ComTypes] in the .NET Framework 2.0. You cannot define FILETIME as the return type, because the marshaler does not support it. [System.DateTime.Now]
static extern bool CoFileTimeToDosDateTime(
[In] ref FILETIME lpFileTime,
out ushort lpDosTime); FILETIME, which is defined in [System.Runtime.InteropServices] or [System.Runtime.InteropServices.ComTypes] in the .NET Framework 2.0.
unloadDelay - The delay in milliseconds between the time that the DLL
unloadDelay - The delay in milliseconds between the time that the DLL 7: CoInitialize
[System.Runtime.InteropServices.DllImport("ole32.dll")]
[System.Runtime.InteropServices.DllImport("ole32.dll")] 10: CoTaskMemFree Marshal.FreeCoTaskMem http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.freecotaskmem.aspx
static extern int CoUnmarshalInterface(System.Runtime.InteropServices.ComTypes.IStream pStm, [In] ref Guid riid,
static extern int CoWaitForMultipleHandles(uint dwFlags, uint dwTimeout, The managed definition for the IMoniker interface is available in System.Runtime.InteropServices.ComTypes As of .NET 2.0, UCOMIMoniker is obsolete and has been replaced with System.Runtime.InteropServices.ComTypes.IMoniker. This extends to all interfaces of the System.Runtime.InteropServices namespace starting with "UCOM...". Each of them are replaced in the System.Runtime.InteropServices.ComTypes namespace, with same name, except for the "UCOM" at the beginning.
out System.Runtime.InteropServices.ComTypes.IMoniker ppmk); For .Net 2.0, use System.Runtime.InteropServices.ComTypes.IMoniker as the final parameter; frameworks 1.0 and 1.1 use System.Runtime.InteropServices.UCOMIMoniker. As of .NET 2.0, UCOMIMoniker is obsolete and has been replaced with System.Runtime.InteropServices.ComTypes.IMoniker. This extends to all interfaces of the System.Runtime.InteropServices namespace starting with "UCOM...". Each of them are replaced in the System.Runtime.InteropServices.ComTypes namespace, with same name, except for the "UCOM" at the beginning.
punk, out System.Runtime.InteropServices.ComTypes.IMoniker ppmk);
[System.Runtime.InteropServices.DllImport("OLE32.DLL", EntryPoint = "CreateStreamOnHGlobal")] // Create a COM stream from a pointer in unmanaged memory
extern public static int CreateStreamOnHGlobal(IntPtr ptr, bool delete, out System.Runtime.InteropServices.ComTypes.IStream pOutStm);
[System.Runtime.InteropServices.DllImport("OLE32.DLL", EntryPoint = "GetHGlobalFromStream")]
out System.Runtime.InteropServices.ComTypes.IRunningObjectTable pprot); In .Net 2.0 use System.Runtime.InteropServices.ComTypes.IRunningObjectTabl as the second parameter. Frameworks 1.0 and 1.1 use a now deprecated type.
System.Runtime.InteropServices.ComTypes.IRunningObjectTable objTbl; 20: IIDFromString I find it better to turn off [PreserveSig] for methods that return an HRESULT and have a trailing out parameter, providing that the HRESULT does not have more that one success code (typically S_OK only). This results in a slightly cleaner syntax where the out parameter becomes the return value and a failing HRESULT results in an exception.
using System.Runtime.Interop; 21: OleCreate using System.Runtime.InteropServices; 22: OleGetClipboard I find it better to turn off [PreserveSig] for methods that return an HRESULT and have a trailing out parameter, providing that the HRESULT does not have more that one success code (typically S_OK only). This results in a slightly cleaner syntax where the out parameter becomes the return value and a failing HRESULT results in an exception.
using System.Runtime.Interop; 23: OleLoad
static extern int OleLoadFromStream(System.Runtime.InteropServices.ComTypes.IStream pStm,
static extern int OleLoadFromStream(System.Runtime.InteropServices.ComTypes.IStream pStm, 25: OleSave
[System.Runtime.InteropServices.DllImport("OLE32.DLL", EntryPoint = "CreateStreamOnHGlobal")]
extern public static int CreateStreamOnHGlobal(IntPtr ptr, bool delete, out System.Runtime.InteropServices.ComTypes.IStream pOutStm);
System.Runtime.InteropServices.ComTypes.STATSTG fileinfo; 26: OleSaveToStream
[System.Runtime.InteropServices.DllImport("OLE32.DLL", EntryPoint = "CreateStreamOnHGlobal")]
extern public static int CreateStreamOnHGlobal(IntPtr ptr, bool delete, out System.Runtime.InteropServices.ComTypes.IStream pOutStm);
System.Runtime.InteropServices.ComTypes.STATSTG fileinfo; 27: OleSetClipboard
Public Shared Function OleSetClipboard(ByVal pDataObj As System.Runtime.InteropServices.ComTypes.IDataObject) As Int32 28: ProgIDFromCLSID I find it better to turn off [PreserveSig] for methods that return an HRESULT and have a trailing out parameter, providing that the HRESULT does not have more that one success code (typically S_OK only). This results in a slightly cleaner syntax where the out parameter becomes the return value and a failing HRESULT results in an exception.
using System.Runtime.Interop; 29: StgSetTimes uxthemeThe System.Windows.Forms.VisualStyles namespace allows rendering of various Visual Style elements, which sometimes can be cumbersome if you have alot of elements to work with or just want to keep the code to a minimal (or are on the design team and not the code team). Or you can get the freeware .NET component to place VisualStyleElement parts in the IDE forms designer using the VisualStyleRenderer .NET control. You can winhttp
/// <returns>If the function succeeds, the function returns <c>true</c>. If the function fails, it returns <c>false</c>. For extended error data, call <see cref="System.Runtime.InteropServices.Marshal.GetLastWin32Error"/>.</returns>
static extern bool WinHttpSetTimeouts(
int dwResolveTimeout,
int dwConnectTimeout,
int dwSendTimeout,
int dwReceiveTimeout
Declare Function WinHttpSetTimeouts Lib "winhttp.dll" (ByVal hInternet As IntPtr, ByVal dwResolveTimeout As Integer, ByVal dwConnectTimeout As Integer, ByVal dwSendTimeout As Integer, ByVal dwReceiveTimeout As Integer) As Boolean netapi3233: DsGetDcName
DS_TIMESERV_REQUIRED = 0x00000800,
DS_GOOD_TIMESERV_PREFERRED = 0x00002000, 34: 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 35: 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) 40: 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; 42: 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; 43: NetServerGetInfo
TimeSource= 0x00000020,
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] 44: 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 45: NetShareEnum
Imports System.Runtime.InteropServices 46: NetShareGetInfo
Imports System.Runtime.InteropServices
using System.Runtime.InteropServices; 47: 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); 48: NetUseAdd using System.Runtime.InteropServices; 49: 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; 51: NetValidateName
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 52: 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; user32- The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). 56: AnimateWindow
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 57: ClipCursor
[System.Runtime.InteropServices.DllImport("user32.dll")] 58: CloseClipboard by using the 3 clipboard API's below first it work every time and you don't have to 59: CopyIcon CopyCursor reference will fail at runtime, according to documentation it is a macro: 60: CreateCaret
SetCaretBlinkTime(300) Cut off search results after 60. Please refine your search. |