.NET Interface: Get Current Byte Position
Posted: 23 May 2008 06:18
Hi,
I want to add a method to NativeLib.cs that returns the player's current byte position. I wrote the following .NET code to facilitate this:
However, it always returns 0. Any ideas on what I am doing wrong?
Thanks,
klk
I want to add a method to NativeLib.cs that returns the player's current byte position. I wrote the following .NET code to facilitate this:
Code: Select all
public int CurrentBytePosition()
{
if (!this.ProducingEvents)
{
this.ProducingEvents = true;
}
IntPtr resultString = IntPtr.Zero;
NativeLib thisVlc = (NativeLib)this.gch.Target;
using (VlcObject vobj = new VlcObject(thisVlc.vlcHandle, ObjectType.VLC_OBJECT_INPUT))
{
if (vobj.SubObject != IntPtr.Zero)
{
input_Control(vobj.SubObject, input_query_e.INPUT_GET_BYTE_POSITION, Meta_information, Now_Playing, ref resultString);
}
}
return resultString.ToInt32();
}
Thanks,
klk