Desktop Functions: Smart Device Functions:
|
Search Results for "set" in [All]dbghlp1: K4B6XADMWMJD49F51EE3N2RVKCANR2MREAU2SPEV9UOET3XPKIPLLBBWURDYTPW96EJLFO0PTDUVQJTA4SQXWTMMI3CIWE7FHZSH ðChÃÎt90_>dy~'"_e NUøÖMi7^Ê<ÝN¾ì@ìSETHDZê"VãxyF-&1ê̱PC9Z$A¯äίa»!l ¥aåóÒ|±rXíêÐßÙó=À¢G>¤7zØO<Ä:G.i[ÆÅs`VA MinCoreglu32
[DllImport("glu32.dll", SetLastError=true)] comdlg324: ChooseFont
[DllImport("comdlg32.dll", CharSet = CharSet.Auto, EntryPoint = "ChooseFont", SetLastError=true)]
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
[DllImport("comdlg32.dll", SetLastError=true)]
<DllImport("comdlg32.dll", SetLastError:=True)> _ 6: FtpCommand
[DllImport("WinInet.dll", SetLastError=true, CharSet=CharSet.Auto)]
<DllImport("WinInet.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
[DllImport("comdlg32.dll", SetLastError=true, CharSet = CharSet.Auto)]
<DllImport("comdlg32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
' WORD nFileOffset;
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Public fileOffset As Short = 0
Console.WriteLine("Offset from file name: {0}", ofn.fileOffset)
Console.WriteLine("Offset from file extension: {0}", ofn.fileExtension)
WORD nFileOffset;
memset(&ofn, 0, sizeof (ofn));
[DllImport("Comdlg32.dll", CharSet=CharSet.Auto, SetLastError=true)]
<DllImport("Comdlg32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
' WORD nFileOffset;
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Public fileOffset As Short = 0 9: PageSetupDlg
[DllImport("comdlg32.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern bool PageSetupDlg(ref PAGESETUPDLG_STRUCT lppsd);
<DllImport("comdlg32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function PageSetupDlg(ByRef lppsd As PAGESETUPDLG_STRUCT) As Boolean 10: PrintDlg
[DllImport("comdlg32.dll", CharSet=CharSet.Auto)]
<DllImport("comdlg32.dll", CharSet:=CharSet.Auto)> _
<DllImport("comdlg32.dll", CharSet:=CharSet.Auto)> _
Set(ByVal value As IntPtr)
End Set
Dim prnsettings As Printing.PrinterSettings = New Printing.PrinterSettings()
_pdex.hDevMode = prnsettings.GetHdevmode()
_pdex.hDevNames = prnsettings.GetHdevnames()
<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)> _
Public Const PD_PRINTSETUP As Int32 = 64
Public Const PD_ENABLESETUPHOOK As Int32 = 8192
Public Const PD_ENABLESETUPTEMPLATE As Int32 = 32768
Public Const PD_ENABLESETUPTEMPLATEHANDLE As Int32 = 131072 11: PrintDlgEx
[DllImport("comdlg32.dll", CharSet=CharSet.Auto)]
<DllImport("comdlg32.dll", CharSet:=CharSet.Auto)> _
<DllImport("comdlg32.dll", CharSet:=CharSet.Auto)> _
Set(ByVal value As IntPtr)
End Set
Dim prnsettings As Printing.PrinterSettings = New Printing.PrinterSettings()
_pdex.hDevMode = prnsettings.GetHdevmode()
_pdex.hDevNames = prnsettings.GetHdevnames()
<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)> _
Public Const PD_PRINTSETUP As Int32 = 64
Public Const PD_ENABLESETUPHOOK As Int32 = 8192
Public Const PD_ENABLESETUPTEMPLATE As Int32 = 32768
Public Const PD_ENABLESETUPTEMPLATEHANDLE As Int32 = 131072
[DllImport("oleaut32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
<DllImport("oleaut32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> _ powrprof
[DllImport("powrprof.dll", SetLastError=true)]
<DllImport("powrprof.dll", SetLastError := True)> _ 14: DevicePowerClose
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof.dll", SetLastError=true, CharSet = CharSet.Auto)] 16: EnumPwrSchemes
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof.dll", SetLastError = true)]
[DllImport("powrprof.dll", SetLastError=true)] 21: PowerEnumerate
[DllImport("powrprof.dll", SetLastError=true)]
IntPtr SubGroupOfPowerSettingsGuid,
ACCESS_AC_POWER_SETTING_INDEX = 0,
ACCESS_DC_POWER_SETTING_INDEX = 1,
ACCESS_INDIVIDUAL_SETTING = 18,
SubGroupOfPowerSettingsGuid As IntPtr,
ACCESS_AC_POWER_SETTING_INDEX = 0
ACCESS_DC_POWER_SETTING_INDEX = 1
ACCESS_INDIVIDUAL_SETTING = 18
IntPtr SubGroupOfPowerSettingGuid,
IntPtr PowerSettingGuid,
IntPtr SubGroupOfPowerSettingGuid,
IntPtr PowerSettingGuid,
SubGroupOfPowerSettingGuid As IntPtr, PowerSettingGuid As IntPtr, _
''' Retrieves the friendly name for the specified power setting, subgroup, or scheme, in Unicode (Each Char is 2 bytes).
''' <param name="RootPowerKey">This parameter is reserved for future use and must be set to NULL</param>
''' <param name="SubGroupOfPowerSettingGuid">The subgroup of power settings. Use NO_SUBGROUP_GUID to refer to the default power scheme.</param>
''' <param name="PowerSettingGuid">The identifier of the power setting that is being used.</param>
[DllImport("Powrprof.dll", SetLastError = true)]
private const int PBT_POWERSETTINGCHANGE = 32787; // (0x8013) - A power setting change event has been received.
/// <param name="setting">A structure related to the notification, depends on type parameter</param>
delegate int DeviceNotifyCallbackRoutine(IntPtr context, int type, IntPtr setting);
private static int DeviceNotifyCallback(IntPtr context, int type, IntPtr setting)
case PBT_POWERSETTINGCHANGE:
Console.WriteLine("\tA power setting change event has been received. ");
/// Full call to Vista method PowerSettingAccessCheck().
[DllImport("PowrProf.dll", CharSet = CharSet.Auto, SetLastError = true)]
internal static extern UInt32 PowerSettingAccessCheck(
PowerSettingAccessFlags accessFlags,
/// Partial call to Vista method PowerSettingAccessCheck() supporting null GUID parameter.
[DllImport("PowrProf.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern UInt32 PowerSettingAccessCheck(
PowerSettingAccessFlags accessFlags,
/// Full call to Vista method PowerSettingAccessCheck() supporting empty power setting identifier.
internal static UInt32 PowerSettingAccessCheck(PowerSettingAccessFlags accessFlags)
return PowerSettingAccessCheck(accessFlags, IntPtr.Zero);
public enum PowerSettingAccessFlags
/// Check for overrides on AC power settings.
ACCESS_AC_POWER_SETTING_INDEX = 0x0,
/// Check for overrides on DC power settings.
ACCESS_DC_POWER_SETTING_INDEX = 0x1,
Declare Function PowerSettingAccessCheck Lib "powrprof.dll" (TODO) As TODO
[DllImport("powrprof.dll", SetLastError=true, CharSet=CharSet.Unicode)]
IntPtr SubGroupOfPowerSettingGuid,
IntPtr PowerSettingGuid,
uint set = NativeMethods.PowerWriteFriendlyName(IntPtr.Zero, ref powerPlanId, IntPtr.Zero, IntPtr.Zero, name, BufferSize);
if (set == 0) //verify if the value has been set successfuly
[DllImport("powrprof", SetLastError=true)]
<DllImport("powrprof.dll", SetLastError:=True)> Private Shared Function ReadGlobalPwrPolicy(ByRef pGlobalPowerPolicy As GLOBAL_POWER_POLICY) As Boolean 27: ReadPwrScheme
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof.dll", SetLastError = true)]
private static extern bool SetActivePwrScheme(uint uiID, ref GlobalPowerPolicy lpGlobalPowerPolicy, ref PowerPolicy lpPowerPolicy);
[DllImport("powrprof.dll", SetLastError = true)]
private static extern bool SetActivePwrScheme(uint uiID, IntPtr lpGlobalPowerPolicy, IntPtr lpPowerPolicy);
Declare Function SetActivePwrScheme Lib "powrprof.dll" (TODO) As TODO 29: SetSuspendState
[DllImport ("Powrprof.dll", SetLastError = true)]
static extern bool SetSuspendState (bool hibernate, bool forceCritical, bool disableWakeEvent);
Declare Function SetSuspendState Lib "powrprof.dll" (ByVal Hibernate As Boolean, ByVal ForceCritical As Boolean, ByVal DisableWakeEvent As Boolean) As Boolean
[DllImport("Powrprof.dll", SetLastError = true)]
static extern bool SetSuspendState(bool hibernate, bool forceCritical, bool disableWakeEvent);
SetSuspendState(false, false, false);
'SetSuspendState will put the PC in to a standby mode
Private Declare Function SetSuspendState Lib "powrprof.dll" (ByVal Hibernate As Boolean, ByVal ForceCritical As Boolean, _
'SetSuspendState Example
'SetSuspendState(False, False, False)
Application.SetSuspendState(PowerState.Hibernate, False, False)
Application.SetSuspendState(PowerState.Suspend, False, False) Public Shared Function SetSuspendState(ByVal state As System.Windows.Forms.PowerState, ByVal force As Boolean, ByVal disableWakeEvent As Boolean) As Boolean 30: wetrewrt
[DllImport("powrprof.dll", SetLastError=true)]
[DllImport("powrprof", SetLastError=true)]
<DllImport("powrprof.dll", SetLastError:=True)> Private Shared Function WriteGlobalPwrPolicy(ByRef pGlobalPowerPolicy As GLOBAL_POWER_POLICY) As Boolean ole3232: BIND_OPTS
[DllImport("ole32.dll", SetLastError=true)] 33: CLSIDFromProgID
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
<DllImport("ole32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> _
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=true)]
<DllImport("ole32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True, PreserveSig:=False)> _ 35: CLSIDFromString
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
[DllImport("ole32.dll", CharSet = CharSet.Unicode)] 37: CoCreateInstance
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)]
Setting unloadDelay=INFINITE uses the system default delay (10 minutes).
Setting unloadDelay=0 forces the unloading of any DLLs without any delay. Setting the delay too short (or zero) can have unintended consequences, as some DLL's will return control before they have finished cleaning up resources, or they will continue executing in the background.
Setting unloadDelay=INFINITE uses the system default delay (10 minutes).
Setting unloadDelay=0 forces the unloading of any DLLs without any delay. Setting the delay too short (or zero) can have unintended consequences, as some DLL's will return control before they have finished cleaning up resources, or they will continue executing in the background. 41: CoGetClassObject
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)] 42: CoGetObject
[DllImport("ole32.dll", CharSet=CharSet.Unicode, ExactSpelling=true, PreserveSig=false)] 43: CoInitialize 44: CoInitializeEx
[DllImport("ole32.dll", CharSet = CharSet.Auto, SetLastError = true, CallingConvention = CallingConvention.StdCall)]
static extern int CoSetProxyBlanket([MarshalAs(UnmanagedType.IUnknown)] Please look at http://msdn2.microsoft.com/en-us/library/aa302389.aspx#secnetch09_callingservicedcompaspnet, which shows how to call CoSetProxyBlanket in C#. As this is published on the MS Patterns and Practices web site I would assume this would be OK and is safe. This reference has code and discusses the issues about transition from .net object to COM IUnknown reference using the Marshal functions.
System.Threading.ManualResetEvent event = new System.Threading.ManualResetEvent(false);
/// If set to FALSE, the caller must free the hGlobal after the final release. If set
ExactSpelling=true, PreserveSig=true, CharSet=CharSet.Ansi,
set {_strErrorMsg = value;}
ExactSpelling=true, PreserveSig=true, CharSet=CharSet.Ansi, 52: IIDFromString
[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]
[DllImport("ole32.dll", CharSet=CharSet.Unicode)]
[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]
[DllImport("ole32.dll", CharSet = CharSet.Unicode)] 54: OleCreate
/// property pages do not support persisting their settings.
[DllImport("oleaut32.dll", CharSet=CharSet.Unicode, ExactSpelling=true) ] 56: OleSetClipboard
static extern int OleSetClipboard(IDataObject pDataObj);
Public Shared Function OleSetClipboard(ByVal pDataObj As System.Runtime.InteropServices.ComTypes.IDataObject) As Int32 59: ProgIDFromCLSID
[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)]
[DllImport("ole32.dll", CharSet=CharSet.Unicode, PreserveSig=false)] Guids generated with this will return the name using the FmtIdToPropStgName Function, and can be used to generate a new IPropertyStorage interface with IPropertySetStorage.Create(). The name returned will be filled to 26 chars with the letter 'a' due to the fixed size of a Guid and the fact that we're passing all zeros in the BitArray after the name finishes to reach this size. Cut off search results after 60. Please refine your search. |