Windows Vista Beta | WinVistaBeta.com - Message | IBurn.sln C# sample throws exception, known fix?

July 03, 2008  
Subject: IBurn.sln C# sample throws exception, known fix?
Group: microsoft.public.windows.developer.winfx.sdk
Date: 10/12/2006 4:21:02 AM
From: =?Utf-8?B?UiBOSUxrTk9D?= [Email Address Protection]

Hi, sorry if this forum is not the appropriate one for this question, but I
cannot locate a forum that addresses win32 development specifici to the
latest winfx distro (including both winfx and legacy win32 apis)...Please let
me know if another forum would be a better location for the post...

I was interested in a sample program from the Sept (06) CTP of the Windows
SDK, called IBurn located in
...\Windows\v6.0\Samples\winbase\storage\IBurn\IBurn.

My VS C# setup seems correct, (no problems compiling or with executables of
known reliable code), but attemp to run this sample generates exceptions that
I have traced to initialization of this item:

[Guid("27354130-7F64-5B0F-8F00-5D77AFBE261E"), ComImport]
public interface IDiscMaster2

the specific error is:
Retrieving the COM class factory for component with CLSID
{2735412E-7F64-5B0F-8F00-5D77AFBE261E} failed due to the following error:
80040154.

the line number of the sample is: 410, in module IBurn.cs...

The error occurs (as I interpret the code) very early on in program
execution, during the attempt to initialize the com interface specified above
and before attempting any direct operation with the hardware (DVD burner, in
my case)... I am not very familiar with COM, or HResults and how to decipher
what they mean, and developing in a C# VS environment, the help system is not
particularly suited to looking up win32 related information...It doesn't make
sense to me that the code should generate an error here, as it appears only
to be attempting to init an operating system service here...

My confusion may relate to the odd mixture sometimes of features available
in all or most win32 based Windows versions (i.e., from NT to XPS2) and other
features only available in Vista, (these distinctions are inconsistently
documented in the sources of the samples, , so this may be a 'new' addition
to the API, and failing because I am running XPS2 rather than vista at
present...

Note: I have a DVD reader/writer installed in my system which I do not
believe to be in any way out of the ordinary...(HP laptop model zv6000,
Athlon 3200 64,
512 MB memory, Matshita UJ 840J DVD burner (Microsoft provided driver for
Standard CDROM type drive).

Any assistance appreciated,
R




Back