Reputation: 65
I try to use Console Application for handling servel functions from Windows Burning-API.
when I try to get the CD-ROM unique_Recorder_Id from MsftDiscMaster2
/// Microsoft IMAPIv2 Disc Master ///
[ComImport]
[Guid("27354130-7F64-5B0F-8F00-5D77AFBE261E")]
[CoClass(typeof(MsftDiscMaster2Class))]
public interface MsftDiscMaster2 : IDiscMaster2 {}
I receive the Exception:
Could not load file or assembly 'CustomMarshalers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
The code runs fine on WinForm app
MsftDiscMaster2 discMaster = new MsftDiscMaster2();
MsftDiscRecorder2 discRecorder = new MsftDiscRecorder2();
if (!discMaster.IsSupportedEnvironment)
return;
foreach (string uniqueRecorderId in discMaster) // This line throws the exp
{
discRecorder.InitializeDiscRecorder(uniqueRecorderId);
Console.WriteLine(discRecorder.VolumeName);
}
Upvotes: 1
Views: 148