470,586 Members | 1,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,586 developers. It's quick & easy.

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",
CharSet=CharSet.Unicode, ExactSpelling=true,
public static extern uint WMCreateSyncReader(
[In,MarshalAs(UnmanagedType.IUnknown)] System.Object
[In] short dwRights,
[Out,MarshalAs(UnmanagedType.Interface)] out IWMSyncReader
public WMFSDKFunctions()
// TODO: Add constructor logic here

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 1949

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by J. Marshall Latham | last post: by
1 post views Thread by sakthisakthi | last post: by
reply views Thread by Veibert M Pinontoan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.