Tuesday, March 29, 2011
The fourth of my Windows 7 development screencasts - Trigger Started Services
- has been published. It uses the recipe
(also recently published on Code Gallery) to simplify writing a service in managed code that starts only when it is notified by the operating system of a particular trigger. In my screencast I use the example of a USB device being plugged in. There are plenty of other triggers you could use. Adopting a trigger-started approach makes your service:
- easier to write and install. No sleeping, looping, having a config file to say how long to sleep for, etc.
- use less CPU when there's nothing to do
- respond more quickly when there's something to do. It's not in the middle of sleeping for 10 minutes or 2 hours -- it is started the moment the trigger happens.
It's a win all around and if you have a service you should take a look at the available triggers and see if you can convert yours.
Sunday, March 27, 2011
The screencasts for restart and recovery
in native and managed code went live before the associated recipe was published. Now the recipe
is on Code Gallery ready for you to use. As it says there:
This recipe provides guidance and an easy way to start using these great
features in your application, removing any complication of how and where to
store your application data.
What’s in the box?
This Restart and Recovery recipe includes:
- Complete source code of the recipe and its samples
- Managed .NET assembly
- C++ header and class files to be included in your C++ application.
- C#, and C++ test applications
Give it a try, please!
Friday, March 25, 2011
Charles was busy during MVP summit! In addition to interviewing me
, he sat a number of MVPs down to talk about C++, being an MVP, and the like. They're from all over the world and they have widely different jobs, but you can see how much they love this stuff. And please notice -- they span a wide age range, too. The stereotype of C++ as the language for the grey haired developers is just a myth. If you wonder why anyone still uses C++, and why it's going to be very good for this industry that there are still C++ experts around, watching these videos will be an eyeopener.
By the way, Alon
is also an RD.
Wednesday, March 23, 2011
As you may have noticed the C++ team is really stepping up the communication lately. There have been hours of Channel 9 videos (I pointed you
to some good ones) and Diego has been blogging a lot. Recently he did a long post
(with references!) on Intellisense in C++/CLI - why it wasn't in Visual Studio 2010, why it didn't sneak in with SP1, and so on. Here's a level of transparency you just don't see these days:
...we simply underestimated the amount of work it would take to implement C++/CLI
in this codebase, and we couldn’t change our plans by the time we realized
it. ... In the end it was one of those hard cuts you have to make when dealing with
the real world resource and schedule constraints. It turned out that the work
was also too much work to fit into SP1. As soon as we wrapped up VS 2010, we
started work on C++/CLI IntelliSense, but it wasn’t ready in time for SP1. We
realize this wasn’t what you wanted to happen and an explanation doesn’t help
you get your work done if you are affected by this, but we want you to know the
Wow. Makes perfect sense and is actually a nicer reason than "we think you don't matter". Yet so few teams will hold their hands up and say this. It happens. It happens to every one of us pretty darn regularly. Kudos to the C++ team for not pretending it was all part of a plan from the beginning to leave it out. And do read the blog to understand just how much they were taking on.
Monday, March 21, 2011
If you listen to .NET-related podcasts, you've probably come across the Pluralcast before. David Starr talks to a wide variety of people and the passion shows, along with the skills. Last year
I appeared on the 'cast myself, talking about Visual Studio extensions. Now I'll be doing a small appearance regularly - still talking about Visual Studio and some helpful extensions or whatever else I want to share. There have been three of these so far:
- #36 - main guest is Scott Allen
- #37 - main guest is Craig Shoemaker
- #38 - main guest is Liam McLennan
I hope you enjoy the whole episodes, and learn a little something from them.
Saturday, March 19, 2011
I'm on Channel 9 a lot right now - partly because some things are getting published that were done a long time ago, and partly because being on campus for the MVP Summit makes it convenient to be interviewed. I love talking to Charles because he really cares about the answers to the questions he asks. So we talked for half an hour
about what it means to be an MVP, what C++ is useful for, what I like about C++0x, and that sort of thing. Since Charles started things off by mentioning previous conversations, let me toss in some links to those too - here's the Barcelona conversation
)and on the couch with the C++ guys
.) You can watch my hair change colour if you watch those oldest-to-newest. Diego was also nice enough to blog about this interview
, too, as was John Bristowe
of Microsoft Canada.
Thanks for the chat, Charles!
Thursday, March 17, 2011
Here's another pair of screencasts to simplify your Windows 7 development. Both cover Restart and Recovery - one is for native developers and the other for managed. As the screencast intros say:
Recovery and Restart (ARR) technologies enable developers to customize an
application's behavior when Windows Error
Reporting(WER) terminates the application due to an unrecoverable error.
For example, it enables an application to perform data recovery and cleanup
operations such as capturing application state and releasing resources before
termination. It also allows developers to specify that WER should automatically
restart an application that it has terminated.
I hope they help you do the right thing when your application blows up or the machine reboots.
Tuesday, March 15, 2011
You know I blog here a lot about Windows 7 goodies including taskbar integration. One of the questions I get pretty often is how to use tasks to communicate with the running app, such as changing your status, sending a new email, that sort of thing. I mentioned in an aside on another post that this requires launching some other application that communicates with the first
If you'd like to do that, it just got a little easier with the release of a "recipe" from Microsoft that packages up this concept and lets you use it with very little extra code. As it says on the Code Gallery page for the recipe:
This Taskbar Single Instance Recipe allows developers to easily develop applications that use "Messenger Like" tasks that change the state of the currently running instance, allowing it to react to incoming state-change notifications and act accordingly.
This Recipe includes:
- Native (C++) and managed (.NET) Source code for the Single Instance library
- Well documented native (C++) and managed (.NET) samples
To compile and run the recipe and samples the following items are required:
- Microsoft Visual Studio 2010
- Windows 7 – Note that only the samples require Windows 7.
Yes, this recipe is actually two recipes - one native and one managed, and comes with whitepapers explaining how it's done. I mentioned this in my Tech Ed Europe talk on Advanced Windows 7 development and it's finally released for you to use! Enjoy!
© Copyright 2023 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Wednesday, March 22, 2023 12:22:25 AM (Eastern Standard Time, UTC-05:00)
On this page....
Pluralsight Free Trial