Infognition forum
August 01, 2010, 07:05:07 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Last GraphEditPlus version: 1.4.0   Last Video Enhancer version: 1.9.3
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem with GetPin "epins.Next(1, pins, fetched)"  (Read 941 times)
09uz
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« on: April 29, 2009, 03:58:48 AM »

       private IPin GetPin(IBaseFilter filter, string pinname)
        {
            IEnumPins epins;
            int hr = filter.EnumPins(out epins);
            DsError.ThrowExceptionForHR(hr);

            IntPtr fetched = Marshal.AllocCoTaskMem(4);
            IPin[] pins = new IPin[1];
            while (epins.Next(1, pins, fetched) == 0)
            {
                PinInfo pinfo;
                pins[0].QueryPinInfo(out pinfo);
                bool found = (pinfo.name == pinname);
                DsUtils.FreePinInfo(pinfo);
                if (found)
                    return pins[0];
            }
            DsError.ThrowExceptionForHR(-1);
            return null;
        }

Error   1   The best overloaded method match for 'DirectShowLib.IEnumPins.Next(int, DirectShowLib.IPin[], out int)' has some invalid arguments
Error   2   Argument '3': cannot convert from 'System.IntPtr' to 'out int'

I have no idea what's going on...
Logged
Dee Mon
Administrator
Sr. Member
*****

Karma: +7/-0
Posts: 271



View Profile WWW
« Reply #1 on: April 29, 2009, 06:02:04 PM »

You have a different version of DirectShowLib obviously. GEP uses version 2.0.0.0 and generates code for it.
Logged
09uz
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: April 29, 2009, 06:10:21 PM »

You are right thank you...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!