On this page
Recent Posts on Technozone
This site
Calendar
<June 2013>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Categories
Microsoft MVP
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 2.0.7226.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Craig Pringle

Based on the essence theme by Jelle Druyts

Updates to the Sahara range & a dock at last#

News from Tegatech:

For more details visit the new range here:

· Sahara Slate PC i440T rev 2.0 (TOUCH Tablet)

· Sahara Slate PC i440D rev 2.0 (TOUCH and PEN)

...

And finally, with much anticipation, we would like to introduce the docking desk stand for the Sahara i400 series:

· Powered Docking Cradle for Sahara Slate PC i4XX series

clip_image001[1]clip_image002[1]

 

This is great news as I've always thought that a deck is a very important accessory to have when you own a slate. Good to see another player in the slate market.

Monday, February 25, 2008 7:19:58 AM (AUS Eastern Standard Time, UTC+10:00) #   
Comments [0]  | 

 

Trap for young (or tired) players#

If you are looking at developing tablet applications (and before you ask - yes you should be...) then there is a little trap that you should be aware of.

If you want to make use of the Ink Analysis API and you are developing on a 64-bit machine then make sure you set the target CPU to x86.  The Ink Analysis assemblies only support 32-bit at this time. 

If you forget to do this then when you build or debug the project on an 64-bit machine then you will get an error like this:

System.BadImageFormatException was unhandled
  Message=" is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)"
  Source="IACore"
  StackTrace:
       at System.Windows.Ink.AnalysisCore.RecognitionEngine..ctor(AnalysisWarningBaseCollection warnings)
       at System.Windows.Ink.AnalysisCore.RecognitionStage..ctor(AnalysisWarningBaseCollection warnings)
       at System.Windows.Ink.AnalysisCore.InkAnalyzerBase.CreateParserAndRegisterForEvents(Boolean reco)
       at System.Windows.Ink.AnalysisCore.InkAnalyzerBase.ForegroundAnalyzeInternal(ForegroundProcessingRecord record, AnalysisRegionBase dirty, AnalysisRegionBase originalDirtyRegion, Int32[] dirtyStrokesToAnalyze, AnalysisRegionBase dirtyRegionFromStrokesToAnalyze, AnalysisRegionBase regionOfRemovedStrokes)
       at System.Windows.Ink.AnalysisCore.InkAnalyzerBase.Analyze()
       at Microsoft.Ink.InkAnalyzer.Analyze()
       at InkBlogger.Form1.Button1_Click(Object sender, EventArgs e) in C:\Users\Craig Pringle\Documents\Visual Studio 2005\Projects\InkBlogger\InkBlogger\Form1.vb:line 21
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at InkBlogger.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

Which is not all that helpful...

To correct this you just need to set the target CPU in your project properties to x86.  To do this...

  1. right click you project in project explorer and select properties
  2. click on the Compile tab
  3. click on the Advanced Compile Options... button
  4. Set the target CPU as shown below.

image

What am I developing, you ask?  Time will tell ;-)

Wednesday, February 20, 2008 9:45:02 PM (AUS Eastern Standard Time, UTC+10:00) #   
Comments [0]  | 

 

Jabra - I am very impressed#

I previously reviewed the Jabra JX10 headset - which I loved before.  However I have to say I am now blown away.

I left my JX10 in my jeans pocket and it went through the wash.  Easy enough to do because the device is so small and light that it could easily be missed when checking your pockets.

Incredibly the headset still works after it's submarine adventure.  This completely floored me.  This is a truly robust little device and I am more impressed than ever.

Wednesday, February 06, 2008 8:26:43 PM (AUS Eastern Standard Time, UTC+10:00) #   
Comments [0]  | 

 

Potentially useful tool in troubleshooting Vista Insomnia#

I have come across a command line tool in Vista that has some potential in the fight against the dreaded Vista Insomnia issue.

The tool is called powercfg.exe and there is a TechNet article about it here.

Running powercfg /? provides the following usage information.

POWERCFG <command line options>
Description:
  This command line tool enables users to control the power settings
  on a system.

Parameter List:
  -LIST, -L   Lists all power schemes in the current user's environment.

              Usage: POWERCFG -LIST

  -QUERY, -Q  Displays the contents of the specified power scheme.

              Usage: POWERCFG -QUERY <SCHEME_GUID> <SUB_GUID>

              <SCHEME_GUID>  (optional) Specifies the GUID of the power scheme
                             to display, can be obtained by using powercfg -l.
              <SUB_GUID>     (optional) Specifies the GUID of the subgroup
                             to display.  Requires a SCHEME_GUID to be provided.

              If neither SCHEME_GUID or SUB_GUID are provided, the settings
              of the current user's active power scheme are displayed.
              If SUB_GUID is not specified, all settings in the specified
              power scheme are displayed.

  -CHANGE, -X Modifies a setting value in the current power scheme.

              Usage: POWERCFG -X <SETTING> <VALUE>

              <SETTING>   Specifies one of the following options:
                          -monitor-timeout-ac <minutes>
                          -monitor-timeout-dc <minutes>
                          -disk-timeout-ac <minutes>
                          -disk-timeout-dc <minutes>
                          -standby-timeout-ac <minutes>
                          -standby-timeout-dc <minutes>
                          -hibernate-timeout-ac <minutes>
                          -hibernate-timeout-dc <minutes>

              Example:
                  POWERCFG -Change -monitor-timeout-ac 5

              This would set the monitor idle timeout value to 5 minutes
              when on AC power.

  -CHANGENAME Modifies the name of a power scheme and optionally it's
              description.

              Usage: POWERCFG -CHANGENAME <GUID> <name> <scheme description>

              If the description is omitted only the name will be changed.

  -DUPLICATESCHEME
              Duplicates the specified power scheme.  The resulting
              GUID which represents the new scheme will be displayed.

              Usage: POWERCFG -DUPLICATESCHEME <GUID> <destination GUID>

              <GUID>  Specifies a scheme GUID obtained by using the powercfg -l.

              If <destination GUID> is omitted, a new GUID will be
              created for the duplicated scheme.

  -DELETE, -D Deletes the power scheme with the specified GUID.

              Usage: POWERCFG -DELETE <GUID>

              <GUID>  obtained by using the LIST parameter.

  -DELETESETTING
              Deletes a power setting.

              Usage: POWERCFG -DELETESETTING <SUB_GUID> <SETTING_GUID>

              <SUB_GUID>      Specifies the subgroup GUID.
              <SETTING_GUID>  Specifies the power setting guid.

  -SETACTIVE, -S
              Makes the specified power scheme active on the system.

              Usage: POWERCFG -SETACTIVE <SCHEME_GUID>

              <SCHEME_GUID>  Specifies the scheme guid.

  -GETACTIVESCHEME
              Retrieve the currently active power scheme.

              Usage: POWERCFG -GETACTIVESCHEME

  -SETACVALUEINDEX
              Sets a value associated with a specified power setting
              while the system is powered by AC power.

              Usage: POWERCFG -SETACVALUEINDEX <SCHEME_GUID> <SUB_GUID>
                                               <SETTING_GUID> <SettingIndex>

              <SCHEME_GUID>   Specifies a power scheme GUID and may be
                              obtained by using PowerCfg /L.
              <SUB_GUID>      Specifies a subgroup of power setting GUID and may
                              be obtained by using "PowerCfg /Q."
              <SETTING_GUID>  Specifies an individual power setting GUID and may
                              be obtained by using "PowerCfg /Q".
              <SettingIndex>  Specifies which of the list of of possible values
                              this power setting will be set to.

              Example:
                  POWERCFG -SetAcValueIndex <GUID> <GUID> <GUID> 5
                  This would set the power setting's AC value to the 5th entry
                  in the list of possible values for this power setting.
  -SETDCVALUEINDEX
              Sets a value associated with a specified power setting
              while the system is powered by DC power.

              Usage: POWERCFG -SETDCVALUEINDEX <SCHEME_GUID> <SUB_GUID>
                                               <SETTING_GUID> <SettingIndex>
              <SCHEME_GUID>   Specifies a power scheme GUID and may be
                              obtained by using PowerCfg /L.
              <SUB_GUID>      Specifies a subgroup of power setting GUID and may
                              be obtained by using "PowerCfg /Q."
              <SETTING_GUID>  Specifies an individual power setting GUID and may
                              be obtained by using "PowerCfg /Q".
              <SettingIndex>  Specifies which of the list of possible values
                              this setting will be set to.

              Example:
                  POWERCFG -SetDcValueIndex <GUID> <GUID> <GUID> 5
                  This would set the power setting's DC value to the 5th entry
                  in the list of possible values for this power setting.

  -HIBERNATE, -H  <ON|OFF>
              Enables-Disables the hibernate feature.  Hibernate timeout is not
              supported on all systems.

              Usage: POWERCFG -H <ON|OFF>

  -AVAILABLESLEEPSTATES, -A 
              Reports the sleep states available on the system
              Attempts to report reasons why sleep states are unavailable.

  -DEVICEQUERY
              Return a list of devices that meet the specified criteria.

              Usage: POWERCFG -DEVICEQUERY <queryflags>

              <queryflags>  Secifies one of the following criteria:

              wake_from_S1_supported  Return all devices that support waking the
                                      system from a light sleep state.
              wake_from_S2_supported  Return all devices that support waking the
                                      system from a deeper sleep state.
              wake_from_S3_supported  Return all devices that support waking the
                                      system from the deepest sleep state.
              wake_from_any           Return all devices that support waking the
                                      system from any sleep state.
              S1_supported            List devices supporting light sleep.
              S2_supported            List devices supporting deeper sleep.
              S3_supported            List devices supporting deepest sleep.
              S4_supported            List devices supporting hibernation.
              wake_programmable       List devices that are user-configurable
                                      to wake the system from a sleep state.
              wake_armed              List devices that are currently configured
                                      to wake the system from any sleep state.
              all_devices             Return all devices present in the system.
              all_devices_verbose     Return verbose list of devices.
              Example:
                  POWERCFG -DEVICEQUERY wake_armed

  -DEVICEENABLEWAKE
              Enable the device to wake the system from a sleep state.

              Usage: POWERCFG -DEVICEENABLEWAKE <devicename>

              <devicename>  Specifies a device retrieved using
                            "PowerCfg -DEVICEQUERY wake_programmable".

              Example:
                  POWERCFG -DEVICEENABLEWAKE "Microsoft USB IntelliMouse Explorer"

  -DEVICEDISABLEWAKE <devicename> disable the device from waking the system
              Disable the device from waking the system from a sleep state

              Usage: POWERCFG -DEVICEDISABLEWAKE

              <devicename>  Specifies a device retrieved using
                            "PowerCfg -DEVICEQUERY wake_armed".

  -IMPORT     Imports all power settings from the specified file.

              Usage: POWERCFG -IMPORT <filename> <GUID>

              <filename>  Specifiy a fully-qualified path to a file generated by
                          using "PowerCfg -EXPORT parameter".
              <GUID>      (optional) The settings are loaded into a power scheme
                          represented by this GUID. If not supplied, powercfg
                          will generate and use a new GUID

              Example:
                  POWERCFG -IMPORT c:\scheme.pow
  -EXPORT     Exports power scheme, represented by the specified GUID, to the
              specified file.

              Usage: POWERCFG -EXPORT <filename> <GUID>

              <filename>  Specify a fully-qualified path to a destination file.
              <GUID>      specifies a power scheme GUID and may be obtained by
                          using "PowerCfg /L"

              Example:
                  POWERCFG -EXPORT c:\scheme.pow 381b4222-f694-41f0-9685-ff5bb260df2e
  -LASTWAKE   Reports information about what woke the system from the last
              sleep transition

  -HELP, -?   Displays information on command-line parameters.

  -ALIASES    Displays all aliases and their corresponding GUIDs.
              The user may use these aliases in place of any GUID on
              the commandline.

  -SETSECURITYDESCRIPTOR
              Sets a security descriptor associated with a specified
              power setting, power scheme, or action.

              Usage: POWERCFG -SETSECURITYDESCRIPTOR <GUID|ACTION> <SDDL>

              <GUID>       Specifies a power scheme or a power setting GUID.
              <ACTION>     Can be one of the following strings:
                           ActionSetActive, ActionCreate, ActionDefault
              <SDDL>       Specifies a valid security descriptor string in SDDL
                           format. Call POWERCFG -GETSECURITYDESCRIPTOR to see
                           an example SDDL STRING.

  -GETSECURITYDESCRIPTOR
              Gets a security descriptor associated with a specified
              power setting, power scheme, or action.

              Usage: POWERCFG -GETSECURITYDESCRIPTOR <GUID|ACTION>
              <GUID>       Specifies a power scheme or a power setting GUID.
              <ACTION>     Can be one of the following strings:
                           ActionSetActive, ActionCreate, ActionDefault

Some useful things in there for looking into the Vista Insomnia issue are the following commands:

powercfg -lastwake

returns the name of the last device that woke the system.  Here's a screenshot of the output from one of my machines:

image

As you can see in this case the machine was woken up by the USB hub (in this case this is an expected resume - not a random one)

You can also enumerate the devices that can wake the machine with the following command:

powercfg -DEVICEQUERY wake_from_any

If you think that you have found the culprate then you can disable the device with the following command:

powercfg -DEVICEDISABLEWAKE <devicename>

you can then reverse that with

powercfg -DEVICEENABLEWAKE <devicename>

As you can see there is lots more you can do with powercfg, including tuning, exporting and importing power schemes; enabling and disabling hibernate and finding out what sleep states your device supports.  All told a very useful and very well kept secret.

Wednesday, February 06, 2008 8:21:44 PM (AUS Eastern Standard Time, UTC+10:00) #   
Comments [0]  | 

 

All content © 2013, Craig Pringle