Friday, April 29, 2005

713.aspx

Access Windows CE Databases from .NET CF

João Paulo Figueira shows how to access Windows CE Databases from .NET Compact Framework. It explains the concepts behind the CE property databases and the APIs involved to use them:



  • CeDbApi - Contains all the imported API functions used by the other classes.

  • CeDbException - Type of exceptions thrown by the wrapper.

  • CeDbInfo - Wraps a CEDBASEINFO structure, needed to create new databases and to query existing ones.

  • CeDbProperty - Models a property value.

  • CeDbPropertyCollection - A collection of properties, searchable by property id.

  • CeDbPropertyID - Static class to manage property ids.

  • CeDbRecord - Models a database record.

  • CeDbRecordSet - Implements data access and navigation in the database.

  • CeDbTable - Identifies a database in a volume.

  • CeDbVolume - Models a database volume.

  • CeOidInfo - Retrieves information about an existing database (may be generalized to other object store items).


The example code in the article shows how to use the Windows CE property databases CEDB to access the contacts on the Pocket PC.



Each database comprises only a single table that has no preset structure. Records may have a variable number of fields and only four sort orders are allowed per database. These databases may be created directly on the object store, or mounted on a file.


Although they seem to be quite limited in their definition as well as in their use (one may experience problems on tables with over 1000 records), these databases are quite ubiquitous on the Pocket PC: they support all the PIM applications, support the popular “Pocket Access” format and are directly accessible from the desktop via RAPI.


The Pocket Outlook Object Model makes life easier though if you are interested in Outlook items like Contacts, Tasks and Calendar.

Wednesday, April 27, 2005

712.aspx

Compressible Encryption or No Encryption?

Larry Osterman shares the story behind the Compressible Encryption option in Outlook.



The reason I like this dialog box is the default setting "Compressible Encryption".  Why?  Because if you select it, you're not encrypting ANYTHING.

Monday, April 18, 2005

667.aspx

Textamerica Developer program

Textamerica, the leading photo/video moblog community, recently launched the Textamerica Developer API. They are giving $500 to the first 20 applications (with source code) which they deem to be the most useful to the Textamerica Community as a whole.


There is already a TextAmerica Java client but I did not find .NET client. It is a shame they did not use SOAP and publish a WSDL but decided to use their own call format:



<methodCall>


   <methodName>ta.Moblog.GetMyMoblogs</methodName>


   <params>


      <param><value>MYAPPKEYXXYY77XX</value></param>


      <param><value>MyLogin</value></param>


      <param><value>MyPassword123</value></param>


   </params>


</methodCall>


Via [Darla Mack]

664.aspx

Visual Studio 2005 Beta 2

Visual Studio 2005 Beta 2 is available for download to MSDN Subscribers through the MSDN Download Center and to all others for a nominal fee.

Tuesday, April 12, 2005

655.aspx

How to get COM+ call times from VB and VBScript

I posted earlier on how to get the com+ call times the unofficial way. Someone asked for a VB example so I put together a com+ call time toolkit that contains the com+ call time tracker and a VBScript example client. You can do a lot of neat stuff with it:



  • Use it a ASP page to monitor the call time of your components live

  • Use Cacti to show how average call time changes during the day.

  • Use the COM+ Admin API to automatically shut down/recycle components with high call times

Installation



  • Download the egilh Com+ Tracker

  • Extract the files

  • Register the DLL in COM+ or run regsvr32 EgilhComTracker.dll in the directory where you extracted the files

Usage
The egilh.ComTracker object only has one method: string getStatistics()


It returns a xml formatted string that contains information about all the running applications. The XML has the following layout:
/applications
  /application
     /classes 
         /class


Example:


<applications>


      <application>


      <guid>{98CDBB6E-3CAF-46F2-ABE6-EABECD6AA4EB}</guid>


      <ID>10</ID>


      <processID>1792</processID>


      <statistics>


            <callsPerSecond>0</callsPerSecond>


            <totalCalls>0</totalCalls>


            <totalClasses>1</totalClasses>


            <totalInstances>1</totalInstances>


      </statistics>


      <classes>


            <class>


                  <progID>Test.Sleep.1</progID>


                  <bound>1</bound>


                  <inCall>0</inCall>


                  <pooled>-1</pooled>


                  <references>1</references>


                  <responseTime>120</responseTime>


                  <callsCompleted>0</callsCompleted>


                  <callsFailed>0</callsFailed>


            </class>


      </classes>


      </application>


</applications>



Test client
The following VB code shows the call times for all classes registered in com+ on the local machine.


Dim oTracker 'As Object


Dim sResult 'As String


Dim oDOM 'As DOMDocument30


Dim oNode 'As MSXML2.IXMLDOMNode


 


'Get the com+ call times


Set oTracker = CreateObject("egilh.ComTracker")


sResult = oTracker.getStatistics()


Set oTracker = Nothing


   


'Display call times


Set oDOM = CreateObject("MSXML2.DomDocument.3.0")


oDOM.loadXML (sResult)


For Each oNode In oDOM.selectNodes("/applications/application/classes/class")


   WScript.echo oNode.selectSingleNode("progID").Text & _


          " call time: " & oNode.selectSingleNode("responseTime").Text


Next


 

Thursday, April 7, 2005

651.aspx

Dog house for Sydney

With some help from our little friend;


I finished the dog house. It was inaugurated before I finished the walls:


He is growing like mad but letting us sleep at night after moving outside so I should finally have some time, and energy, to get back to some development and technology posts (if I resist posting about MotoGP this weekend :-)

Friday, April 1, 2005

638.aspx

Sydney's first night out

Tonight is Sydney's first night sleeping outside.


We have spent most of the week getting him used to the idea. He has had two places to sleep from the beginning (probably a bad idea but that's life). One inside in the kitchen where he has spent the nights so far, and one outside on the stairs where he rests/sleeps during the day when we are outside. Yesterday evening he even fell asleep on his place outside on the stairs but woke up before we went to bed. Things started very well (not more than a couple of minutes crying) but has degraded to a long concerto of various cries now that he is about to fall asleep for the night. I feel guilty as hell but going out just shows him that someone comes as long as he cries long or badly enough.


I cannot wait to get a decent night of sleep after waking up several times a night to take him out for a leak. The first nights were a nightmare as he woke up 4-5 times a night but we have all learned. I take away his food after we have eaten dinner and play and/or go for a walk before going to bed to make him tired. Both seems to have helped as he has slept until 5:30 the last couple of days.


Getting more sleep and energy will be great. My blogs have suffered and so has my reading (but my spending):



  • Make Magazine: It -hurts- to look at the magazine and not read it. There is so much cool stuff in there that I know I will not put it down when I start reading it.

  • The latest edition of Wired: idem

  • Neal Stephenson: Snow Crash

  • Neal Stephenson: Quicksilver

  • Silvia Ziche: Olimpo S.P.A.

  • Silvia Ziche: Amore Mio

  • Tim Dorsey: The Stringray Shuffle

  • Tim Dorsey: Orange Crush

  • James Patterson: The Jester

  • Cory Doctorow: Down and Out in the Magic Kingdom (signed)

I also got Futurama season 2 + 3 + 4 on cheap on eBay which I guess I will watch in the next millennium at this stage.