Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple excel server problem Pin
trioum5-Aug-10 23:54
trioum5-Aug-10 23:54 
GeneralRe: Multiple excel server problem Pin
Cool_Dev6-Aug-10 1:08
Cool_Dev6-Aug-10 1:08 
GeneralRe: Multiple excel server problem Pin
trioum6-Aug-10 19:12
trioum6-Aug-10 19:12 
GeneralRe: Multiple excel server problem Pin
Cool_Dev8-Aug-10 0:22
Cool_Dev8-Aug-10 0:22 
Questionomp parallel for reduction (+: sum) computation discrepancies? Pin
Chesnokov Yuriy5-Aug-10 20:22
professionalChesnokov Yuriy5-Aug-10 20:22 
AnswerRe: omp parallel for reduction (+: sum) computation discrepancies? Pin
Peter_in_27805-Aug-10 21:08
professionalPeter_in_27805-Aug-10 21:08 
GeneralRe: omp parallel for reduction (+: sum) computation discrepancies? Pin
Chesnokov Yuriy5-Aug-10 21:59
professionalChesnokov Yuriy5-Aug-10 21:59 
QuestionHow to change audio output/input devices? Pin
odyaho5-Aug-10 17:29
odyaho5-Aug-10 17:29 
Dears
There are two audio output devices :
1. Bluetooth SCO Audio
2. Realtek HD Audio output

And if bluetooth headset connects to PC, the default output device is item 1.
I want to change to item 2. I have tried some methods, but it still unsuccess
I know MCI functions should done it, but I am not sure which functions should use..
Attachment is test code below:

#include <windows.h>
#pragma comment (lib, "winmm.lib")
#include <mmsystem.h>
#include <iostream>
#include <stdio.h>

int main()
{
	int AIDChoise;
	UINT nDevices = waveInGetNumDevs();	// Get No. of devices
	MCI_WAVE_SET_PARMS parms;
	DWORD rc;
	TCHAR ErrMsg[256];
	
	WAVEINCAPS inwcps;
	WAVEOUTCAPS outwcps;

	for (int k=0; k < nDevices; k++)	// Get input audio devices
	{
		waveInGetDevCaps(k,&inwcps,sizeof(inwcps));
		printf(" In devname %d : %s \n",k,inwcps.szPname);
	}
	for (k=0; k < nDevices; k++)	// Get output audio devices
	{
		waveOutGetDevCaps(k,&outwcps,sizeof(outwcps));
		printf(" Out devname %d : %s \n\n",k,outwcps.szPname);

	}
	printf("Please select output device :");
	scanf(" %d",&AIDChoise);
//	getchar();
	  
	switch(AIDChoise)
	{
	case 0:
		printf("0 ~~~~~~~~~");
		parms.wOutput = 0;
		rc = mciSendCommand(0, MCI_SET, MCI_WAVE_OUTPUT, (DWORD)&parms);
		if ( rc != 0 )
			printf("Error Msg : %s \n",mciGetErrorString(rc,ErrMsg,256));
		break;
	case 1:
		printf("1 ~~~~~~~~~");
		parms.wOutput = 1;
		rc = mciSendCommand(1, MCI_SET, MCI_WAVE_OUTPUT, (DWORD)&parms);
		if ( rc != 0 )
			printf("Error Msg : %s \n",mciGetErrorString(rc,ErrMsg,256));
		break;
	default:
		printf("2~~~~~~~~~");
		printf("Invalid command.. \n");
		break;
	}


	return 0;
}

AnswerRe: How to change audio output/input devices? Pin
odyaho6-Aug-10 0:34
odyaho6-Aug-10 0:34 
QuestionIAccessible and tools like AccExplorer / Inspect Objects Pin
Member 38216205-Aug-10 14:53
Member 38216205-Aug-10 14:53 
QuestionWin32 Scheduled jobs Pin
Jach Mullan5-Aug-10 11:52
Jach Mullan5-Aug-10 11:52 
AnswerRe: Win32 Scheduled jobs Pin
Yusuf5-Aug-10 12:15
Yusuf5-Aug-10 12:15 
Questionwinsock connect() and how to reduce intial timeout value from, 3 seconds to 1 second or less Pin
Alan Kurlansky5-Aug-10 10:29
Alan Kurlansky5-Aug-10 10:29 
AnswerRe: winsock connect() and how to reduce intial timeout value from, 3 seconds to 1 second or less Pin
Moak5-Aug-10 12:50
Moak5-Aug-10 12:50 
Questioninput message injection on windows logon desktop Pin
linuwin5-Aug-10 3:47
linuwin5-Aug-10 3:47 
QuestionOpenMP concurrency issues Pin
Chesnokov Yuriy5-Aug-10 0:53
professionalChesnokov Yuriy5-Aug-10 0:53 
AnswerRe: OpenMP concurrency issues Pin
Aescleal5-Aug-10 2:21
Aescleal5-Aug-10 2:21 
QuestionOpenMP performance inconsistency on i7 Pin
Chesnokov Yuriy5-Aug-10 0:48
professionalChesnokov Yuriy5-Aug-10 0:48 
AnswerRe: OpenMP performance inconsistency on i7 Pin
Sauro Viti5-Aug-10 0:58
professionalSauro Viti5-Aug-10 0:58 
GeneralRe: OpenMP performance inconsistency on i7 Pin
Aescleal5-Aug-10 2:14
Aescleal5-Aug-10 2:14 
GeneralRe: OpenMP performance inconsistency on i7 Pin
Sauro Viti5-Aug-10 2:34
professionalSauro Viti5-Aug-10 2:34 
GeneralRe: OpenMP performance inconsistency on i7 Pin
harold aptroot5-Aug-10 13:54
harold aptroot5-Aug-10 13:54 
GeneralRe: OpenMP performance inconsistency on i7 Pin
Aescleal6-Aug-10 6:29
Aescleal6-Aug-10 6:29 
GeneralRe: OpenMP performance inconsistency on i7 Pin
Aescleal6-Aug-10 6:30
Aescleal6-Aug-10 6:30 
AnswerRe: OpenMP performance inconsistency on i7 Pin
Aescleal5-Aug-10 2:12
Aescleal5-Aug-10 2:12 

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.