Click here to Skip to main content
15,921,212 members
Home / Discussions / C#
   

C#

 
GeneralPassing a Class to an Unmanaged function as parameter Pin
shajuMathew21-May-04 20:49
shajuMathew21-May-04 20:49 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Heath Stewart22-May-04 4:17
protectorHeath Stewart22-May-04 4:17 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
shajuMathew26-May-04 1:32
shajuMathew26-May-04 1:32 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Heath Stewart26-May-04 3:23
protectorHeath Stewart26-May-04 3:23 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
Member 93002222-May-04 9:18
Member 93002222-May-04 9:18 
GeneralRe: Passing a Class to an Unmanaged function as parameter Pin
shajuMathew26-May-04 1:35
shajuMathew26-May-04 1:35 
QuestionHow to use a DirectShow filter in C# ? Pin
ro_angel_bv21-May-04 20:11
ro_angel_bv21-May-04 20:11 
AnswerRe: How to use a DirectShow filter in C# ? Pin
Heath Stewart22-May-04 4:00
protectorHeath Stewart22-May-04 4:00 
If you're working with DirectX in C#, I recommend you take a look at the Managed DirectX 9.0 extensions - written from ground-up for .NET - at http://msdn.microsoft.com/directx[^]. You can also download the Summer 2003 Update (the full thing - just the latest SDK and runtime) from there.

Unfortunately, Managed DirectX does not contain a managed assembly or classes for DirectShow (at least not yet; I'm really not sure of future plans). If it was, you'd be able to register your filter's COM server and use the CLSID like you can with other managed classes in Managed DirectX 9.0.

There are several ways you can use your filter, though. One would be to write a native C/C++ library (DLL) that instantiates your filter's COM object and streams data through it. You could export certain functions that do this and use P/Invoke in C# to execute those exported functions (see the DllImportAttribute class documentation in the .NET Framework SDK).

Another way would be to write a mixed-mode Managed C++ assembly that can use native functions and wrap them in a managed class. You can then use this assembly in your C# project. Thanks to the Common Language Infruastructure (the CLI), languages can interoperate with each other because they compile to a Common Intermediate Language, or CIL.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: How to use a DirectShow filter in C# ? Pin
ro_angel_bv22-May-04 9:21
ro_angel_bv22-May-04 9:21 
GeneralRe: How to use a DirectShow filter in C# ? Pin
Heath Stewart23-May-04 3:31
protectorHeath Stewart23-May-04 3:31 
GeneralRe: How to use a DirectShow filter in C# ? Pin
mjKPL1-Sep-10 5:55
mjKPL1-Sep-10 5:55 
GeneralFile Compression Pin
demasoni.com21-May-04 19:34
demasoni.com21-May-04 19:34 
GeneralRe: File Compression Pin
David M. Kean22-May-04 0:35
David M. Kean22-May-04 0:35 
GeneralRe: File Compression Pin
demasoni.com22-May-04 12:48
demasoni.com22-May-04 12:48 
GeneralSetup with InstallShield Pin
quocbao21-May-04 16:34
quocbao21-May-04 16:34 
GeneralRe: Setup with InstallShield Pin
Heath Stewart22-May-04 2:38
protectorHeath Stewart22-May-04 2:38 
GeneralCalling a function in another window. Pin
Bojan Rajkovic21-May-04 16:13
Bojan Rajkovic21-May-04 16:13 
GeneralRe: Calling a function in another window. Pin
Dimitris Iliopoulos22-May-04 0:06
Dimitris Iliopoulos22-May-04 0:06 
GeneralTest and label fields misalign on windows 2000 Pin
Parrish Pope21-May-04 15:58
sussParrish Pope21-May-04 15:58 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Dimitris Iliopoulos22-May-04 0:10
Dimitris Iliopoulos22-May-04 0:10 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart22-May-04 2:47
protectorHeath Stewart22-May-04 2:47 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart22-May-04 3:38
protectorHeath Stewart22-May-04 3:38 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Dimitris Iliopoulos23-May-04 3:46
Dimitris Iliopoulos23-May-04 3:46 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Heath Stewart23-May-04 3:49
protectorHeath Stewart23-May-04 3:49 
GeneralRe: Test and label fields misalign on windows 2000 Pin
Parrish23-May-04 7:17
Parrish23-May-04 7:17 

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.