Geekpedia Programming Tutorials






DirectX For C# SDK

On Sunday, March 23rd 2008 at 08:05 AM
By Anonymous
Hi. More than a year ago, and in an earlier version of VS, I installed the
DirectX SDK to use in a Windows Forms C# app. I just tried to open that old
project on a new (Vista now) computer running VS 2008. I opened the project
and it said that the "Microsoft.DirectX.AudioVideoPlayback" reference was
missing. So I went to MSDN and downloaded and installed the "dx9sdk.exe"
DirectX9 SDK with the C# stuff - or so I thought. For some reason, after I
did that, the reference still could not be found. Am I doing something wrong?

Alex

Re: DirectX for C# SDK

by Jordi Maicas on Sunday, March 23rd 2008 at 09:01 PM
SDK DirectX is not... or is not only for C#. SDK DirectX is a lot of
libraries, DLL, with functions, and you can use it with C#, C++, VB, ...

"Alex Maghen" <AlexMaghen@newsgroup.nospam> escribi? en el mensaje
news:3E812601-7195-4A0E-B8C7-7BB8A2A98D2F@microsoft.com...
> Hi. More than a year ago, and in an earlier version of VS, I installed the
> DirectX SDK to use in a Windows Forms C# app. I just tried to open that
> old
> project on a new (Vista now) computer running VS 2008. I opened the
> project
> and it said that the "Microsoft.DirectX.AudioVideoPlayback" reference was
> missing. So I went to MSDN and downloaded and installed the "dx9sdk.exe"
> DirectX9 SDK with the C# stuff - or so I thought. For some reason, after I
> did that, the reference still could not be found. Am I doing something
> wrong?
>
> Alex

Re: DirectX for C# SDK

by Anonymous on Monday, March 24th 2008 at 02:07 AM
Yes, but I installed it and it still does not provide me with the
"Microsoft.DirectX.AudioVideoPlayback". Any idea why? Did I install the wrong
SDK? Is there more than one DirectX SDK install that supports C#?

Alex


"Jordi Maicas" wrote:

> SDK DirectX is not... or is not only for C#. SDK DirectX is a lot of
> libraries, DLL, with functions, and you can use it with C#, C++, VB, ...
>
> "Alex Maghen" <AlexMaghen@newsgroup.nospam> escribi?? en el mensaje
> news:3E812601-7195-4A0E-B8C7-7BB8A2A98D2F@microsoft.com...
> > Hi. More than a year ago, and in an earlier version of VS, I installed the
> > DirectX SDK to use in a Windows Forms C# app. I just tried to open that
> > old
> > project on a new (Vista now) computer running VS 2008. I opened the
> > project
> > and it said that the "Microsoft.DirectX.AudioVideoPlayback" reference was
> > missing. So I went to MSDN and downloaded and installed the "dx9sdk.exe"
> > DirectX9 SDK with the C# stuff - or so I thought. For some reason, after I
> > did that, the reference still could not be found. Am I doing something
> > wrong?
> >
> > Alex
>
>
>

Re: DirectX for C# SDK

by Armin Zingler on Monday, March 24th 2008 at 08:28 AM
"Alex Maghen" <AlexMaghen@newsgroup.nospam> schrieb
> Hi. More than a year ago, and in an earlier version of VS, I
> installed the DirectX SDK to use in a Windows Forms C# app. I just
> tried to open that old project on a new (Vista now) computer running
> VS 2008. I opened the project and it said that the
> "Microsoft.DirectX.AudioVideoPlayback" reference was missing. So I
> went to MSDN and downloaded and installed the "dx9sdk.exe" DirectX9
> SDK with the C# stuff - or so I thought. For some reason, after I
> did that, the reference still could not be found. Am I doing
> something wrong?


Is the DLL available in C:\WINDOWS\Microsoft.NET\DirectX for Managed
Code\1.0.2902.0 ? If not, (re)install DirectX. It's part of DirectX, not
of the SDK (which might contain DX redist; I don't remember).

If you create a new project and open the "add reference" dialog, do you
have some "Microsoft.DirectX*" assemblies available (on the ".NET" tab)?
I do have "Microsoft.DirectX.AudioVideoplayback" there. (BTW, MDX SDK
Feb 2007)

If you open the "DirectX control panel" (in Start menu -> DX SDK ->
Utilities), open the "managed" tab, do you have
"Microsoft.DirectX.AudioVideoplayback" there?



Armin

Re: DirectX for C# SDK

by Anonymous on Monday, March 24th 2008 at 01:06 PM
You are, as we say, the man. Thanks.

Alex

"Armin Zingler" wrote:

> "Alex Maghen" <AlexMaghen@newsgroup.nospam> schrieb
> > Hi. More than a year ago, and in an earlier version of VS, I
> > installed the DirectX SDK to use in a Windows Forms C# app. I just
> > tried to open that old project on a new (Vista now) computer running
> > VS 2008. I opened the project and it said that the
> > "Microsoft.DirectX.AudioVideoPlayback" reference was missing. So I
> > went to MSDN and downloaded and installed the "dx9sdk.exe" DirectX9
> > SDK with the C# stuff - or so I thought. For some reason, after I
> > did that, the reference still could not be found. Am I doing
> > something wrong?
>
>
> Is the DLL available in C:\WINDOWS\Microsoft.NET\DirectX for Managed
> Code\1.0.2902.0 ? If not, (re)install DirectX. It's part of DirectX, not
> of the SDK (which might contain DX redist; I don't remember).
>
> If you create a new project and open the "add reference" dialog, do you
> have some "Microsoft.DirectX*" assemblies available (on the ".NET" tab)?
> I do have "Microsoft.DirectX.AudioVideoplayback" there. (BTW, MDX SDK
> Feb 2007)
>
> If you open the "DirectX control panel" (in Start menu -> DX SDK ->
> Utilities), open the "managed" tab, do you have
> "Microsoft.DirectX.AudioVideoplayback" there?
>
>
>
> Armin
>
>

Re: DirectX for C# SDK

by Chuck Walbourn [MSFT] on Thursday, April 3rd 2008 at 03:21 PM
The current DirectX SDK (March 2008) and the current DirectX Runtime
installer both install the Managed DX 1.1 assemblies, but August 2007 was
the last version of the DirectX SDK that included support for developing
Managed DX 1.1 applications. In fact, the last time we updated MDX 1.1 was
April 2005. It has been deprecated for some time.

--
Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warranties, and confers no rights.

Re: DirectX for C# SDK

by Anonymous on Sunday, April 6th 2008 at 01:14 AM
Chuck -

Wow, I'm sorry, are you saying that MS no longer want people using .NET for
multimedia stuff? I was a little confused by what you wrote. You seemed to be
saying that DirectX in Managed applications was no longer something that MS
was supporting (at least on an ongoing basis). Have they replaced it with a
different Managed multimedia SDK? Or have they just abandoned support for
Multimedia from .NET altogether?

Ax

"Chuck Walbourn [MSFT]" wrote:

> The current DirectX SDK (March 2008) and the current DirectX Runtime
> installer both install the Managed DX 1.1 assemblies, but August 2007 was
> the last version of the DirectX SDK that included support for developing
> Managed DX 1.1 applications. In fact, the last time we updated MDX 1.1 was
> April 2005. It has been deprecated for some time.
>
> --
> Chuck Walbourn
> SDE, XNA Developer Connection
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>

Re: DirectX for C# SDK

by ZMan on Sunday, April 6th 2008 at 03:35 PM
The DirectX team has not been responsible for the multimedia stuff for a
long time now. DirectShow is/was part of the SDK for backwards compatibility
but its longe been under a different team who, IMO, care little about the
API at all let alone any managed interface to it.

The .AudioVideoPlayback was a very basic manged wrapper over DirectShow
anyway - the community provided a much better one though I don't know how
well it is currently supported.
http://sourceforge.net/projects/directshownet/

As for other multimedia APIs from .Net I'm not sure - I know Vista has some
new stuff but I dont know if .Net exposes any of it yet.




"Alex Maghen" <AlexMaghen@newsgroup.nospam> wrote in message
news:D5EB330F-4370-45DE-8890-996D2FAFD03C@microsoft.com...
> Chuck -
>
> Wow, I'm sorry, are you saying that MS no longer want people using .NET
> for
> multimedia stuff? I was a little confused by what you wrote. You seemed to
> be
> saying that DirectX in Managed applications was no longer something that
> MS
> was supporting (at least on an ongoing basis). Have they replaced it with
> a
> different Managed multimedia SDK? Or have they just abandoned support for
> Multimedia from .NET altogether?
>
> Ax
>
> "Chuck Walbourn [MSFT]" wrote:
>
>> The current DirectX SDK (March 2008) and the current DirectX Runtime
>> installer both install the Managed DX 1.1 assemblies, but August 2007 was
>> the last version of the DirectX SDK that included support for developing
>> Managed DX 1.1 applications. In fact, the last time we updated MDX 1.1
>> was
>> April 2005. It has been deprecated for some time.
>>
>> --
>> Chuck Walbourn
>> SDE, XNA Developer Connection
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>>

Re: DirectX for C# SDK

by Chuck Walbourn [MSFT] on Tuesday, April 8th 2008 at 10:06 PM
"MDX 1.1", Managed API wrappers for DirectX, are deprecated and have not
been updated in many years. The main intended uses for MDX fell into two
categories:

(A) Developing tools chains for games, which based on most professional
developer's experience is best done by creating your own managed layers to
custom engines through standard native interop (Managed C++ for example).

(B) Creating all managed games, which is the core scenario for XNA Game
Studio.

In general, direct 'wrapping' of native APIs with managed ones does not
provide much value as you can (a) do it yourself easily enough and (b) often
suffers serious performance problems. There are some shared source projects
to continue to invest in creating these managed wrappers.

Microsoft continues to invest heavily in managed technologies, but it tends
to be less 'generic' than MDX 1.1 was trying to be. XNA Game Studio focuses
on games. Avalon/.NET 3.5 focuses on traditional 2D multimedia applications.
Silverlight .NET focuses on web applications. And so on.

--
-Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warrenties, and confers no rights.

Re: DirectX for C# SDK

by Chuck Walbourn [MSFT] on Tuesday, April 8th 2008 at 10:22 PM
The AVP managed component of MDX 1.1 was a very simplistic wrapper, and was
never intended to expose the full DirectShow interface to managed
developers. Most media applications are very perfomance sensitive, so
DirectShow applications tend to be written most often in C/C++. As noted in
my previous post, native interop at a level that makes sense for your
application is far more performant than a generic managed wrapper. If you
are looking for such a generic wrapper, they are easy to write and available
in shared source projects as well.

The Windows Media team has always owned DirectShow, even when it was
shipping in the DirectX SDK. There's been some mixed-messaging about
DirectShow with the release of Windows Media Foundation in Windows Vista,
and the plan is to eventually replace DirectShow with WMF in a future
version of Windows. Windows Media has not invested in DirectShow in a long
time, and is instead focused on WMF, but DirectShow continues to be
supported and is still an important API for many video/audio applications.
It has been supported through the Microsoft Platform SDK / Windows SDK since
April 2005, when it was removed from the DirectX SDK.

The first release of WMF is focused on protected content playback for
Windows Meida formats, and much work has gone into support existing
DirectShow applications as well for backwards compatiblity. DirectShow is
still the preferred API to write video applications for non-protected
content playback, supporting formats other than Windows Media (WMV, WMA) and
MP3, capturing, and editing.

See http://msdn2.microsoft.com/en-us/library/aa468614.aspx for details and
mitgration guideance with respect to DirectShow and Windows Media
Foundation.

As for managed technology supporting video scenarios, Silverlight is built
around having a strong streaming media functionality.

--
-Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warrenties, and confers no rights.

Re: DirectX for C# SDK

by Anonymous on Wednesday, June 4th 2008 at 03:49 PM
You mention Silverlight as an example of managed technology supporting video
applications, but we have have been struggling with exactly this issue.
Silverlight is restricted to playing video which has been encoded with the
Microsoft VC1 codec, basically implying use of a Windows Media Server. What
about developers who would like to use managed technology in the browser to
play video from other sources, like security cameras and DVRs/NVRs?
--
Marc Perrone


"Chuck Walbourn [MSFT]" wrote:

> The AVP managed component of MDX 1.1 was a very simplistic wrapper, and was
> never intended to expose the full DirectShow interface to managed
> developers. Most media applications are very perfomance sensitive, so
> DirectShow applications tend to be written most often in C/C++. As noted in
> my previous post, native interop at a level that makes sense for your
> application is far more performant than a generic managed wrapper. If you
> are looking for such a generic wrapper, they are easy to write and available
> in shared source projects as well.
>
> The Windows Media team has always owned DirectShow, even when it was
> shipping in the DirectX SDK. There's been some mixed-messaging about
> DirectShow with the release of Windows Media Foundation in Windows Vista,
> and the plan is to eventually replace DirectShow with WMF in a future
> version of Windows. Windows Media has not invested in DirectShow in a long
> time, and is instead focused on WMF, but DirectShow continues to be
> supported and is still an important API for many video/audio applications.
> It has been supported through the Microsoft Platform SDK / Windows SDK since
> April 2005, when it was removed from the DirectX SDK.
>
> The first release of WMF is focused on protected content playback for
> Windows Meida formats, and much work has gone into support existing
> DirectShow applications as well for backwards compatiblity. DirectShow is
> still the preferred API to write video applications for non-protected
> content playback, supporting formats other than Windows Media (WMV, WMA) and
> MP3, capturing, and editing.
>
> See http://msdn2.microsoft.com/en-us/library/aa468614.aspx for details and
> mitgration guideance with respect to DirectShow and Windows Media
> Foundation.
>
> As for managed technology supporting video scenarios, Silverlight is built
> around having a strong streaming media functionality.
>
> --
> -Chuck Walbourn
> SDE, XNA Developer Connection
>
> This posting is provided "AS IS" with no warrenties, and confers no rights.
>

RE: DirectX for C# SDK

by Anonymous on Friday, August 22nd 2008 at 03:09 PM
"Alex Maghen" wrote:

> Hi. More than a year ago, and in an earlier version of VS, I installed the
> DirectX SDK to use in a Windows Forms C# app. I just tried to open that old
> project on a new (Vista now) computer running VS 2008. I opened the project
> and it said that the "Microsoft.DirectX.AudioVideoPlayback" reference was
> missing. So I went to MSDN and downloaded and installed the "dx9sdk.exe"
> DirectX9 SDK with the C# stuff - or so I thought. For some reason, after I
> did that, the reference still could not be found. Am I doing something wrong?
>
> Alex

Re: DirectX for C# SDK

by Anonymous on Friday, August 22nd 2008 at 03:10 PM
"Armin Zingler" wrote:

> "Alex Maghen" <AlexMaghen@newsgroup.nospam> schrieb
> > Hi. More than a year ago, and in an earlier version of VS, I
> > installed the DirectX SDK to use in a Windows Forms C# app. I just
> > tried to open that old project on a new (Vista now) computer running
> > VS 2008. I opened the project and it said that the
> > "Microsoft.DirectX.AudioVideoPlayback" reference was missing. So I
> > went to MSDN and downloaded and installed the "dx9sdk.exe" DirectX9
> > SDK with the C# stuff - or so I thought. For some reason, after I
> > did that, the reference still could not be found. Am I doing
> > something wrong?
>
>
> Is the DLL available in C:\WINDOWS\Microsoft.NET\DirectX for Managed
> Code\1.0.2902.0 ? If not, (re)install DirectX. It's part of DirectX, not
> of the SDK (which might contain DX redist; I don't remember).
>
> If you create a new project and open the "add reference" dialog, do you
> have some "Microsoft.DirectX*" assemblies available (on the ".NET" tab)?
> I do have "Microsoft.DirectX.AudioVideoplayback" there. (BTW, MDX SDK
> Feb 2007)
>
> If you open the "DirectX control panel" (in Start menu -> DX SDK ->
> Utilities), open the "managed" tab, do you have
> "Microsoft.DirectX.AudioVideoplayback" there?
>
>
>
> Armin
>
>

Re: DirectX for C# SDK

by Anonymous on Friday, August 22nd 2008 at 03:10 PM
"Alex Maghen" wrote:

> Yes, but I installed it and it still does not provide me with the
> "Microsoft.DirectX.AudioVideoPlayback". Any idea why? Did I install the wrong
> SDK? Is there more than one DirectX SDK install that supports C#?
>
> Alex
>
>
> "Jordi Maicas" wrote:
>
> > SDK DirectX is not... or is not only for C#. SDK DirectX is a lot of
> > libraries, DLL, with functions, and you can use it with C#, C++, VB, ...
> >
> > "Alex Maghen" <AlexMaghen@newsgroup.nospam> escribi?? en el mensaje
> > news:3E812601-7195-4A0E-B8C7-7BB8A2A98D2F@microsoft.com...
> > > Hi. More than a year ago, and in an earlier version of VS, I installed the
> > > DirectX SDK to use in a Windows Forms C# app. I just tried to open that
> > > old
> > > project on a new (Vista now) computer running VS 2008. I opened the
> > > project
> > > and it said that the "Microsoft.DirectX.AudioVideoPlayback" reference was
> > > missing. So I went to MSDN and downloaded and installed the "dx9sdk.exe"
> > > DirectX9 SDK with the C# stuff - or so I thought. For some reason, after I
> > > did that, the reference still could not be found. Am I doing something
> > > wrong?
> > >
> > > Alex
> >
> >
> >

Re: DirectX for C# SDK

by Anonymous on Friday, August 22nd 2008 at 03:11 PM
"Chuck Walbourn [MSFT]" wrote:

> The current DirectX SDK (March 2008) and the current DirectX Runtime
> installer both install the Managed DX 1.1 assemblies, but August 2007 was
> the last version of the DirectX SDK that included support for developing
> Managed DX 1.1 applications. In fact, the last time we updated MDX 1.1 was
> April 2005. It has been deprecated for some time.
>
> --
> Chuck Walbourn
> SDE, XNA Developer Connection
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>

Re: DirectX for C# SDK

by stephanG on Monday, September 15th 2008 at 05:23 AM
supoch14 schrieb:
>
> "Chuck Walbourn [MSFT]" wrote:
>
>> The current DirectX SDK (March 2008) and the current DirectX Runtime
>> installer both install the Managed DX 1.1 assemblies, but August 2007 was
>> the last version of the DirectX SDK that included support for developing
>> Managed DX 1.1 applications. In fact, the last time we updated MDX 1.1 was
>> April 2005. It has been deprecated for some time.
>>
>> --
>> Chuck Walbourn
>> SDE, XNA Developer Connection
>>
>> This posting is provided "AS IS" with no warranties, and confers no rights.
>>
>>
>>
So, question is, what to do with these old code. What API should I use
instead to make my application "future-save" ?

Re: DirectX for C# SDK

by legalize+jeeves@mail.xmission.com on Monday, September 15th 2008 at 05:45 PM
[Please do not mail me a copy of your followup]

stephanG <stephan.gerhards@googlemail.com> spake the secret code
<48CE2985.9020306@googlemail.com> thusly:

>So, question is, what to do with these old code. What API should I use
>instead to make my application "future-save" ?

If you have a large code base that is using managed directx, your
closest API match would be SlimDX.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

Re: DirectX for C# SDK

by stephanG on Tuesday, September 16th 2008 at 03:22 AM
Richard [Microsoft Direct3D MVP] schrieb:
> [Please do not mail me a copy of your followup]
>
> stephanG <stephan.gerhards@googlemail.com> spake the secret code
> <48CE2985.9020306@googlemail.com> thusly:
>
>> So, question is, what to do with these old code. What API should I use
>> instead to make my application "future-save" ?
>
> If you have a large code base that is using managed directx, your
> closest API match would be SlimDX.

Thank you for your answer. I am using mostly the
"Microsoft.DirectX.AudioVideoPlayback" namespace. In my application, I
use it to create some own controls with video functionality in it.
What do you suggest to use instead?
Thanks
Stephan

Re: DirectX for C# SDK

by legalize+jeeves@mail.xmission.com on Tuesday, September 16th 2008 at 07:49 PM
[Please do not mail me a copy of your followup]

stephanG <stephan.gerhards@googlemail.com> spake the secret code
<uvkEN08FJHA.4460@TK2MSFTNGP02.phx.gbl> thusly:

>> If you have a large code base that is using managed directx, your
>> closest API match would be SlimDX.
>
>Thank you for your answer. I am using mostly the
>"Microsoft.DirectX.AudioVideoPlayback" namespace. In my application, I
>use it to create some own controls with video functionality in it.
>What do you suggest to use instead?

I don't think SlimDX wraps DirectShow. You might need to create your
own interop wrapper there.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

Re: DirectX for C# SDK

by Chuck Walbourn [MSFT] on Wednesday, September 24th 2008 at 11:34 AM
There is a DirectShow wrapper out there as well.

--
-Chuck Walbourn
SDE, XNA Developer Connection

This posting is provided "AS IS" with no warrenties, and confers no rights.

Re: DirectX for C# SDK

by legalize+jeeves@mail.xmission.com on Thursday, September 25th 2008 at 06:19 PM
[Please do not mail me a copy of your followup]

"Chuck Walbourn [MSFT]" <chuckw@online.microsoft.com> spake the secret code
<B8D4AF94-B289-4B51-B771-D6078FBA01D7@microsoft.com> thusly:

>There is a DirectShow wrapper out there as well.

Do you know where that is?
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

Re: DirectX for C# SDK

by Bob on Sunday, September 28th 2008 at 12:37 AM
On Thu, 25 Sep 2008 15:19:15 -0700, legalize+jeeves@mail.xmission.com
(Richard [Microsoft Direct3D MVP]) wrote:

>[Please do not mail me a copy of your followup]
>
>"Chuck Walbourn [MSFT]" <chuckw@online.microsoft.com> spake the secret code
><B8D4AF94-B289-4B51-B771-D6078FBA01D7@microsoft.com> thusly:
>
>>There is a DirectShow wrapper out there as well.
>
>Do you know where that is?

If you're referring to the "DirectShow.net" project, that is on
SourceForge.

http://directshownet.sourceforge.net/

You must have seen that before though...right?

Re: DirectX for C# SDK

by legalize+jeeves@mail.xmission.com on Monday, September 29th 2008 at 01:29 PM
[Please do not mail me a copy of your followup]

Bob <Bob@nospam.com> spake the secret code
<2c2ud4h7gl147hr28r768vepkupps57l6b@4ax.com> thusly:

>http://directshownet.sourceforge.net/
>
>You must have seen that before though...right?

Nope, hadn't seen that. I haven't paid attention to DirectShow since
the late 90s when I worked at Philips and we were doing digital video
editing/effects stuff.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
Advertisement

Free Magazine Subscriptions

Today's Pictures

Today's Video

Other Resources

Latest Download

Latest Icons