Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "Hi" in [All]

cfgmgr32

.

     InvalidMachinename = 0x0000002F,   // NT ONLY

.

     MachineUnavailable = 0x00000031,   // NT ONLY

.
Summary
Checks whether a device instance and its children can be removed and, if so, it removes them. If the operation succeeds, the function returns CR_SUCCESS. Otherwise it returns one of the error codes with "CR_" prefix that are defined in Cfgmgr32.h
.

    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.

.

http://blogs.msdn.com/noahc/archive/2009/06/04/eject-or-undock-a-laptop-pc-from-command-line-or-c.aspx

faultrep

.

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.

msvcrt

.
Summary
freopen tries to close any file already associated with the stream given as third parameter and disassociates it. Then, whether that stream was successfuly closed or not, freopen opens the file whose name is passed in the first parameter, filename, and associates it with the specified stream just as fopen would do using the mode value specified as the second parameter.
.

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().

.
Documentation
[kbhit] on MSDN
.

   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
.
Summary
The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time, according to the system clock. The return value is stored in the location given by timer. This parameter may be NULL, in which case the return value is not stored.

coredll

.
Summary
This function appends a new item to the end of the specified menu. You can use AppendMenu to specify the content, appearance, and behavior of the menu item.
10: ByRef
.
Summary
ByRef is a VB keyword that specifies a variable to be passed as a parameter BY REFERENCE. In other words, the pointer to the variable is passed and any change to its value made within the function or sub will change its value outside the function/sub.
.

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.

.
Summary
.
Summary
This function stops change notification handle monitoring.
.
Summary
This function creates a change notification handle and sets up initial change notification filter conditions. A wait on a notification handle succeeds when a change matching the filter conditions occurs in the specified registry key or subkeys.
.

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.

.
Summary
This function requests that the OS signal a change notification handle the next time it detects an appropriate change.
.
Summary
This function queries the user for notification settings by displaying a dialog box showing options that are valid for the current hardware platform.
.
Summary
This function returns an array of currently stored notifications.
.
Summary
This function marks as "handled" all notifications previously registered by the given application that have occurred. CeHandleAppNotifications turns off the sound and LED and stops vibration (if they were on), and removes the taskbar annunciator.
.
Summary
This function starts running an application when a specified event occurs.
.

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:

.
NOTIFICATION_EVENT_NONE No events — remove all event registrations for this application. 0
.
Summary
This function prompts the system to start running a specified application at a specified time.
.

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)

.
Summary
This function creates a new user notification or modifies an existing one.
.

  notificationTrigger.Size = (UInt32)Marshal.SizeOf( notificationTrigger ); // This line needs the compile switch /unsafe

.
Summary
This function creates a new user notification or modifies an existing one.
.

  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)

.
Summary
This function validates a password by checking a string to determine if it matches the current password.
.
Summary
This function closes an open object handle
.

    '''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)

.

lpSecurityAttributes can be left as an IntPtr - CE doesn't use it. Set this to be IntPtr.Zero.

.

You'll need this API if you're doing serial comms.

.
Summary
This function creates a new process. Only necessary params are the Application Name and the process Information
.
Summary
This function creates a logical brush that has the specified solid color.
.
Summary
This function destroys the specified menu and frees any memory that the menu occupies.
.
Summary
This function allows you to send and receive data to control certain devices of your CE device.
.
Summary
This function disables one or more touch gestures for a window or application process.
.

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.

.
Summary
This function enables one or more touch gestures for a window or application process.
.

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.

.
Summary
This function enables or disables (grays) the specified menu item.
.

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.

.
Summary
The function retrieves the handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows.
.

    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.");

.

This is a way of getting a 'dialog' window on PocketPC

.

    this.Capture = true;

.
Summary
This function retrieves the name of the class to which the specified window belongs.
38: GetDC
.
Summary
This function retrieves a handle to a display device context (DC) for the client area of the specified window. The display device context can be used in subsequent graphics display interface (GDI) functions to draw in the client area of the window.
.
Summary
Returns a 20 byte string, unique to the device and application from which it's called.
.

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:

.
  1. What do untrusted applications do when they want to get access to this API?
.

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

.
Summary
This function returns the amount of time, in milliseconds, that the system has been idle.
.

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.

.

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:

.
Summary
This function returns a module handle for the specified module if the file is mapped into the address space of the calling process.
.
Summary
This function obtains information about a specified graphics object.
.
Summary
This function returns the address of the specified exported DLL function.
.

    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;

.
Summary
This function retrieves information from the kernel pertaining to object store and system memory.
.
Summary
This will return the current status of the battery on a mobile device
.
Summary
This will return the current status of the battery on a mobile device
.
Summary
This function retrieves the number of characters in a specified string that fit within a specified space and fills an array with the text extent for each of those characters. A text extent is the distance between the beginning of the space and a character that fits in the space.
.

    using(Graphics g = ctrl.CreateGraphics())

.
Summary
This function retrieves information about the specified window. GetWindowLong also retrieves the 32-bit value at the specified offset into the extra window memory of a window.
.
Summary
This function gets information on the physical and virtual memory of the system.
.
Summary
This function is called by an OEM to initiate a power–down or suspend state.
.
Summary
Returns the input context associated with the specified window. - An application should routinely use this function to retrieve the current input context before attempting to access information in the context. (from msdn.microsoft.com)
.

public static extern bool ImmGetOpenStatus(IntPtr hIMC);

.

public static extern bool ImmSetOpenStatus(IntPtr hIMC, bool flag);

.

example Chinese, Japanese, Korean and other.

.
Summary
This function determines whether the calling process has read access to the memory at the specified address.
.

        /// This function provides the kernel with a generic I/O control for

.

        /// <param name="dwIoControlCode">I/O control code, which should support the

.

//This sample code is mainly used to turn the backlight on a WM device. The keystrokes can changed to use for other functions

.
Summary
.

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.


 
Access PInvoke.net directly from VS: