473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Why do the Direct X samples use mainly c++?

Like video capture...

When you download the Direct X 9 SDK, there are like 12 samples for
progs for DirectShow in C++, but only 2 in managed languages. Can you
do everything in c# you can do in c++, in DirectX?

How does one "convert" these c++ languages to c#? I'm not as familiar
with c++ as I am with c#, and i'm not sure how I'd say "this line in
c++ would be THIS line c#" and so forth.

Thanks for any tips!

Jack
Nov 15 '05 #1
4 3948
-_-
Expect that to change, but peoples perception is managed code and games =
bad. They are the same people that also should "FPS!!!" not knowing that
over 100 fps or so makes jack all difference

--
-_-

--
"Jack O'Lantern" <ja************@hotmail.com> wrote in message
news:14**************************@posting.google.c om...
Like video capture...

When you download the Direct X 9 SDK, there are like 12 samples for
progs for DirectShow in C++, but only 2 in managed languages. Can you
do everything in c# you can do in c++, in DirectX?

How does one "convert" these c++ languages to c#? I'm not as familiar
with c++ as I am with c#, and i'm not sure how I'd say "this line in
c++ would be THIS line c#" and so forth.

Thanks for any tips!

Jack

Nov 15 '05 #2
> When you download the Direct X 9 SDK, there are like 12 samples for
progs for DirectShow in C++, but only 2 in managed languages. Can you
do everything in c# you can do in c++, in DirectX?
AFAIK, DirectShow is not supported in Managed DirectX. It is only available
for DirectX in C++, hence the language of the examples. I think you can
still use DirectShow via COM, but I've never tried it.
How does one "convert" these c++ languages to c#? I'm not as familiar
with c++ as I am with c#, and i'm not sure how I'd say "this line in
c++ would be THIS line c#" and so forth.


Though C++ syntax is very similar to C# syntax (with the exception of
pointers), C# has many .NET classes that C++ doesn't have. So converting
between the two may require knowledge of both languages so you can choose
the best implementation strategy when converting. Going from C++ to C# may
be easier than going the other direction unless the C++ code is doing a lot
of direct memory access. But like I said, DirectShow isn't even available
in Managed DirectX.

There is one way you could get access to DirectShow (sort of), but it
requires knowledge of C++, so I won't go into details. Depending on
details, it could be really easy to access from C#.

Is this a personal project or a professional one?
Nov 15 '05 #3
ja************@hotmail.com (Jack O'Lantern) wrote:
Like video capture...

When you download the Direct X 9 SDK, there are like 12 samples for
progs for DirectShow in C++, but only 2 in managed languages. Can you
do everything in c# you can do in c++, in DirectX?

How does one "convert" these c++ languages to c#? I'm not as familiar
with c++ as I am with c#, and i'm not sure how I'd say "this line in
c++ would be THIS line c#" and so forth.


The main thing with DirectShow (and the rest of DirectX, I assume) is the
COM interfaces you have to deal with. They are bad enough in C++, so if
you could use COM Interop with C# you might be a lot better off. You'll
need to hit the books/docs on COM interop, but I imagine it is doable.

I'm currently on a project using DirectShow to do video capture, but
since the requirements are that it be done in C++, I haven't looked into
using C# or any of the other .NET facilities. Do a search on
www.codeproject.com, however -- I think I recall someone posting an
article about this topic, and how to get the COM interfaces set up for
use with a .NET language (I could be wrong, and, if so, apologies in
advance).

Also, there are some sharp DirectShow guys on
microsoft.public.win32.programmer.directx.video, which could be helpful.

--
harry
Nov 15 '05 #4
Thanks for all the suggestions, guys. I will research the COM interop ideas....
Jack

ja************@hotmail.com (Jack O'Lantern) wrote in message news:<14**************************@posting.google. com>...
Like video capture...

When you download the Direct X 9 SDK, there are like 12 samples for
progs for DirectShow in C++, but only 2 in managed languages. Can you
do everything in c# you can do in c++, in DirectX?

How does one "convert" these c++ languages to c#? I'm not as familiar
with c++ as I am with c#, and i'm not sure how I'd say "this line in
c++ would be THIS line c#" and so forth.

Thanks for any tips!

Jack

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
6
by: Steve Bergman | last post by:
When sanitizing data coming in from HTML forms, I'm doing this (lifted from the Python Cookbook): from string import maketrans, translate, printable allchars = maketrans('','') delchars =...
0
by: supo | last post by:
Hello all, What do I do to run Directx 8.1 samples in Visual c++ .net 2003. Pls help, I am a newbie trying to learn from the samples. Thanks in advance Supo
1
by: endo55 | last post by:
Hi I've got the following errors when trying to compile a program cvision error LNK2001: unresolved external symbol _IID_IGraphBuilde cvision error LNK2001: unresolved external symbo...
10
by: Don Wash | last post by:
Hi! I'm pretty frustrated learning ASP.NET. I'm learning ASP.NET by downloading samples from various ASP.NET websites and none of the samples worked so far. The SAME error was shown whenever I...
1
by: iwdu15 | last post by:
hi, i was wondering if anyone knew or know of a website that could help me with this. i want to use the new version of the Direct X SDK to create like 3D graphics and stuff for my windows form but...
3
by: RV | last post by:
Hello I have used the Microsoft FlexGrid Control in VB6 to directly accept user input & display the same in its cells. For example, a user could click a cell to enter info which would be...
0
by: Jordi | last post by:
I'm making a feature-file to train a Neural Network, but now that I've added a new feature, the output becomes corrupted. The output is as follows: 3000 25 1_002858 5 0 0 0 0 2 2 0 0 0 0 2 2 0 0...
2
by: Grizzlie | last post by:
Hi everyone, I'm a VBA (MS Access) coder. Sorry if I post this in the wrong forum - please direct me if it's. I would like to know how to write a script to send a filename (e.g. "c:\My...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.