473,749 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to find dshow devices that are on the computer

IronRazer
83 New Member
I am making a program that uses dshow devices. I need to find the names of the device or devices such as "SoundMAX Digital Audio" or "SoC PC-Camra". How do i get the names and put them into a listbox so i can choose the device i want to use ? I only need the audio devices but i can filter out the rest if i can just figure out how to get the name.

Thank you in advance to those that help me.
Jan 14 '13 #1
3 3835
PsychoCoder
465 Recognized Expert Moderator Contributor
Bytes.com isn't a code or homework service, we're a community of like minded people who come together to help those who are willing to help themselves.

Show us what you've tried and we will do everything we can to nudge you in the right direction but we will not just do the work for you.
Jan 14 '13 #2
IronRazer
83 New Member
Sorry for sounding like i want the work done for me, I just need to know how to go about doing this. My program uses ffmpeg and this is how you get the names i need using it. From a standard cmd prompt i can run this ffmpeg command :

Expand|Select|Wrap|Line Numbers
  1. ffmpeg -list_devices true -f dshow -i dummy >info.txt 2>>&1
  2.  
and it writes the output to a text file just fine but, if i run it from a Shell command or by using a Process in vb it runs the command but it fails to write the info to a text file. I have tried several ways using :

Expand|Select|Wrap|Line Numbers
  1. Shell("ffmpeg -list_devices true -f dshow -i dummy >info.txt 2>>&1")
  2.  
All other ffmpeg commands work fine that i send from my program except this one. I even tried having my program run a batch file that works from a cmd prompt but, run from vb cmd shell it fails to make the text file also. Is there some reason that the cmd shell in vb won`t work?
I was told maybe using WMI might work to get the names of devices but, i can`t find a good example anywhere of how to use WMI and don`t quite understand it yet.
Do you know why Shell command dosn`t let ffmpeg write the text file or can you direct me to a good WMI example ?

PS. I am running XP Pro SP3 as the administrator.
Jan 15 '13 #3
IronRazer
83 New Member
After searching for ways to get the audio device names i figured out how to get them using the DirectX SDK. However if someone has any ideas on why the shell command in VB will not let ffmpeg write the text file that would be nice to know. This is not the first time i had that problem.

This is how to get your audio devices :

1. Install DirectX SDK from Microsoft Download Center.
2. Go to Project/Add Resource (.net) tab and select Microsoft.Direc tX.Sound

Now use this code to put the names into a combobox.

Expand|Select|Wrap|Line Numbers
  1. Imports Microsoft.DirectX.DirectSound
  2.  
  3. Public Class GetDevices
  4.  
  5.     Private Sub GetDevices_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  6.         FindDevices()
  7.     End Sub
  8.  
  9.     Public Sub FindDevices()
  10.         Dim AudioDevices As New CaptureDevicesCollection
  11.         For x = 0 To AudioDevices.Count - 1
  12.             ComboBox1.Items.Add(AudioDevices.Item(x).Description)
  13.             End If
  14.         Next
  15.         ComboBox1.SelectedIndex = 0
  16.     End Sub
  17.  
When the form loads it will list devices in the combobox.

Enjoy !!!!
Jan 17 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

19
56687
by: Anon Email | last post by:
Hi everyone, Let's see, now. This question is about the capabilities of ANSI C++. I want to write and compile code in ANSI C++ that, when compiled, will make the computer speaker beep; or, at least, SHOULD make the computer speaker beep. I know that whether the computer speaker actually beeps or not is largely dependent on the OS I'm using. But I'm not so much concerned about that (at this stage). I just want to know if ANSI C++...
8
1936
by: pigeon | last post by:
I have 2 users that their client software must be going crazy.. they are sending packets every .02 seconds to the db server... I know this because I stuck a sniffer on teh traffic.. but now i just need to know what user is doing this (all traffic is encrypted.. so i couldn’t sniff out that.. i could only get an IP). any ideas? -- Posted using the http://www.dbforumz.com interface, at author's request
5
2009
by: Frank Skare | last post by:
Hello, can somebody tell why I get 103 errors with /clr and none with /clr:oldSyntax when I include the dshow header file. I would like to use the new syntax. Win32 console app generated by VC Express with line added to include dshow.h
0
2491
by: digitalshehan | last post by:
Hi All, I need to find out who are the users connected to a shared folder on my machine at any given time. Its something like what you can find in the Computer Management console (control panel -> Administrative tools -> computer management) I've read something about WMI and NetShareEnum, but I'm not too sure if it can do what I want.
2
1718
by: Robert Iver | last post by:
Hello fellow developers, I'm hoping someone out there can steer me down the right path with this little conundrum I have, because I am getting frustrated more and more by the minute. I have a feeling it has something to do with security/authentication, but I don't know where to start on tackling it. Here's my scenario: I'm writing a app that will go onto Pocket PC devices (v2003 SE) that will allow members of our sales team to look...
2
6467
by: =?Utf-8?B?ZGF2ZS5oYXJkeQ==?= | last post by:
Hi, there have been loads of posts about this problem on loads of forums and I have tried everything suggested (except the stuff I’m not comfortable with like deleting drivers and reg. edits). I have an HP Pavilion dv2130ea laptop computer with XP media edition and sp2. I have had lots of automatic updates recently. When I boot my computer, everything is fine.
2
2866
by: subsanta | last post by:
My computer has so many problems and ive looked around on the internet and ive managed to fix some of them. I know that i have a few viruses on my computer, but i cant get rid of them, in one case i think i have one on my ipod "boot.exe" and i cant get rid of it. All of the antivirus programs ive tried either dont pick it up or cant scan my ipod. Den i have "copy.exe" which i dont know how to fix either. Task manager and regedit were...
6
4151
by: ebaxx | last post by:
Can i find a stllen computer through the mac adress, is it possible????Really important to me. Thank u. Looking forward to know the answer
1
2097
by: =?Utf-8?B?VEhOS0lUMjAwOA==?= | last post by:
TRIED TO PUT IN A MUSIC CD TO PLAY FROM OUR LOCAL LIBRARY-NOTHING HAPPENS. TRIED TO FIND CD/DVD DRIVE ON "COMPUTER" AND DIDN'T FIND IT YET I HAVE A DRIVE ON MY LAPTOP. HOW DO FIND ON MY COMPUTER AND HOW DO I GET ACCESS????
2
6586
by: brett | last post by:
ok, it appears that i have run into a spot that i am not able to figure out on my own. Let me first say that i have hobbled together this SUB from things i found on the internet and tutorials. Here is my issue...I can search AD for the description of the computer and display it out but am unable to figure out if the " If dirEntry.Properties.Contains("description") Then dirEntry.Properties("description")(0) = "Turek, Brett - Dell...
0
9566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.