473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Catastrophic Failure

I try to create wrapper for WMSyncReader. The code is :using System;
using System.Runtime.InteropServices;
namespace WMFSDKWrapper
{
public class WMFSDKFunctions
{
[DllImport("WMVCore.dll", EntryPoint="WMCreateSyncReader",
SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern uint WMCreateSyncReader(
[In,MarshalAs(UnmanagedType.IUnknown)] System.Object
pUnkReserved,
[In] short dwRights,
[Out,MarshalAs(UnmanagedType.Interface)] out IWMSyncReader
ppReader);
public WMFSDKFunctions()
{
//
// TODO: Add constructor logic here
//
}
}

[Guid("9397F121-7705-4DC9-B049-98B698188414"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown )]
public interface IWMSyncReader
{
uint Open(
[In,MarshalAs(UnmanagedType.LPWStr)] string pwszFilename);
}
}

When i call the class using this code :

string pwszInFile = @"c:\test.wma";
IWMSyncReader ppSyncReader
WMFSDKFunctions.WMCreateSyncReader(null, 0, out ppSyncReader );
ppSyncReader.Open( pwszInFile ) ;

I got the message : "Catastrophic Failure"
Can anyone advise me of the best approach to doing this through .NET?
Many thanks...
Nov 16 '05 #1
0 2138

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: eddie wang | last post by:
I got the following when opening up a page. It usually happens after I modify one page(not connections.asp) without refresh in IE. I have to refresh the IE browser and the error usually will go...
2
by: MeAndI | last post by:
Hi, I've create a custom com object and I use it as follow: set test = Server.CreateObject(myObject.classID) ' --> all OK the istance of the object is correctly created retval =...
4
by: J. Marshall Latham | last post by:
I have written an ASP.NET web app in C# that is trying to connect to a database using OleDb. I put code in a dll that uses another dll to create a connection object (and open it if requested) to...
1
by: sakthisakthi | last post by:
Hai I had developed one web application in dotnet with VB.net as code behind. I had included one addtional Acitvex control (FpLibX.ocx) in toolbar by selecting Cutomize tool bar. Then in...
0
by: Veibert M Pinontoan | last post by:
I try to create wrapper for WMSyncReader. The code is :using System; using System.Runtime.InteropServices; namespace WMFSDKWrapper { public class WMFSDKFunctions { public static extern uint...
5
by: mattiassich | last post by:
The following code causes unhandled exception on the line: New ManagementObjectSearcher(query) Dim mos As System.Management.ManagementObjectSearcher Dim moc As...
2
by: jdanoz | last post by:
Hello, i have a vb.net project with a reference to an ActiveX object (ocx). If i try to use the ocx from vb6 project (adding the reference) it works ok (using CreateObject). In vb.net, the...
0
by: joef | last post by:
I'm running VS on my PC (W2K) connected to a remote IIS server (W2K) SP4 that is not a domain controller. I've got the ASPNET and IWAM accounts in the "Impersonate a client after authentication"...
5
by: Tony M. | last post by:
I just want to share a discovery. I was using a sub routine to call itself, a recursive loop. In it I used ADO to process records, and I was getting a "Catastrophic Failure", almost always...
2
by: Frav | last post by:
The Reps team have been experiencing that Access 2002 unexpectedly quits while working and also lots of Corruption Failures and "Record lock can not update" messages since the upgrade from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.