Friday, October 05, 2007

I'll Need This Later Note To Self: .Net and MAPI/CDO Don't Mix

mstehle: The CDOs and CDONTS of Messaging Development - FYI: Why are MAPI and CDO 1.21 not supported in managed (.NET) code?

"The issue of using MAPI or (most commonly) CDO 1.21 in managed (.NET) code is one that comes back to us a lot on the Messaging Developer Support team. Both the messaging technologies in question and the .NET framework have been around for many years at this point. As well have the KB articles that state the supportability [GD: i.e. that MS doesn't support Managed usage of MAPI/CDO1.21] of Outlook and Exchange APIs in managed code. There are three main contributors to steady stream of cases we see – even today – where customers are using MAPI and CDO 1.21 in managed code…

...

Okay, I've heard that before so why exactly is using MAPI or CDO 1.21 not supported in managed code?

MAPI has its own memory management model that conflicts with and is incompatible with the .NET runtime. This the primary reason that MAPI and CDO 1.21 are not supported running in a .NET process. The common symptoms you will see are seemingly random Access Violations and very often memory leaks (especially with CDO 1.21). There is no methodology for avoiding or managing these symptoms by using interop libraries or managing references in a particular fashion in your .NET code – it just won't work.

The trap is that CDO 1.21 and .NET can "appear" to work and you can get pretty far in your dev cycle before you run into problems. Many times we see this come up in soon after a solution is released to production, in late cycle performance testing, or in a pilot program. ...

...

Fine, I won't use .NET and MAPI or CDO 1.21 in the same process but I still need to write this application – now what?

The simple answer is you either need to not use .NET or not use MAPI or CDO 1.21. So how do you make that decision?

...

...If you really feel that CDO 1.21 or MAPI is your best option based on the business requirements of what your application must do then by all means use CDO 1.21 – just plan to use it *out of process* from your .NET code."

So in short create an out of proc ActiveX EXE in VB6 (or C++, etc) to contain your MAPI/CDO code and access it via interop...

Two New Vista Reliability/Performance Updates

Nick MacKechnie's Weblog - Two new updates for Windows Vista published yesterday

"An update is available that improves the compatibility, reliability, and stability of Windows Vista
http://support.microsoft.com/kb/941649

This update resolves some compatibility and reliability issues in Windows Vista.

Cumulative update rollup for USB core components in Windows Vista
http://support.microsoft.com/kb/941600

This update resolves some reliability issues in the USB core components on the Windows Vista operating system." [Post leached in full]

An update is available that improves the compatibility, reliability, and stability of Windows Vista

"... This update improves the compatibility, reliability, and stability of Windows Vista. This update includes the following improvements:

  • It extends the battery life for mobile devices.
  • It improves the stability of portable computers and of desktop computers that use an uninterruptable power supply (UPS).
  • It improves the reliability of Windows Vista when you open the menu of a startup application.
  • It improves the stability of Internet Explorer when you open a Web page.
  • It improves the stability of wireless network services.
  • It shortens the startup time of Windows Vista by using a better timing structure.
  • It shortens the recovery time after Windows Vista experiences a period of inactivity.
  • It shortens the recovery time when you try to exit the Photos screen saver.
  • It improves the stability of Windows PowerShell.

This update also resolves the following issues in Windows Vista:

  • A compatibility issue that affects some third-party antivirus software applications.
  • A reliability issue that occurs when a Windows Vista-based computer uses certain network driver configurations.

..."

Cumulative update rollup for USB core components in Windows Vista

"...Issues that are fixed in the update rollup

925528 (http://support.microsoft.com/kb/925528/) Stop errors occur on a Windows-based computer that has 2GB or more of RAM and is using an NVIDIA nForce USB controller

929734 (http://support.microsoft.com/kb/929734/) You may experience problems after you resume a Windows Vista-based computer from sleep or from hibernation

930568 (http://support.microsoft.com/kb/930568/) Error message when you try to put a Windows Vista-based computer to sleep or into hibernation: "STOP 0x000000FE BUGCODE_USB_DRIVER"

929478 (http://support.microsoft.com/kb/929478/) After you use the Safely Remove Hardware option to remove a built-in optical drive from a portable Windows Vista-based computer, you may be unable to reconnect the drive

930570 (http://support.microsoft.com/kb/930570/) Error message in the Usbhub.sys process when you wake a Windows Vista-based computer from sleep or from hibernation: "STOP 0x00000044"

928631 (http://support.microsoft.com/kb/928631/) A USB device may no longer work correctly after Windows Vista resumes from sleep or from hibernation

933433 (http://support.microsoft.com/kb/933433/) Recording quality is poor when you use a USB microphone on a Windows Vista-based computer that has 4 GB of RAM or more

933442 (http://support.microsoft.com/kb/933442/) A USB composite device does not work after you disable and then enable the device in Device Manager on a computer that is running Windows Vista

934633 (http://support.microsoft.com/kb/934633/) When you connect a USB multifunction printer device to a Windows Vista-based computer, a second instance of the printer object is created, and the first instance no longer works

934796 (http://support.microsoft.com/kb/934796/) Error message on a Windows Vista-based computer that is running a USB composite device: "STOP 0x000000FE"

933824 (http://support.microsoft.com/kb/933824/) The Safely Remove Hardware feature and the Windows Explorer "Eject" command do not work correctly with an Apple iPod that is connected to a Windows Vista-based computer

935782 (http://support.microsoft.com/kb/935782/) A USB device takes a long time to resume from "selective suspend" mode on a Windows Vista-based computer that uses UHCI USB controllers

935783 (http://support.microsoft.com/kb/935783/) When you resume a Windows Vista-based computer from sleep, you may experience unexpected behavior from a USB device

The following issues were not previously documented in a Microsoft Knowledge Base article:

  • When the computer resumes from a suspend state or from a hibernation state, the computer stops responding. Additionally, you receive a "0x9F" stop message on a blue screen.
  • The computer takes a long time to resume from a suspend state or from a hibernation state.
  • The computer takes a long time to resume from a suspend state or from a hibernation state when you use a VIA controller.
  • The computer stops responding when you use an AuthenTec USB fingerprint reader. Additionally, you receive a "0xFE" Stop error on a blue screen or a "0x9F" Stop error on a blue screen.
  • The computer stops responding when you use a USB Bluetooth audio device.
  • The computer takes a long time to resume from a suspend state or from a hibernation state when you use an Enhanced Host Controller Interface (EHCI) controller.
  • The computer stops responding when you remove a USB device. Additionally, you receive a "0xFE" Stop error on a blue screen.
  • When a computer resumes from a suspend state or from a hibernation state multiple times, you receive a "0xFE" Stop error on a blue screen.

..."

Now that's a number of updates...

Installing them now (keeping my fingers, toes and eyes crossed that nothing "bad" happens ;)

These were also mentioned by Mary Jo Foley,  "Accounted for: The five mystery Vista updates to be added to SP1," as being part of Vista SP1.

 

Related Past Post XRef:
Vista "SP0.5" (KB938979 & KB938194) Now Available on MS Downloads

 

Update 10/5/2007 @ 9:50AM PDT:

Be careful with the "An update is available that improves the compatibility, reliability, and stability of Windows Vista" update. You may want to hold off installing it if you have Windows Live OneCare 2.0 Beta installed...

Since I installed it, Windows Live OneCare (2.0 Beta) will not start for me. So now I'm getting totally nagged by Security Alerts.

Uninstalling the update has not helped.

So now I am playing the "get my system working as it was before" game...

Update 10/8/2007 @ 9:55AM PDT:

To close the loop on this...

After a number of uninstalls, reinstalls, reboots, reboots and more reboots this weekend my system is working as expected WITH the above updates AND OneCare 2.0 beta.

So all's well that end's well?
(But I'm afraid to reboot... LOL. But that's one of the things I love about Vista... I rarely have to reboot. Sleep/hibernate works so well now... :)

Wednesday, October 03, 2007

Operational Guidance for Team Foundation Server (Think Service Accounts, Permissions, Backup, Monitoring, etc)

Visual Studio Developer Center  - Operations Guidance for Team Foundation Server

"...You can use this guide to help you understand your deployment of Team Foundation Server and keep it running throughout the software-development life cycle. Team Foundation Server depends on an alignment of permissions, configuration information, and service accounts across the components to operate correctly. These components include not only Team Foundation Server itself, but also the technologies on which it depends, such as Microsoft Windows SharePoint Services and Microsoft SQL Server Reporting Services. If you understand how these components interoperate, you can more effectively perform routine tasks, such as managing user permissions, backing up your deployment, and monitoring its overall health. In addition, you can avoid causing problems when you alter your deployment to meet the changing needs of your organization.

This guide is not designed to help you plan or troubleshoot a deployment. However, you will be better able to troubleshoot an existing deployment or plan a new one if you understand how Team Foundation Server operates. ...

...

..."

 

Help in getting your head around how TFS works operationally.

What I really liked was the permission topic (Managing Groups, Users, and Permissions), in that it provides a little information an links to the Team Foundation Server Administration Tool and Team Foundation Server Permission Manager tools (I need those rarely and always seem forget where to find/update them...)

If you're an IT guy and your developers are hounding you about TFS or your a Dev but sometimes play an IT role, or are just interested in what to do with TFS operationally once it's installed (i.e. setting permissions, backing it up, monitoring it, etc) this article is worth a quick read...

(via Tales from the Doghouse - TFS Operations Guidance)

Using PsExec to Execute PowerShell on a Remote System and Return "PowerShelly" Results

Precision Computing - Using PowerShell and PsExec to invoke expressions on remote computers

"While eagerly awaiting PowerShell’s upcoming remoting functionality, many people turn to Sysinternals’ PsExec tool to build their own version. However, PowerShell seems to hang when called via PsExec on the remote machine. This has come up on the SysInternal forum (http://forum.sysinternals.com/forum_posts.asp?TID=10823) among other places, and is caused by the same issue outlined here: http://www.leeholmes.com/blog/UsingMshexeInteractivelyFromWithinOtherPrograms.aspx.

To work around this problem, you can give some input to the Powershell process. But to give it input, you need to use cmd.exe:

psexec \\server cmd /c "echo . | powershell dir 'c:\program files'"

...

And to make it even more PowerShelly, the –OutputFormat of XML lets you get back an XML representation of your command’s output. On your local system, PowerShell converts your output back to deserialized objects. From there, you can continue to manipulate the output with the object-oriented goodness you’ve come to expect of us... "

I thought this was pretty darn cool. Cool enough that I immediately had to try it out... :)

In short, this post shows you how to use PsExec to run PowerShell on a remote computer returning the results to a local instance of PowerShell. (PsExec and PowerShell needs to be installed on the local machine and PowerShell on the remote machine).

Why would you want to do this?

I'm thinking aggregating information and/or doing stuff across a number of machines and providing centralized/combined results.

Hum... Now I'm thinking about all the cool stuff I can do with this... :)

Monday, October 01, 2007

Halo 3 How To's from Bungie

Bungie.net - Halo 3 How-To

Forge, Saved Film, AV Calibration, Networking, Matchmaking, Campaign Scoring and more How To's on Bungie.Net.

I want to remember to show these to my Halo 3 Trainer (i.e. my son ;)

What I'd like to see is "How To not have your butt handed to you by your teen age son", "How To play if you're an early Gen X'er and not suck at it", etc...  :|

(via .net DEvHammer - Halo 3 How-to on Bungie.NET)

Halo 3 - Is he or isn't he?

My son and I are having an argument as to the fate of Master Chief... Is he or isn't he? (I won't say more to avoid spoiling it if you haven't finished it yet).

I say he isn't (There's no way... The quote "If only it were so easy..." and that there's no evidence says to me he isn't.)

My son says he is.

 

What do you think?