Tag | Drivers Posts

This is interesting. I’ve been running this blog on a small PC sitting on my fridge for a couple of years now (your getting content from it now if your reading this from www.binaryrefinery.com) . The server is a stripped down Small Business Server 2003, just running Exchange, Das Blog and a host of projects and half finished ideas. With alarming regularity the server was blue-screening. I’ve taken all unnecessary cards out (sound, firewire etc) and shuffled graphics cards from other machines. However ...
I was listening to an episode of .NET Rocks in which Ted Neward spent some time discussing the direction that languages are going. This was predominantly a discussion of the DSL concepts, but the interview got me thinking about languages and how we design the internal structure of applications. One of the main things that struck me was that something about objects has never felt quite natural. I have never found a decomposition technique that I was satisfied with. Looking at objects as nouns in your ...
In Windows CE: Interrupt Service Thread I discussed the steps required by an Interrupt Service Thread (IST.) Refer to that post for an explanation of the following code. static DWORD WINAPI DSInterruptThread(LPVOID p) { DWORD RetVal = 0; HANDLE hEvent; DWORD SysintrValue; DWORD IRQ = MYDRIVER_IRQ; // Create an Event hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); // Register with the Kernel KernelIoControl(IOCTL_HAL_R... &IRQ, sizeof(DWORD), &SysintrValue, sizeof(DWORD), NULL) ...
An Interrupt Service Thread (IST) is the way that drivers in Windows CE service an interrupt. Typically, a driver will contain a thread function that handles the interrupt, and does nothing else. A typical IST will do the following: 1. Create an Event 2. Register with the kernel 3. Set the thread priority 4. Wait for the event to be signaled 5. Service the hardware 6. Tell the kernel that the interrupt has been serviced 7. Repeat steps 3, 4 and 5 There are certainly variations in how ISTs are written ...
I have installed Windows 7 on “bare metal” on one of my machines. This was a laptop that I work with and it was a very easy install. First off, it was the quickest OS install that I have ever experienced. You can tell that Microsoft spent some significant time working on the performance and quality of the install and bravo to the team that worked on that feature! I also used the 64-bit version of the operating system. More and more people are turning to 64-bit and it is really starting to be the ...
Ciao, I'm Valter Minute, I'm a software developer working for Fortech Embedded Labs (www.fortechembeddedlabs.it), in Saronno, Italy. I'm Italian, and this should explain my poor english and excuse it, I hope. I was born in 1973 and I work on Windows CE since the beginning of this century (sounds like a lot of time written in this way). I started developing application on version 2.12 of the OS and then moved to BSP, drivers and other low-level stuff from version 3.0 on. I try to provide some helpful ...
Yes, I'll admit, I'm a sucker when a new windows operating system comes out. After all, I come from the MS DOS era and witnessed the series of Windows products like version 1.0, 2.0, 3.0 3.1 aka NT, 3.11, 3.5, 95 (remember the lines at the store!), 4.0, 98, 2000, XP, Vista and now 7! After the installation, I quickly noticed how fast the install was. Now, I know this is a BETA version and I was wondering if this was stripped on purpose without the extras loaded in a final copy for this quick install. ...
The UIProxy source code can be downloaded from: Download UIProxy Source Code In Windows CE 6.0: Using UIProxy I discussed how to use CeCallUserProc() and the UIProxy. I showed some simple code for displaying a very simple MessageBox(). For this post, I thought that it would be interesting to flesh that out a little more and create a user mode DLL that wraps MessageBox() and allows the driver to do everything with MessageBox() that it might do if it was calling it directly. Almost everything, except ...
Starting with Windows CE 6.0 kernel mode drivers cannot call User Interface (UI) functions. To overcome this Windows CE 6.0 provides the UIProxy and a new function, CeCallUserProc(). Kernel mode drivers can call CeCallUserProc() to request that a user mode dll be loaded and a function in the dll be called. When writing the driver, also write the user mode dll and provide functions that will present a UI for the driver. Luca Calligaris was nice enough to provide an example function in response to ...
I've been an avid user of Windows 7 pre beta ever since we got a build at the PDC conference in Los Angeles in October 2008. I installed it in dual boot on my work laptop, as explained here. There were a few minor kinks that forced me to keep Vista on this machine. The most annoying was that it was impossible to debug Silverlight on that build. Well, happy to report that this annoying bug is gone now, and I can develop and debug Silverlight on Windows 7 now. Let's see other problems and what happened ...
Many of you already know about the use of the C/C++ keyword volatile, but I was having a discussion with a colleague this afternoon and the topic came up. The colleague is a bright up and coming engineer who finds himself writing software, but really wanting to design hardware. He was telling me about a test that he wrote to estimate the CPU speed of a board. Simple little application, get the current milliseconds using GetTickCount(), then run a busy loop. When the loop completes call GetTickCount() ...
I am not sure how many out there have machines that are capable of running a 64 bit operating system, but my new machine is. I originally installed x86 Vista (32 bit) and pretty quickly removed it in favor of Windows XP. I know that I am not the only one who has done that. I have been reading quite a bit that Vista is Windows ME version 2 (for all of you out there that remember that catastrophe). Vista was operating like it had a boat anchor around it’s neck even with system specifications like Intel ...
If you have looked at my other posts on stream interface drivers, you have seen that the registry settings that I use for Driver Shell are: [HKEY_LOCAL_MACHINE\Drivers... "Dll"="DriverShell.dll" "Order"=dword:4 "Prefix"="XXX" "DeviceArrayIndex"=dword:1 "IClass"="{A32942B7-920C-48... I thought that I would discuss these a little more, and includes some other settings. Let’s start with the key HKEY_LOCAL_MACHINE\Drivers\... The key HKEY_LOCAL_MACHINE\Drivers\... ...
Hosting Your Own Websites For years now I’ve been building our company websites on external hosting systems. The problem has always been that I have limited control over the hosting environment. During the past year my host has been webhost4life and they do a good job of providing services including DotNetNuke but my desire to host multiple websites made hosting in-house more and more attractive. I’ve accumulated 18 domain names from Network Solutions over the years and I really wanted to build sites ...

Ever had the issue, when you think you're laptop is powering down.  Place laptop in bag only to find a while later  laptop didn't power down and has done a nice job in warming up your bag?

This phenomenon has been happening more and more to me, as the graphics drivers are causing a crash when my machines attempts to hibernate.

I just thought we'd better give this syndrome a name.    I've called it 'Hot Bag Syndrome'

At the last Professional Developer Conference in Los Angeles, the attendees were given a pre-beta version of Windows 7, Vista's successor operating system. I installed it on a virtual machine and was very impressed by the performance of Windows 7. Since I just got my new laptop (Alienware m15x) and have been installing stuff anyway, I thought I would give it a try and install Win7 in dual boot on this machine. This is the report of the experiene. Read the rest of this entry » ...
I'm writing this post for two reasons: 1) To preserve the details of the steps I took to get this all working, and also 2) To help others who might be looking to do the same thing. While I'm not a complete Linux noob, some simple things still are not clear to me, and in other cases, there is conflicting information available on getting DD-WRT running with USB and Samba, so I'm clarifying here what worked for me. Background I've had a Windows server running over the years for various reasons. As of ...
All right, I've had enough. It's time for me to issue a decree: Henceforth, programmers who wish to use the clipboard must be licensed in the same fashion as automobile drivers are licensed by the Department of Motor Vehicles. (Yes, yes, we call it the Secretary of State's Office here in Michigan; but more people know it as the DMV.) 1. Before you may use the clipboard to copy code, you must take 20 hours of classroom instruction on how not to use your clipboard. 2. Before you may be fully licensed ...
So, I got new branded Asus R50A UMPC for test. This ultra mobile machine with 5.6" WSVGA (1024x768) screen, based on Intel US15W chipset, comes with Intel Atom Z520 (1.33 Ghz, 533Mhz) processor, 1Gb of RAM and 20GB SSD. Also it has 3.5G mobile unit, integrated 802.11b/g network card and GPS. First impression was very cool. Slick design, big screen build in fingerprint reader. What in the box? Power adapter (110/220V), compact keyboard, bunch of cables, extra stilus and handling strap. What else this ...
Yuqun Cao, SDE, Windows CE JDP of Microsoft, released a whitepaper on enhancing BusEnum a few months ago. I finally had a chance to read it yesterday and was impressed by the additions that he made to BusEnum. The changes allow for drivers to be loaded asynchronously. This change can be used to speed up the perceived time to boot a Windows CE system to the desktop or a kiosk application. The BusEnum that comes with Platform Builder loads drivers one at a time. It loads the drivers using ActivateDeviceEx() ...
So you need to change the driver loaded for a given device from your application. You have a couple of options to do this. The first method is to use the UpdateDriverForPlugAndPlayD... API. This method is simple and straightforward to use. But the downside of using this API is that it will update drivers for all devices with the specified hardware id. So if you need to selectively update one of the devices with a new driver you will have to look for something else. And that method is by using ...
Well, Windows 7 is going to be released by the end of next year. This is great news, because it seemed, that Microsoft finally understand how to get the best of Windows Vista and make it to work not only on monster machines. It even works on new brandy my wife's pinky machine. And if it works there and my wife is happy with it, this OS going to be very impressive. But from the other hand, we, as developers should be ready today to developer Windows 7 ready application (by the way, Vista Battery Saver ...
SqlDataAdapter Use this data adapter object to bind SQL data sources. Using SqlDataAdapter Object Using System.Data.OleDb; // do not forget your namespace ------------------------------ Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt ...
SqlDataReader Use this datareader object to bind SQL data sources. Using SqlDataReader Object Using System.Data.SqlClient; // do not forget your namespace ------------------------------ SqlConnection conn = new SqlConnection(connectionStr... conn.Open(); SqlCommand comm = new SqlCommand("select * from [My_Table]",conn); comm.CommandType = CommandType.Text; SqlDataReader dr = comm.ExecuteReader(); while (dr.Read()) { TextBox1.Text = (string)dr["info"].ToString(); //datareader object accepts 2 overloads ...

Note: The Wireless network at the keynote failed miserably, so this will be posted with a delay.

Bringing together software + services

Presents Windows Live Essentials and Windows Live Services. Using Windows Live Services is optional, so you can use your own services (pop for example) instead.

Read the rest of this entry »
I pulled some old source code off the shelf recently, dusted it off and started modifying it. Okay, that was my first mistake… I really should have tested it first but that actually would not have helped this time. When the system booted up, it successfully loaded drivers and then when it came to loading Explorer.exe all heck broke loose. Sometime the desktop would appear and other times it would not. When the desktop would appear, GWES would data abort. The system was a mess, and needed to be fixed. ...
Windows Vista: Pros and Cons I just bought a laptop which has Windows Vista. Since I wasn’t sure if it’s feasible to keep it with this Operating System, I researched to see the advantages and disadvantages of Vista. Here is what I gathered out of personal use and research What I love about Windows Vista: · The increased security, although you can also get this by having Service Pack 3 on Windows XP · The new looks, which in my opinion are way better than those of Windows XP · The side bar is a nice ...
Some months back I bought a HP 6910p laptop which included a HSDPA card, and it even came with a Vodafone SIM. I did look at the data plan from Vodafone; £15 per month for 3Gb of data, with no minimum contract. I liked the idea of a larger data allowance than the 40Mb I currently have with my T-Mobile contract. I’ve never upgraded this original Web’n’Walk contract; I get 200 minutes, free answer phone collection and 40Mb of data for £16.50 per month. If I upgraded to get 1Gb of data (with laptop ...
I thought I needed to post this as it took me a while to find the official MySQL drivers for .NET and VS2008. I found the drivers here. The current version 5.2 has the following features: A new profile provider has been implemented along with a fully revamped provider schema. New bulk loading and script execution classes are available. The ability to clear a single or all connection pools. Integration into Visual Studio 2008 MySqlDataAdapter now supports batching BINARY(16) columns are now treated ...
Recently, there have been a few questions in the newsgroups about the serial debug port. The questions were along the lines of: · Which COM port do I use for debug output? · How do I change the COM port that is used for debug output? These are actually quite common questions, so I thought I would address these. Every CPU and/or UART is different so I won’t give you a how to lesson, but I will provide you with enough information to look inside your BSP to figure it out for yourself. First, let’s address ...
In relating the last post to someone (another productivity enhancer this exercise fosters), I was reminded of a similar exercise I went through 'back in the day' at either Sperry or Honeywell, I don't remember which version of the company it was at the time. I was at a point in my career that I was learning Windows programming, and they were trying to figure out where to put me. So I found myself in 'Desktop Support' for a while. This was about the time that Viasoft almost imploded by having some ...
Windows CE provides several ways to synchronize threads and access to data by multiple threads. These include the synchronization objects that are typical for a multithreaded operating system: mutex, semaphores, events and critical sections. These synchronization objects may be overkill for protecting access to a single variable. The Interlocked functions can be used to control access to a single 32 bit variable. The interlocked functions are: Function Name Action InterlockedCompareExchange Compares ...
Windows Embedded CE 6.0 Fundamentals by Stanislav Pavlov and Pavel Belevsky is one of the first books about developing a Windows CE device using Platform Builder available in several years. As the name states, this book contains the fundamentals of developing using Platform Builder. It does not venture into too many details though, so this is a book for beginners, not beginning programmers, but beginners with Platform Builder. This book is fairly short at 230 pages, as technical books go, so reading ...
I have written about cloning code from the Public tree to a platform in the past, but someone recently asked about cloning an MDD lib build directory. More specifically the question was about cloning ufnmdd.lib in Windows CE 5.0, which is actually created by linking three separate libs together. In this article, I will walk through the process by cloning one of those libs. Ufnmdd.lib is created by linking ufnmddbase.lib, ceosutil.lib and defbuslib.lib. I suspect that most people don’t really need ...
Welcome back from Summer! The Minneapolis – St. Paul IIBA Chapter is looking forward to seeing everyone in September. At our meeting on the 11th, we will be providing important Chapter information, including announcements for our October 2008 meeting with SafeNet Consulting, Professional Development Days later in October and our Chapter Board of Director elections in November. We will also have information for those interested in participating in elections available at the meeting. Meeting Data and ...
O.k., I'll admit, the first time that I used windows Vista backup, I was very underwhelmed, but it's grown on me, and now I'm a huge fan. On Monday, I received a new hard drive from Dell. It's bigger and doesn't make strange clicking and stalling noises like the old drive did. :) I was pretty certain that the old drive was going to go. To swap out the drives, I plugged in a USB drive with sufficient capacity and did a windows backup complete pc backup. Once that was finished, I plopped in the new ...
The DriverShell source code can be downloaded from: Download DriverShell Source Code Windows CE runs on many battery powered devices and therefore needs to be able to minimize the power consumption to maximize battery life. To do this Windows CE has a power manager that can be used to notify device drivers when the system power state changes. Drivers can then respond to the notification by powering down the hardware that they manage. Basic Power Management The most basic power handling that a driver ...
You just created a new Stream Interface driver, but it isn’t being loaded. I hear this a lot and thought it would be good to look into the possible causes. Hopefully, if you are here you have already reviewed Windows CE: A Stream Interface Driver Shell which provides a very basic driver an all of code and other files to demonstrate a driver that actually loads. The first things to check: 1. Is the driver in you OS image? Check to see that it is in %_FLATRELEASEDIR%\ce.bib. 2. Do all of the functions ...
In the DriverShell Example that I posted (Windows CE: A Stream Interface Driver Shell), I included an XXX_Init() function that didn’t do very much. This post will discuss the things that you can do with XXX_Init(). For reference, this is the function as I originally posted it. DWORD XXX_Init(LPCTSTR RegistryPath, DWORD dwBusContect) { HKEY hKey; RETAILMSG( 1, (TEXT("XXX_Init\n"))); hKey = OpenDeviceKey(RegistryPath); if ( !hKey ) { RETAILMSG(1, (TEXT("Failed to open devkeypath,\r\n"))); } else { ...
I was working with a customer today and discovered that their application was calling into one of my drivers repeatedly to read 4 bytes at a time, each time reading the next 4 bytes of data. The driver reads a minimum of 4 bytes, or they probably would have read less, but the driver is capable of reading large quantities of data on each call from the application. This really isn’t all that uncommon though and it actually will read the data correctly. The problem is that each call to the driver has ...
This post is part of a series called Ignite Your Life. For background info on the series, please refer to previous posts on introducing the series and The 5 R's. Albert Einstein called reality a very persistent illusion. That’s a pretty deep statement to make, and one that I won’t dive into in this blog post. But when we consider it relationally, who we are and what we present to people is definitely an illusion. Nobody knows our inner thoughts, nobody knows what the drivers are of our life. What ...
Following the debranding of the Nokia N95 8GB, updating the phone's firmware, and reconnecting it to the TomTom Rider, I managed to set up the connection. In June, I performed a real life test. With the TomTom, the phone, and the motorcycle, I went for a trip abroad. Just before I left, I checked the data packet plan for my subscription (Vodafone Live, The Netherlands). At home, it is a flat fee subscription with a fair use policy. Abroad, the packet data connection is causing additional cost. Drivers ...
In my post about a basic driver shell, I assumed that the driver was built into the system including the registry settings to cause the device manager to load the driver when the system booted. Sometimes there is a reason to load a driver when an application starts. For that there are several functions that can be used including; RegisterDevice, ActivateDevice and ActivateDeviceEx. RegisterDevice is maintained for backward compatibility, but for future compatibility you probably should start using ...
When we first ported our BSP to Windows CE 6.0 we started to see this VMProcessPageFault Error: Page Fault message in our debug output during resume from sleep. The system seemed to be working okay, but this message seemed ominous so as we continued to work on the port we kept an eye on the problem and investigated the possible cause of the message. Others had reported this message and they discovered the cause was that they had a driver that was calling a system API in XXX_PowerUp. Microsoft has ...
Previously, I introduce a Stream Interface Driver that was just a shell of a driver or a driver that didn’t do anything useful. I thought that it would be good to flesh it out a little and add some code to demonstrate some driver features that are fairly common. To get started, let’s flesh out the first function that gets called when the driver loads; DllEntry(). DllEntry() is typically fairly basic, but does some important things. First, I will fill in the function, and then I will discuss what ...
If any tanker drivers read this, then please don't take offence and use this as an excuse to stage another strike to shirk out of work for a few days. The other day I was nipped out to buy a sandwich on my lunch break and decided to walk to a petrol station near to where I work. I decided to give my wife a phone call and see how her day was going, anyway I was about wrapping up the conversation as I approached the petrol station. The petrol station was also having a delivery of fuel, this fuel tanker ...
Five years ago, I wrote an article about creating a Catalog file for Windows CE 4.0. How time flies, and how the tools get better as we go. That article turned out to be 10 pages when printed; this one should be much shorter because the tools have become much better. What is the Catalog and why would we want to change it? The Catalog is a collection of components that can be added to your project. These components include OS features, like Internet Explorer, and Board Support Packages (BSP). If you ...
I've been setting up and configuring my brand new Toshiba M700 TabletPC, a very nice upgrade from the M200, though lacking in screen resolution. The main reason I went for a larger Tablet was for the performance to run Virtual PC images. This was great until I noticed that the ibeam cursor in all of my virtual machines would disappear. This is extremely disconcerting especially since most of my work is in Visual Studio, where guess what, there is an editor that displays the ibeam cursor. Not good. ...
I recently posted a sample stream interface driver (Windows CE: A Stream Interface Driver Shell) and claimed that I included enough to cause the driver to be loaded by the device manager. The following code is how I know that it loaded. This code enumerates the running drivers using FindFirstDevice() and FindNextDevice() which are included in the device manager functions. There are several options for enumerating the drivers, this example uses DeviceSearchByLegacyName. I include this function in ...
Note: In Windows CE: Stream Interface Driver Power Management I have included a download of the source code for this driver. I thought that it might be useful to have a shell of a stream interface driver that I could use to start developing a driver from. I can’t believe that I never created this before, but here it is. I called this driver “DriverShell” because that is all that it is, a shell of a driver. This is a very basic starting point for creating a new driver. I have tested that this driver ...