Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: Connecting to a c# Local Database Pin
Alex Grose4-Oct-08 6:01
Alex Grose4-Oct-08 6:01 
GeneralRe: Connecting to a c# Local Database Pin
Mark Salsbery4-Oct-08 7:42
Mark Salsbery4-Oct-08 7:42 
GeneralRe: Connecting to a c# Local Database Pin
Malcolm Smart4-Oct-08 7:45
Malcolm Smart4-Oct-08 7:45 
GeneralRe: Connecting to a c# Local Database Pin
Alex Grose4-Oct-08 8:58
Alex Grose4-Oct-08 8:58 
GeneralRe: Connecting to a c# Local Database Pin
Paul Conrad4-Oct-08 15:34
professionalPaul Conrad4-Oct-08 15:34 
AnswerRe: Connecting to a c# Local Database Pin
funklet4-Oct-08 8:49
funklet4-Oct-08 8:49 
AnswerRe: Connecting to a c# Local Database Pin
jzonthemtn5-Oct-08 3:42
jzonthemtn5-Oct-08 3:42 
QuestionFail to set port using SetMulticastGroup() of IMulticastConfig to "MPEG-2 Multicast Receiver" filter Pin
Andy Rama4-Oct-08 1:18
Andy Rama4-Oct-08 1:18 
Hi to all,

I am doing DirectShow Programming in VC++ & C#.Net.

I am using "MPEG-2 Multicast Receiver" filter & using IMulticastConfig interface on it.

In VC++, when I use SetMulticastGroup(ip, port) of IMulticastConfig it sets port properly to the filter.
But when same thing I do in C#.Net (same code of VC++), it fails to sets different port to that filter. (every-time sets a new port. No compilation or run-time error).

For C#.net, IMulticastConfig is written using IMulticastConfig of DirectX 9.0 of VC++.

Following is my interface,
<br />
        using System.Runtime.InteropServices;<br />
<br />
        [ComImport, System.Security.SuppressUnmanagedCodeSecurity,<br />
        Guid("1CB42CC8-D32C-4f73-9267-C114DA470378"),<br />
        InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
        public interface IMulticastConfig<br />
        {<br />
            [PreserveSig]<br />
            int SetNetworkInterface([In] ulong ulNIC);<br />
<br />
            [PreserveSig]<br />
            int GetNetworkInterface([Out] ulong pNIC);<br />
<br />
            [PreserveSig]<br />
            int SetMulticastGroup([In] ulong ulIP, [In] ushort usPort);<br />
<br />
            [PreserveSig]<br />
            int GetMulticastGroup([Out] ulong pIP, [Out] ushort pPort);<br />
        }<br />


My code is,
<br />
m_MulticastRcv] = Func.AddFilterByName(this.m_GraphBuilder, FilterCategory.LegacyAmFilterCategory, cNetworkInputFilterName);<br />
if (m_MulticastRcv == null) throw new Exception();<br />
IMulticastConfig Inetwork = (IMulticastConfig)m_MulticastRcv;<br />
<br />
m_hResult = Inetwork.SetMulticastGroup(InetAddress("234.1.1.1"), (ushort)System.Net.IPAddress.HostToNetworkOrder((ushort)1234));<br />
DsError.ThrowExceptionForHR(m_hResult);<br />
<br />
m_hResult = Inetwork.SetNetworkInterface(InetAddress("192.168.2.112"));<br />
DsError.ThrowExceptionForHR(m_hResult);<br />




Thanks & Regards,
Aniket A. Salunkhe
QuestionCreating a Pause Button....... Pin
Member 46731983-Oct-08 21:07
Member 46731983-Oct-08 21:07 
AnswerRe: Creating a Pause Button....... Pin
Jaime Olivares4-Oct-08 2:14
Jaime Olivares4-Oct-08 2:14 
GeneralRe: Creating a Pause Button....... Pin
Member 46731984-Oct-08 3:24
Member 46731984-Oct-08 3:24 
AnswerRe: Creating a Pause Button....... Pin
dybs4-Oct-08 12:09
dybs4-Oct-08 12:09 
QuestionHow to access stored procedure Pin
fancyfree833-Oct-08 20:39
fancyfree833-Oct-08 20:39 
AnswerRe: How to access stored procedure Pin
Wendelius3-Oct-08 21:33
mentorWendelius3-Oct-08 21:33 
AnswerRe: How to access stored procedure Pin
TALHAKOSEN4-Oct-08 3:40
TALHAKOSEN4-Oct-08 3:40 
AnswerRe: How to access stored procedure Pin
Nouman Bhatti4-Oct-08 10:08
Nouman Bhatti4-Oct-08 10:08 
AnswerRe: How to access stored procedure Pin
Jaffer Mumtaz4-Oct-08 20:17
Jaffer Mumtaz4-Oct-08 20:17 
AnswerRe: How to access stored procedure Pin
Ashwin. Shetty4-Oct-08 20:48
Ashwin. Shetty4-Oct-08 20:48 
QuestionNot working : Wmv file to Flv file using C# Pin
elango.sham3-Oct-08 20:24
elango.sham3-Oct-08 20:24 
QuestionHow to get mouse pointer of object after using Graphics.ScaleTransform()? Pin
cocoonwls3-Oct-08 18:08
cocoonwls3-Oct-08 18:08 
AnswerRe: How to get mouse pointer of object after using Graphics.ScaleTransform()? Pin
cocoonwls15-Oct-08 0:10
cocoonwls15-Oct-08 0:10 
QuestionWebBrowser Control and Images Pin
#realJSOP3-Oct-08 17:18
professional#realJSOP3-Oct-08 17:18 
AnswerRe: WebBrowser Control and Images Pin
Jaime Olivares3-Oct-08 19:21
Jaime Olivares3-Oct-08 19:21 
GeneralRe: WebBrowser Control and Images [modified] Pin
#realJSOP3-Oct-08 22:48
professional#realJSOP3-Oct-08 22:48 
GeneralRe: WebBrowser Control and Images Pin
Jaime Olivares4-Oct-08 2:16
Jaime Olivares4-Oct-08 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.