Welcome to MSDN Blogs Sign in | Join | Help

January 2005 - Posts

Relaxen und watchen das blinkenlights. What lights?

In the old days, computers had blinking lights. Indeed, old movies used to show computers working with blinking lights and tape reels moving back and forth. My school computer was a PDP-8/L with a whopping memory of 4K 12 bit words back in 1971. (Here’s
Posted by Calvin_Hsia | 24 Comments
Filed under: ,

Undocumented APIs and 16 bit DLLs

As a long time software company, Microsoft has certain procedures to follow when releasing software to the public. A change to the policy was instituted at Microsoft last year. A brand new tool would scan all released software to see if any “undocumented”

Intercept power broadcast messages: How do you tell if Bindevent is really successful? SendMessage!

Question: BINDEVENT( ) always returns 1 when a Windows message event binding is created. Soooo, how do you know it was actually successful? If I always get a 1 from BindEvent() and AEVENTS() is always populated, all regardless of success, how do I know
Posted by Calvin_Hsia | 2 Comments

How to use a COM interface when there is no COM object ?

I was asked a question: In VFP9 I am attempting to access StructuredStorage via the stgOpenStorageEx function in OLE32.DLL ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/stgopenstorageex.asp ). I am ok with that. The catch
Posted by Calvin_Hsia | 2 Comments

Decoding the timestamp in class libararies and forms

I was asked Is there a way to translate the timestamp in a VCX to a human readable format? Visual Foxpro puts a timestamp on many records in the table that represents a form or class library. Historically this field was used to match records across supported
Posted by Calvin_Hsia | 3 Comments
Filed under:

Heartbeat: Garbage collection in VFP and .NET are similar

VFP stores user defined names such as variable, field, property, class and procedure names in a table. When the name table runs out of space, the GC begins. All the entries are marked as unused. Then all the various name table clients are sent a message
Posted by Calvin_Hsia | 3 Comments

User Interface design for numeric keypads

I have just read Raymond’s User interface design for interior door locks which reminded me of a curiousity. Take a look at your telephone’s numeric keypad. The top row of buttons on mine is 1,2,3. Now look at your computer keyboard numeric keypad or a
Posted by Calvin_Hsia | 17 Comments
Filed under:

Permutations

I saw this post which shows some VFP code to permute a string. For example, there are 6 permutations of “abc”: abc, acb, bac, bca, cab, cba There are n! permutations of a string of length n. I dug up some old code that did the same thing in fewer lines.
Posted by Calvin_Hsia | 2 Comments
Filed under:

Wite your own RSS News/Blog aggregator in <100 lines of code

The internet is a great way for people/entities to publish information. An RSS reader is a tool to help funnel only the information that you think is important to you. You can subscribe to RSS sources (Blogs, news sites, businesses, authors) by choosing
Posted by Calvin_Hsia | 9 Comments

Do you like reading a blog author? Retrieve all blog entries locally for reading/searching using XML, XSLT, XPATH

If you like reading a particular blog and want to read more from the same author, you can subscribe to the blog using RSS and any number of blog readers, such as newsgator , intravnews . This will get a few current entries (RSS is limited to 15 entries
Posted by Calvin_Hsia | 5 Comments
Filed under: ,

Use a simple XSLT to read the RSS feed from a blog

On most Blogs, there is a link called “Syndication”,”RSS”, or “XML” that is the RSS feed. Click on that, and you see an XML document that contains some recent blog posts. This simple code reads the RSS feed for my blog, does an XSLT transform of the XML
Posted by Calvin_Hsia | 13 Comments

What is an index anyway?

Foxpro’s legendary speed is due in part to its index technology. About 14 years ago, the speed of Foxpro was demonstrated to live audiences around the country. A table (places.dbf) of almost 3 million streets in the US was used as the demo data (about
Posted by Calvin_Hsia | 10 Comments
Filed under:

Binding to Windows Events for Fox windows

In a prior blog I described a demo I gave at Las Vegas Devcon that showed how to bind to Windows Events to respond to Windows Shell notifications. Another demo I gave at Devcon was a simple program that bound to Windows Events to trap for window activation,
Posted by Calvin_Hsia | 3 Comments
 
Page view tracker