Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Programming » Visual FoxPro   (RSS)

Examine .Net Memory Leaks

Writing programs using .Net is very productive. One reason is because much of memory management is “managed” for you. In C, C++ and other “native” languages, if you allocate memory, you’re responsible for freeing it. There were stopgap measures, like

Is this a Vista bug?

A customer reported a crash of a VFP application while running under the new version of Windows: Vista. The customer code attempted to automate the configuration of the web server (See Automating Web Site Administration Using IIS ). Specifically, there

Write your own hangman game

Many years ago (1985) I wrote a C program to play Hangman. I had decoded a word processor spelling dictionary for my word source. More recently, I have encoded 2 spelling dictionaries for general purpose use: 1 with 171201 words, the other with 53869.

Windows Security and how it affects running generated code

Here I described how VFP generates executable code and runs it for early and late binding COM clients and implementing COM interfaces. However, there is an important issue with generating and running executable code in the same process. A computer has

What is taking up the space on your hard disk? TreeMap it!

Several years ago, I saw a presentation from Microsoft Research about online communication in communities . In particular, a group was studying online communities based on NewsGroup message traffic volume. One of the results was a graphical view of the
Posted by Calvin_Hsia | 20 Comments

Calling the Windows APIs for Large Files

A customer was trying to use FoxPro to handle large files. The files that Fox handles natively (like tables, indexes) are limited to using 32 bit addressing, (2^32 = 4 gigs). Back in the old days (not that long ago), there were no hard disks > 2 gigs.

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

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 | 7 Comments

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 | 11 Comments

Fox plays music

I received a customer question: I have searched the net and asked as many people as I could and could not get an answer, so I am bothering you. Do you know of a way to get VFP to play mp3 format tunes? There must be a way to use a media player driver
Posted by Calvin_Hsia | 7 Comments

Foxpro Performance tip: field name lookup for tables

When FoxPro opens or uses a table or cursor, internally we have to keep track of the field names used in that table. For example, this statement creates a table with 3 fields. CREATE TABLE foo ( lastname c( 10 ), firstname c( 10 ),address c( 20 )) When
Posted by Calvin_Hsia | 9 Comments

Using non-Automation compatible types

A customer asks: I’m using a third party COM server dll with my VFP8 application. One of its methods requires a structure as a parameter. It seems to me that unlike with dlls, where you can trick VFP into substituting a character string for a structure
Posted by Calvin_Hsia | 3 Comments

Intellisense: inspecting live objects

In this entry I talked about a performance improvement of FoxPro’s object handling. I showed an example of object based programming: oExcel= CREATEOBJECT ("excel.application") oExcel. A live instance of Excel is created. When you type the “.”, intellisense
Posted by Calvin_Hsia | 7 Comments

Unbelievable performance gain by changing an Algorithm

Visual Foxpro added Object Oriented Programming in version 3 which was released about 10 years ago. Back then users weren’t expected to use very many objects. Nowadays, with more memory, users create thousands of objects, and things were slowing down.
Posted by Calvin_Hsia | 7 Comments

Screen Saver Tricks

In a prior blog entry I describe how a couple lines of code can start the currently registered screen saver instantly and how to disable the screen saver. Screen savers are funny animals. They are simply executable programs that typically will terminate
Posted by Calvin_Hsia | 4 Comments
More Posts Next page »
 
Page view tracker