Desktop Functions: Smart Device Functions:
|
Search Results for "Hi" in [All]cfgmgr32
InvalidMachinename = 0x0000002F, // NT ONLY
MachineUnavailable = 0x00000031, // NT ONLY
IntPtr machine); deviceInstance, Caller-supplied device instance handle to the device at the root of the subtree to be removed. This device instance handle is bound to the machine handle supplied by hMachine. vetoType, If not NULL, this points to a location that, if the removal request fails, receives a PNP_VETO_TYPE-typed value indicating the reason for the failure. vetoName, If not NULL, this is a caller-supplied pointer to a string buffer that receives a text string. The type of information this string provides is dependent on the value received by pVetoType. For information about these strings, see PNP_VETO_TYPE. vetoNameLength, Caller-supplied value representing the length (number of characters) of the string buffer supplied by pszVetoName. This should be set to MAX_PATH. machine, Caller-supplied machine handle to which the caller-supplied device instance handle is bound. faultrep4: ReportFault Enables an application to "manually" report faults to Microsoft. Although you can use this function to report application crashes, Microsoft recommends that applications not handle fatal errors directly but instead rely on the crash reporting capability provided by the operating system. msvcrt5: freopen 6: kbhit
static extern int kbhit();
Shared Function kbhit Lib "msvcrt.dll" () As Integer while (!kbhit()); This is in the .NET 2.0 Console class functions System.Console.KeyAvailable() or System.Console.ReadKey(). 7: memcmp
public static bool SequenceEqual(this byte[] b1, byte[] b2)
Removed SetLastError attribute from bottom 2 signatures as memset does not use this API. 8: time coredll9: AppendMenu 10: ByRef To pass a variable by value (i.e. any change made to the variable's value within the function/sub will not affect it outside the function/sub.) use ByVal.
REG_NOTIFY_CHANGE_LAST_SET = 4 ' Notify the caller of changes to a value of the key. This can include adding or deleting a value or changing an existing value. 18: CeRunAppAtEvent
private static extern bool CeRunAppAtEvent(string pwszAppName, int lWhichEvent);
(ByVal AppName As String, ByRef lWhichEvent As Integer) As Boolean lWhichEvent [ in ] Event at which the application is to be started. It is one of the following values:
19: CeRunAppAtTime In VB, function will return "true" if successful when adding app to run. However, it returns a "false" when cancelling the app even though the event is successfully cancelled. I'm guessing this is due to the systemtime structure being passed by reference and in this case references nothing. See sample code below. (VB .NET CF) While this wakes the device, the screen may remain powered off. Combine with SetSystemPowerState truly wake up everything.
Dim cancelapp as boolean = CeRunAppAtTime(FullAppName, Nothing)
notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe
notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe
Return Nothing
Dim ret As CDSRet = ChangeDisplaySettingsEx(Nothing, devMode.Data, IntPtr.Zero, 0, IntPtr.Zero) 23: CheckPassword 24: CloseHandle 25: CreateEvent
'''The next thread to request ownership of the mutex can handle this exception and proceed, provided that the integrity of the data structures can be verified.</remarks>
MyBase.New(message, Nothing)
''' This class contains a custom implementation of the WaitHandles for .NET compact framework
''' <param name="waitHandles">A WaitHandle array containing the objects for which the current instance will wait.</param>
''' <param name="waitHandles">A WaitEvent array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates). </param>
If waitEvents Is Nothing Then
Throw New ArgumentNullException("waitHandles", "The waitHandles parameter is Nothing")
ElseIf Not Array.TrueForAll(waitEvents, Function(hand As WaitEvent) hand IsNot Nothing) Then
Throw New ArgumentNullException("waitHandles", "One or more of the objects in the waitHandles array is Nothing")
''' <remarks>The state of a manual-reset event object remains signaled until it is set explicitly to the nonsignaled state by the ResetEvent function. Any number of waiting threads, or threads that subsequently begin wait operations for the specified event object by calling one of the wait functions, can be released while the object's state is signaled.
'''The state of an auto-reset event object remains signaled until a single waiting thread is released, at which time the system automatically sets the state to nonsignaled. If no threads are waiting, the event object's state remains signaled.
'''The state of an event object remains nonsignaled until it is explicitly set to signaled by the SetEvent or PulseEvent function. This nonsignaled state blocks the execution of any threads that have specified the event object in a call to one of the wait functions.
'''ResetEvent sets the event to the nonsignaled state even if the event was signaled multiple times before being signaled. The ResetEvent function is used primarily for manual signal event objects, which must be set explicitly to the nonsignaled state. Auto-signal event objects automatically change from signaled to nonsignaled after a single waiting thread is released.
' This code added by Visual Basic to correctly implement the disposable pattern.
' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
Sub New(ByVal initialState As Boolean, Optional ByVal name As String = Nothing)
Sub New(ByVal initialState As Boolean, Optional ByVal name As String = Nothing) 26: CreateFile lpSecurityAttributes can be left as an IntPtr - CE doesn't use it. Set this to be You'll need this API if you're doing serial comms. 27: CreateProcess 28: CreateSolidBrush 29: DestroyMenu 30: DeviceIOControl 31: DisableGestures in Specifies the window to disable gestures for. If you set scope to TGF_SCOPE_PROCESS, the function ignores this parameter. in Specifies the scope of this function. Set to TGF_SCOPE_WINDOW to disable gestures for the window indicated by hwnd. Set to TGF_SCOPE_PROCESS to disable gestures for the application process. 32: EnableGestures in Specifies the window to enable gestures for. If you set scope to TGF_SCOPE_PROCESS, the function ignores this parameter. in Specifies the scope of this function. Set to TGF_SCOPE_WINDOW to enable gestures for the window indicated by hwnd. Set to TGF_SCOPE_PROCESS to enable gestures for the application process. 33: EnableMenuItem 34: ExtEscape Turn Off the Display While Running Applications Applications like the Microsoft® Windows Media™ Player for Pocket PC allow the user to turn off the display while the application is running in the background. This article shows you how to do this with your own applications. 35: FindWindowW
public const int SWP_HIDEWINDOW = 0x0080;
Public Const SWP_HIDEWINDOW As Integer = &H80 Can be used to hide the start bar and start menu.
public void HideStartBar()
// If the handle is found then hide the start bar
// Hide the start bar
SetWindowPos(handle, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);
MessageBox.Show("Could not hide Start Bar."); 36: GetCapture This is a way of getting a 'dialog' window on PocketPC
this.Capture = true; 37: GetClassName 38: GetDC There is a new API available for retrieving a device id in Windows Mobile 5.0 for both Pocket PC and Smartphone and Windows CE 6.0. The first question: why do we need a new way of getting the device ID, what’s wrong with the old? To answer this you need to know what a device ID is. There is a very good and detailed explanation here, but in essence it’s a 16 byte code derived from hardware specific information that is unique to each device. This ID is not the same as an IMEI or a phone number found on a phone based device, both of which can be changed, but instead this code lives and dies with the device. So the device ID is a very useful thing for software that wants to target just your device, e.g. copy protection, or to provide immutable identity to web service calls. Equally so it’s a resource that should be protected to mitigate the risk of identity theft. Getting at the device id is relatively straight forward but requires either some C++ or a reasonable amount of interop code. The api is something like this: Protecting Device ID has always been present as part of the Smartphone security model by making the KernelIoControl API a privileged operation, meaning your code must be running in the trusted code group to be able to access this API. But there are two problems with this:
GetDeviceUniqueID attempts to address these issues and to reduce applications dependency on the precious device id. Firstly GetDeviceUniqueID can be called from the trusted or untrusted code group, but the code returned is not the same as a call to KernelIoControl, its a 20 byte code not a 16 byte code. GetDeviceUniqueID takes an additional parameters of an application defined char array, and uses a one way hash to combine the real device id and the char array parameter to generate the new 20 byte code. This means that an application will always get the same 20 byte code if it calls GetDeviceUniqueID on the same device, with the same char array. It also means there is no practical way of asserting the true device id from the 20 byte key an application uses. Original Blog Entry: http://blogs.msdn.com/marcpe/archive/2006/01/09/510995.aspx 40: GetIdleTime 41: GetKeyState This function is very similar to the user32 function of the same name This sample VB.net code will check whether the NumLock is on or off. 42: GetLastError It is recommended that you do not call the Win32 GetLastError method directly. Because of the way P/Invoke works, the error message may get reset between Win32 calls in your code. Instead, call the Marshal.GetLastWin32Error method, which can be combined with the ever useful Marshal.ThrowExceptionForHR method. See below for an example.
// don't use this!
// use this:
// or this:
// use this: 43: GetModuleHandle 44: GetObject 45: GetProcAddressW 46: GetSystemInfo
Public Enum ProcessorArchitecture As Int16
PROCESSOR_ARCHITECTURE_INTEL = 0
PROCESSOR_ARCHITECTURE_MIPS = 1
PROCESSOR_ARCHITECTURE_ALPHA = 2
PROCESSOR_ARCHITECTURE_PPC = 3
PROCESSOR_ARCHITECTURE_SHX = 4
PROCESSOR_ARCHITECTURE_ARM = 5
PROCESSOR_ARCHITECTURE_IA64 = 6
PROCESSOR_ARCHITECTURE_ALPHA64 = 7
PROCESSOR_ARCHITECTURE_UNKNOWN = &hFFFF;
public enum ProcessorArchitecture : int
PROCESSOR_ARCHITECTURE_INTEL = 0,
PROCESSOR_ARCHITECTURE_MIPS = 1,
PROCESSOR_ARCHITECTURE_ALPHA = 2,
PROCESSOR_ARCHITECTURE_PPC = 3,
PROCESSOR_ARCHITECTURE_SHX = 4,
PROCESSOR_ARCHITECTURE_ARM = 5,
PROCESSOR_ARCHITECTURE_IA64 = 6,
PROCESSOR_ARCHITECTURE_ALPHA64 = 7,
PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF,
public static ProcessorArchitecture GetProcessorArch()
return ProcessorArchitecture.PROCESSOR_ARCHITECTURE_UNKNOWN; // probably no coredll
return (ProcessorArchitecture)si.wProcessorArch;
return (ProcessorArchitecture)si.wProcessorArch; 51: GetWindowLong 54: ImmGetContext 55: ImmGetOpenStatus
public static extern bool ImmGetOpenStatus(IntPtr hIMC); 56: ImmSetOpenStatus
public static extern bool ImmSetOpenStatus(IntPtr hIMC, bool flag); example Chinese, Japanese, Korean and other. 57: IsBadCodePtr 58: KernelIoControl
/// This function provides the kernel with a generic I/O control for
/// <param name="dwIoControlCode">I/O control code, which should support the 59: keybd_event //This sample code is mainly used to turn the backlight on a WM device. The keystrokes can changed to use for other functions 60: lineClose According to MSDN, line methods return LONG, which translates to Int32 in the .NET world. The possible error results, however, go over the capacity of a 32-bit integer. The header files show them as positive, but MSDN pages suggest that they are negative, which further suggests that perhaps they are meant to overflow. Because having variables overflow on purpose isn't very .NET-like, and C++ examples show that the result of this method is often assigned to a DWORD which translates to a UInt32 in .NET, it's safe to assume that we can have uint as the return type for this pinvoke. Cut off search results after 60. Please refine your search. |