Desktop Functions: Smart Device Functions:
|
Search Results for "rect" in [All]odbc32
/// <param name="Direction">[Input] Determines which data source the Driver Manager returns information on.</param>
static extern short SQLDataSources(IntPtr EnvironmentHandle, short Direction,
Declare Function SQLDataSources Lib "odbc32.dll" (ByVal EnvironmentHandle As Integer, ByVal Direction As Short, _ Depending on the value of Direction, you may access System DSN, User DSN or both. Since the same DSN name may be used in User and System DSN, watch out for possible duplicate values.
static extern short SQLExecDirect (int statementHandle,
Private Shared Function SQLExecDirect(ByVal statementHandle As IntPtr, ByVal statementText As String, _ winmm3: MIDIOUTCAPS
private const uint MIDICAPS_STREAM = 8; // driver supports midiStreamOut directly 4: timeGetTime Unlike Environment.TickCount, you can directly set the resolution of this timer with the TimeBeginPeriod function. 5: waveInOpen
WAVE_FORMAT_DIRECT = 8
WAVE_FORMAT_DIRECT = 8
WAVE_FORMAT_DIRECT = 8 Use "Auto" in the Declare statement to have the correct character set selected automatically. 8: waveOutOpen See http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/thread/14926e01-635e-4360-998b-ec6124d888a7 - correct C# signature at the bottom (including uDeviceId). This is based on http://msdn.microsoft.com/en-us/library/windows/desktop/dd743866%28v=vs.85%29.aspx which shows a UINT_PTR for that parameter. Note that the _PTR parameters are the only ones that are different sizes in 32 vs. 64 bit mode. In .Net you use IntPtr for that purpose. ntdsapi9: DsCrackNames The success of the name conversion request depends on where the client is bound. Clients bind to specific instances of the directory service using some variant of DsBind. If bound to a global catalog, the scope of the name mapping is the entire forest. If not bound to a global catalog, the scope of the name mapping is the domain not covered by a global catalog for that domain controller. If not bound to a global catalog and a name is not found, but the input name unambiguously identifies its domain and this domain is in the forest, then the return data identifies the DNS domain name for the domain of interest. Clients are expected to use this data to bind to the correct domain controller or global catalog and call DsCrackNames again with the new bind handle. System.DirectoryServices.ActiveDirectory. 11: DsUnBind netapi32
DS_DOMAIN_DIRECT_OUTBOUND = 0x0002, // Domain is directly trusted
DS_DOMAIN_DIRECT_INBOUND = 0x0020 // Domain is directly trusting
uint trustTypes = (uint)(DS_DOMAIN_TRUST_TYPE.DS_DOMAIN_PRIMARY | DS_DOMAIN_TRUST_TYPE.DS_DOMAIN_DIRECT_OUTBOUND);
DS_DOMAIN_DIRECT_OUTBOUND = 0x0002, // Domain is directly trusted
DS_DOMAIN_DIRECT_INBOUND = 0x0020 // Domain is directly trusting 13: DsGetDcName
DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
DSGETDCNAME_FLAGS.DS_DIRECTORY_SERVICE_REQUIRED| System.DirectoryServices.ActiveDirectory.Domain.GetCurrentDomain()
/// <summary>Retrieves state data for the computer, which includes the state of the directory service installation and domain data.</summary>
/// <summary>The directory service is running on this computer.</summary>
/// <summary>The directory service is running in mixed mode.</summary>
/// <summary>The directory service is running as read-only on this computer.</summary>
/// <summary>Gets state data for the computer, which includes the state of the directory service installation and domain data.</summary>
Policies = new string[9, 2] { { "System", "" }, { "Logon", "" }, { "Object Access", "" }, { "Privilige Use", "" }, { "Detailed Tracking", "" }, { "Policy Change", "" }, { "Account Management", "" }, { "Directory Service Access", "" }, { "Account Logon", "" } };
aObjectAttributes.RootDirectory = IntPtr.Zero; 16: NetDfsEnum [2014-02-27] The function does not set the last error value, the error is returned directly and is in NET_API_STATUS format /Stoyan Sabev/ 17: NetDfsGetInfo [Stoyan Sabev] The function does not set the last error value, the error is returned directly and is NET_API_STATUS form
System.DirectoryServices.ActiveDirectory.Domain.GetComputerDomain(); 19: NetJoinDomain Here's some sample code that can do this using System.DirectoryServices
DirectoryEntry localDE = new DirectoryEntry(localDirEntryString);
DirectoryEntry domainDE = new DirectoryEntry(domainDirEntryString);
DirectoryEntry user = domainDE.Children.Find(userName, "user");
DirectoryEntry group = localDE.Children.Find(groupName, "group");
catch (DirectoryServicesCOMException e)
/// of domain controllers, the Active Directory. Local group members can be users or global groups.
''' <remarks>If you call this function on a domain controller that is running Active Directory, access is allowed or denied based on 24: NetRemoteTOD
using System.DirectoryServices.ActiveDirectory; 25: NetServerGetInfo
public string UserDirectoryPath; 26: NetSessionEnum
/// Parameter was incorrect.
/// Unknown Directory. 27: NetShareAdd
NERR_RedirectedPath = (NERR_BASE + 17)
string path = @"C:\MyShareDirectory"; // do not append comma, it'll fail 28: NetShareEnum I believe that all of these samples are slightly incorrect in that they do not deal with the case where NetShareEnum does not retrieve all of the shares on a server in a single call. The caller is supposed to check for ERROR_MORE_DATA and then do the appropriate thing. This may be an edge case not worrying about, but anyone writing code for big environments should validate the assumption that all shares will be fetched with a single call.
Dim si As SHARE_INFO_1 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_1)
Dim si As SHARE_INFO_2 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_2)
Dim si As SHARE_INFO_1 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_1)
Dim si As SHARE_INFO_2 = DirectCast(Marshal.PtrToStructure(pItem, t), SHARE_INFO_2) 29: NetShareGetInfo
Corrected VB Signature 'ByVal Level As Long' --> 'ByVal Level as Integer', format tidy. 30: NetUseAdd You can also use the WNetAddConnection2 and WNetAddConnection3 functions to redirect a local device to a network resource. Connections added by NetUseAdd are not shown in the Explorer. You should use one of the WNetAddConnection methods to make the networkdrive visible in the explorer. 31: NetUserEnum using System.DirectoryServices; //System.DirectoryServices
DirectoryEntry directoryEntry = new DirectoryEntry("WinNT://" + Environment.MachineName);
foreach (DirectoryEntry child in directoryEntry.Children) {
//LG_INCLUDE_INDIRECT=1
//LG_INCLUDE_INDIRECT=1 33: NetWkstaUserEnum * On Windows 8+ when users log in with a MicrosoftAccount the username is returned like "MicrosoftAccount\user.email@thedomain.com" rather than the ID. This means for example that it won't match their directory name in C:\Users. 34: USER_INFO_0 Isn't this supposed to be under 'Directory' - 'Structures', rather than 'Desktop Functions:' - 'netapi32'? shell3235: APPBARDATA 36: APPBARDATA
// The previous examples on this page used incorrect 38: CSIDL
CSIDL_DESKTOPDIRECTORY = 0x0010, // <user name>\Desktop
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019, // All Users\Desktop
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory()
CSIDL_SYSTEM = 0x0025, // GetSystemDirectory()
CSIDL_SYSTEMX86 = 0x0029, // x86 system directory on RISC 39: CSIDL
/// Version 5.0. The file system directory that is used to store administrative tools for an individual user.
/// The Microsoft Management Console (MMC) will save customized consoles to this directory, and it will roam with the user.
/// The file system directory that corresponds to the user's nonlocalized Startup program group.
/// Version 4.71. The file system directory that serves as a common repository for application-specific data.
/// Version 6.0. The file system directory acting as a staging area for files waiting to be written to CD.
/// Version 5.0. The file system directory containing administrative tools for all users of the computer.
/// The file system directory that corresponds to the nonlocalized Startup program group for all users.
/// Version 5.0. The file system directory containing application data for all users. A typical path is
/// The file system directory that contains files and folders that appear on the desktop for all users.
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019,
/// The file system directory that contains documents that are common to all users. A typical paths is
/// The file system directory that serves as a common repository for favorite items common to all users.
/// Version 6.0. The file system directory that serves as a repository for music files common to all users.
/// Version 6.0. The file system directory that serves as a repository for image files common to all users.
/// The file system directory that contains the directories for the common program groups that appear on the
/// The file system directory that contains the programs and folders that appear on the Start menu for all users.
/// The file system directory that contains the programs that appear in the Startup folder for all users.
/// The file system directory that contains the templates that are available to all users. A typical path is
/// Version 6.0. The file system directory that serves as a repository for video files common to all users.
/// The file system directory that serves as a common repository for Internet cookies. A typical path is
/// The file system directory used to physically store file objects on the desktop (not to be confused with
CSIDL_DESKTOPDIRECTORY = 0x0010,
/// The file system directory that serves as a common repository for the user's favorite items. A typical path is
CSIDL_HISTORY = 0x0022, // The file system directory that serves as a common repository for Internet history items.
/// Version 4.72. The file system directory that serves as a common repository for temporary Internet files.
/// Version 5.0. The file system directory that serves as a data repository for local (nonroaming) applications.
/// The file system directory that serves as a common repository for music files. A typical path is
/// Version 5.0. The file system directory that serves as a common repository for image files.
/// Version 6.0. The file system directory that serves as a common repository for video files.
/// A file system directory containing the link objects that may exist in the My Network Places virtual folder.
/// Previous to Version 6.0. The file system directory used to physically store a user's common repository of documents.
/// The file system directory that contains the link objects that can exist in the Printers virtual folder.
/// Version 6.0. The file system directory containing user profile folders. A typical path is C:\Documents and Settings.
/// The file system directory that contains the user's program groups (which are themselves file system directories).
/// The file system directory that contains shortcuts to the user's most recently used documents. A typical path is
/// The file system directory that contains Send To menu items. A typical path is C:\Documents and Settings\username\SendTo.
/// The file system directory containing Start menu items. A typical path is C:\Documents and Settings\username\Start Menu.
/// The file system directory that corresponds to the user's Startup program group. The system starts these programs
/// The file system directory that serves as a common repository for document templates. A typical path is
/// Version 5.0. The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables. this.fileSystemWatcher.IncludeSubdirectories = true; 41: FindExecutable
static extern IntPtr FindExecutable(string lpFile, string lpDirectory, [Out] StringBuilder lpResult);
Private Shared Function FindExecutable(ByVal lpFile As String, ByVal lpDirectory As String, ByRef lpResult As StringBuilder) As IntPtr
string lpFile, string lpDirectory, StringBuilder lpResult); 42: IsUserAnAdmin
/// It is recommended to call that function directly to determine Administrator group status rather than calling IsUserAnAdmin.
''' It is recommended to call that function directly to determine Administrator group status rather than calling IsUserAnAdmin. 43: ITaskbarList3
/// <param name="prcClip">A pointer to a RECT structure that specifies a selection within the window's struct RECT{ 44: PathCleanupSpec 45: Run public static extern string Shell(IntPtr HWND, string operation, string file, string parameters, string directory, int showcmd); 46: SHAppBarMessage
/// Retrieves the bounding rectangle of the Windows taskbar. Note that this applies only to the
Public Structure RECT
Public rc As RECT
Public T_SIZE As RECT
// Browsing for directory. You need to be in an STA thread for the BIF_NEWDIALOGSTYLE to work correctly. Use the STAThread attribute on your Main function, or create a new thread and call SetApartmentState before it is started. The default apartment state is MTA so if this isn't working for you, that could be why. 48: SHChangeNotify Shell Notifications in C# [http://www.thecodeproject.com/csharp/shellnotifications.asp] (Note: the parameter to this function is incorrect in the example. The C# Signature above is correct)
static extern int SHCreateDirectoryEx(IntPtr hwnd, string pszPath, IntPtr psa);
SHCreateDirectoryEx(IntPtr.Zero, @"D:\test\", IntPtr.Zero); 50: ShellExecuteEx
<MarshalAs(UnmanagedType.LPTStr)> Public lpDirectory As String
public string lpDirectory;
"explore" - Opens the Windows Explorer in the folder specified in lpDirectory. 51: Shell_NotifyIcon Retrieves the Notifyicon bounding rectangle.
static extern int Shell_NotifyIconGetRect([In]ref NOTIFYICONIDENTIFIER identifier, [Out]out RECT iconLocation); RECT
public struct RECT
private static extern int Shell_NotifyIconGetRect([In]ref NOTIFYICONIDENTIFIER identifier, [Out]out RECT iconLocation);
public static RECT GetNotifyIconRect(IntPtr windowHandle, uint taskbarIconId)
var rect = new RECT();
var hresult = Shell_NotifyIconGetRect(ref notifyIcon, out rect);
return rect; Retrieves the Notifyicon bounding rectangle.
static extern int Shell_NotifyIconGetRect([In]ref NOTIFYICONIDENTIFIER identifier, [Out]out RECT iconLocation); RECT
public struct RECT
private static extern int Shell_NotifyIconGetRect([In]ref NOTIFYICONIDENTIFIER identifier, [Out]out RECT iconLocation);
public static RECT GetNotifyIconRect(IntPtr windowHandle, uint taskbarIconId)
var rect = new RECT();
var hresult = Shell_NotifyIconGetRect(ref notifyIcon, out rect);
return rect; 53: SHFileOperation
FOF_NORECURSION = 0x1000, // don't recurse into directories. 54: SHGetFolderPath
// Version 5.0. The file system directory that is used
// consoles to this directory, and it will roam with the user.
// Version 5.0. The file system directory containing
// Version 4.71. The file system directory that serves as
// Version 5.0. The file system directory containing
// The file system directory that contains documents
// The file system directory that serves as a common repository
// The file system directory that serves as a common repository
// Version 4.72. The file system directory that serves as
// Version 5.0. The file system directory that serves as a data
// Version 5.0. The file system directory that serves as
// Previous to Version 6.0. The file system directory used to
// Version 5.0. The Windows directory or SYSROOT.
// Fonts directory. A typical path is c:\Windows\Fonts.
CSIDL_DESKTOPDIRECTORY = 0x0010, // <user name>\Desktop
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019, // All Users\Desktop
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory()
CSIDL_SYSTEM = 0x0025, // GetSystemDirectory()
CSIDL_SYSTEMX86 = 0x0029, // x86 system directory on RISC
Throw New ApplicationException("Can't get window's directory")
/// Gets the system fonts directory path.
/// <returns>The fonts directory path</returns>
private static String GetFontsDirectory() 55: SHGetImageList
struct RECT
public RECT rcImage;
int GetImageRect(
ref RECT prc); SHGetImageList is not exported correctly in XP. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q316931
Throw New ApplicationException("Can't get specified directory.")
COMMON_DESKTOPDIRECTORY = &H19
DESKTOPDIRECTORY = &H10
/// <param name="pidl">Address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).</param>
''' <param name="pidl">Address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).</param>
fileP = My.Computer.FileSystem.SpecialDirectories.MyDocuments
MessageBox.Show(c.FileSystem.SpecialDirectories.MyDocuments);
CSIDL_DESKTOPDIRECTORY = 0x0010, // <user name>\Desktop
CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019, // All Users\Desktop
CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory()
CSIDL_SYSTEM = 0x0025, // GetSystemDirectory()
CSIDL_SYSTEMX86 = 0x0029, // x86 system directory on RISC System.Drawing.SystemIcons, although note that not all icons are included and at least the Shield icon is incorrect on Win 7 / Win 2008. Cut off search results after 60. Please refine your search. |