DirectX Question

P

Pete Kane

Hi All, I'm just dipping my toes in DirectX waters and have managed to
create a Winform that will play audio/video files - BUT !!!! when I try
to run the app on a different PC , I receive a pretty useless error
message "Error in application" when trying to play a video - digging a
bit deeper I find the error is related to not having the DirectX runtime
installed , I've tried copying the DirectX dlls to the apps folder but
to no avail - any ideas ? Before I get flamed for misposting I looked on
some DirectX newsgroups and they looked very spartan in terms of posts
 
P

Pete Kane

Peter said:
I'm practically certain that for DirectX, you're going to need to
actually _install_ it. There are lots of things that need to be set up
besides simply having the DLLs in the loader's search path.

That said, I'm a bit surprised you're running .NET on a computer that
doesn't also have DirectX. DirectX is standard on any recent version of
Windows (DX 9 was included in Windows XP SP2...I don't remember the
exact relationship before that, but that goes back quite a ways as it is
:) ).

Pete
Thanks for your time Pete, the computer I'm running the app on has XP
Pro SP2
 
N

not_a_commie

If you install DirectX without installing the .Net framework first,
the DX installer doesn't copy the necessary managed DLLs to the GAC.
You have to install DX after you install the .Net Framework.

Having said that, don't use Managed DirectX (MDX) anyway. Use SlimDX
instead. You'll just pass their assemblies with your application in
that case. It works better. It's modern and maintained.
 
P

Peter Kane

RobinDotNet said:
Actually, I don't think you HAVE to install all of DirectX in order to
use it. I deploy DirectX dll's locally with my company's application and
it works fine; we using the sound capabilities though.

Do you have "copy local = true" on the references so that they are
included in the output when you do a build? If you do that, then go to
the folder where the exe file is and double-click on it, does it run?
Are the dll's there?

RobinDotNet
I'll check when I'm back at the office - thanks
 
P

Peter Kane

RobinDotNet said:
Actually, I don't think you HAVE to install all of DirectX in order to
use it. I deploy DirectX dll's locally with my company's application and
it works fine; we using the sound capabilities though.

Do you have "copy local = true" on the references so that they are
included in the output when you do a build? If you do that, then go to
the folder where the exe file is and double-click on it, does it run?
Are the dll's there?

RobinDotNet
I'll check when I'm back at the office - thanks
 
P

Peter Kane

not_a_commie said:
If you install DirectX without installing the .Net framework first,
the DX installer doesn't copy the necessary managed DLLs to the GAC.
You have to install DX after you install the .Net Framework.

Having said that, don't use Managed DirectX (MDX) anyway. Use SlimDX
instead. You'll just pass their assemblies with your application in
that case. It works better. It's modern and maintained.
Tnaks I'll check it out
 
P

Peter Kane

not_a_commie said:
If you install DirectX without installing the .Net framework first,
the DX installer doesn't copy the necessary managed DLLs to the GAC.
You have to install DX after you install the .Net Framework.

Having said that, don't use Managed DirectX (MDX) anyway. Use SlimDX
instead. You'll just pass their assemblies with your application in
that case. It works better. It's modern and maintained.
Tnaks I'll check it out
 
P

Peter Kane

Peter said:
I suppose it depends on what features you're using.

If you don't need anything that involves a driver and/or is all
user-mode stuff, I suppose an in-directory copy might be fine.

Doesn't sound like a config I'd want to support though. Too much
potential for weird things on a system where the DirectX stuff starts
getting mixed-and-matched. Talk about "DLL Hell".

Besides, are you sure that simply copying to your own install directory
is compatible with Microsoft's redistribution license?

Pete
I'll check - thanks Peter
 
P

Peter Kane

Peter said:
I suppose it depends on what features you're using.

If you don't need anything that involves a driver and/or is all
user-mode stuff, I suppose an in-directory copy might be fine.

Doesn't sound like a config I'd want to support though. Too much
potential for weird things on a system where the DirectX stuff starts
getting mixed-and-matched. Talk about "DLL Hell".

Besides, are you sure that simply copying to your own install directory
is compatible with Microsoft's redistribution license?

Pete
I'll check - thanks Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top