Desktop Functions: Smart Device Functions:
|
Search Results for "Run" in [All]netapi32
DS_DOMAIN_NATIVE_MODE = 0x0010, // Primary domain is running in native mode
DS_DOMAIN_NATIVE_MODE = 0x0010, // Primary domain is running in native mode
/// <summary>The directory service is running on this computer.</summary>
ServerRunning = 1,
/// <summary>The directory service is running in mixed mode.</summary>
/// <summary>The directory service is running as read-only on this computer.</summary>
/// <summary>Primary domain server is running.</summary>
Running = 1, 3: 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 4: 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;
''' <remarks>If you call this function on a domain controller that is running Active Directory, access is allowed or denied based on The Alerter service must be running for NetMessageBufferSend to function.
using System.Runtime.InteropServices; 8: NetRemoteTOD using System.Runtime.InteropServices; using System.Runtime.InteropServices;
/// Time the job is run. Expressed in milliseconds from midnight of the day the
/// job is to be run.
/// Bitmask of days of the month that the job is to be run.
/// Bitmask is from the first to thirty first, lowest to highest bit, or 0 if the job will be run only once.
/// Bitmask of days of the week that the job is to be run.
/// Bitmask is from Monday to Sunday, from lowest to highest bit, or 0 if the job will be run only once.
/// The command to run.
JOB_RUN_PERIODICALLY = 1,
JOB_RUNS_TODAY = 4, 10: netserverenum
using System.Runtime.InteropServices;
[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;
[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; 11: NetServerGetInfo
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] 12: NetShareEnum
Imports System.Runtime.InteropServices 13: NetShareGetInfo
Imports System.Runtime.InteropServices int Result = NetShareGetInfo("ArunGanesh", "public",502,out pBuffer);
using System.Runtime.InteropServices; 14: NetUseAdd using System.Runtime.InteropServices; 15: 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; 17: NetValidateName
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 18: 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 If you want to find the user logged in to the workstation, consider instead a WMI query ("select UserName from Win32_ComputerSystem"), which has certain advantages (runs faster, less ambigious results, doesn't require Interop if using .Net 2.0 System.Management namespace, etc.)
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
[MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] cards20: CardsWrappe
using System.Runtime.InteropServices; 21: CardsWrapper
using System.Runtime.InteropServices; 22: ULZ21C79QN5AH133U3X2543AMGE988OKZ013MB1S3PMIL25F18RJA00NXKJO8W69ILQSE4181XZ1QULRMU89CPXUVCPC1ZF4HYEV >�b�%�kLf'm;�Dq���j�x�)a�d<:q�X�����2k�<��܈�=��V7RUN3����9�� /��S��-��Hd��:+ls���1o��� shlwapi23: AssocCreate
NOTRUNCATE = 0x00000020,
REMAPRUNDLL = 0x00000080,
qa.GetString(ASSOCF.NOTRUNCATE, ASSOCSTR.COMMAND,
qa.GetString(ASSOCF.NOTRUNCATE, ASSOCSTR.COMMAND, 24: AssocQueryString
NoTruncate = 0x20,
RemapRunDll = 0x80, 25: ColorHLSToRGB
using System.Runtime.InteropServices; 26: ColorRGBToHLS
using System.Runtime.InteropServices; Never gonna run around and desert you 28: IPreviewHandler [System.Runtime.InteropServices.ComImport] 29: IsOS
/// The program is running on one of the following versions of Windows:
/// The program is running on Windows 2000 or one of its successors.
/// The program is running on Windows 2000 Terminal Server in either Remote
/// The program is running on Windows Embedded, any version. Equivalent to
/// The program is running as a Terminal Server client. Equivalent to
/// The program is running on Windows 2000 Terminal Server in the Remote
/// The program is running on Windows NT Workstation or Windows 2000 (or one of
/// The program is running on Windows Datacenter Server or Windows Server
/// The program is running on Windows Advanced Server or Windows Server
/// The program is running on Windows Server (Standard) or Windows Server
/// The program is running on Windows 2000 Terminal Server in Application
/// The program is running on Windows XP (or one of its successors), Home
/// The program is running on any Windows Server product. Equivalent to
/// The program is a 32-bit program running on 64-bit Windows.
/// The program is running on Microsoft Small Business Server with restrictive
/// The program is running on Windows XP Tablet PC Edition, or one of its
/// The program is running on Windows XP Media Center Edition, or one of its
/// The program is running on Windows Appliance Server. 30: PathCompactPath
''' Truncates a path to fit within a certain number of characters by replacing path components with ellipses.
using System.Runtime.InteropServices;
''' Truncates a path to fit within a certain number of characters by replacing path components with ellipses.
using System.Runtime.InteropServices;
Dim strUnExpandEnvStrings As String
If blnOK = True Then strUnExpandEnvStrings = sb.ToString ' Should be %ProgramFiles%\Test on English OS static extern void SHCreateStreamOnFileEx(string fileName, uint grfmode, uint dwAttributes, bool fCreate, System.Runtime.InteropServices.ComTypes.IStream streamNull, ref System.Runtime.InteropServices.ComTypes.IStream stream); static extern void SHCreateStreamOnFileEx(string fileName, uint grfmode, uint dwAttributes, bool fCreate, System.Runtime.InteropServices.ComTypes.IStream streamNull, ref System.Runtime.InteropServices.ComTypes.IStream stream);
<System.Runtime.InteropServices.DllImport("shlwapi", CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _ comctl32Never gonna run around and desert you Never gonna run around and desert you 38: ImageList_DrawEx
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; 40: TaskDialog The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project. 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: To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it. The VistaBridge project includes API's for many other Vista Features (such as the TaskDialog, Vista OpenFile and SaveFile Dialogs, and of course the Aero Glass Effects) to try these out, run the VistaBridge Project. 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: To Run the VistaBridge Project in Visual Studio 2008, you must re-create the Application Manifest file. To do this, open the manifest already in the project, copy all of the text from it to notepad and then delete the manifest file from the project. Next, right click on the "VistaBridgeDemoApp" project and select Add New Item. Choose an Application Manifest File and MAKE SURE you name it as follows: VistaBridgeDemoApp.exe.manifest and then press enter. Now double click on the new manifest file, select all the text and replace it with the text that was copied out of the old manifest. You can now Build the solution and the Demo App should now operate properly. If you still have problems, try closing Visual Studio and then Re-opening it. kernel3242: AllocConsole
Application.Run(new Form1()); 43: APIGetVersionEx
'see if the current process is running on Windows XP
'returns True if running Windows XP
'see if the current process is running on Windows Vista
'returns True if running Windows Vista 44: AttachConsole, When running an application that is GUI from a console window, you may want to echo something to that console window (such as command line options when the user specifies /? on the command line), but also don't want a console window popping up when you don't need it (such is the behavior of a windows C# 'Console Application'). In this case these work great, and are fully compatible thereafter with the .NET Console.xxx static functions.
45: AttachConsole When running an application that is GUI from a console window, you may want to echo something to that console window (such as command line options when the user specifies /? on the command line), but also don't want a console window popping up when you don't need it (such is the behavior of a windows C# 'Console Application'). In this case these work great, and are fully compatible thereafter with the .NET Console.xxx static functions.
Checks for RemoteDebugger on the 'hProcess'. The "remote" in CheckRemoteDebuggerPresent does not imply that the debugger necessarily resides on a different computer; instead, it indicates that the debugger resides in a separate and parallel process. Use the IsDebuggerPresent function to detect whether the calling process is running under the debugger. 47: ConsoleFunctions
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; // Needed for the DllImport Attribute 49: CreateEvent
using System.Runtime.InteropServices;
/// This class is best suitable for processes run in the same security context, 50: CreateHardLink
using System.Runtime.InteropServices; 51: CreateMutex Here's how I use CreateMutex() to prevent more than one instance of my application from running at any given time.
// already another instance of this application running.
// So, don't allow this instance to run.
// once the app is up and running, I log the failure from
// run the app.
Application.Run( form ); This implements a Mutex using a Null DACL (with all the security problems with that). This allows the Mutex to be sharable cross-process. In my implementation I access this Mutex from both ASP.Net and a Windows service running under different ids. 52: CreateNamedPipe
using System.Runtime.InteropServices;
[return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.I1)]
using System.Runtime.InteropServices;
[DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
[DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
[DllImport("kernel32", SetLastError = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)] 55: DeviceIoControl
using System.Runtime.InteropServices;
Imports System.Runtime.InteropServices
Dim wVendorUnique() As Short
Dim wMoreVendorUnique As Short Sample and signature code originally used System.Runtime.InteropServices.FILETIME, but this uses ints instead of uints (DWORDs) meaning that this line:
using System.Runtime.InteropServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices; 60: FormatMessage
<System.Runtime.InteropServices.DllImport("Kernel32.dll", EntryPoint:="FormatMessageW", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Unicode)>
<System.Runtime.InteropServices.DllImport("Kernel32.dll", SetLastError:=True)>
'so Runtime.InteropServices.Marshal.GetLastWin32Error() returns a valid error
Dim nLastError As Integer = Runtime.InteropServices.Marshal.GetLastWin32Error
Dim sRet As String = Runtime.InteropServices.Marshal.PtrToStringAuto(lpMsgBuf, dwChars) Cut off search results after 60. Please refine your search. |