473,396 Members | 2,109 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,396 software developers and data experts.

Error when saving voice using mciSendString

I am using the following line of code to save a voice file (.wav) to
disk and it works fine when the filename contains no spaces. However
the file doesn't get saved when its name contains a space. Does anyone
know what is going wrong and how I can fix it ?
nReturn = mciSendString("save Voice1 " & m_sVoiceFile, "0", 0, 0)

Jun 4 '07 #1
2 1724
"BigC" <ch****************@baesystems.comschrieb:
>I am using the following line of code to save a voice file (.wav) to
disk and it works fine when the filename contains no spaces. However
the file doesn't get saved when its name contains a space. Does anyone
know what is going wrong and how I can fix it ?

nReturn = mciSendString("save Voice1 " & m_sVoiceFile, "0", 0, 0)
Untested: Surround the path with double quotation characters
('ControlChars.Quote' or two consecutive double quotes inside a string
literal) or convert it to the old 8.3 path format (this is IMO only possible
using p/invoke calls too).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jun 4 '07 #2
On 4 Jun, 21:03, "Herfried K. Wagner [MVP]" <hirf-spam-me-h...@gmx.at>
wrote:
"BigC" <christopher.smi...@baesystems.comschrieb:
I am using the following line of code to save a voice file (.wav) to
disk and it works fine when the filename contains no spaces. However
the file doesn't get saved when its name contains a space. Does anyone
know what is going wrong and how I can fix it ?
nReturn = mciSendString("save Voice1 " & m_sVoiceFile, "0", 0, 0)

Untested: Surround the path with double quotation characters
('ControlChars.Quote' or two consecutive double quotes inside a string
literal) or convert it to the old 8.3 path format (this is IMO only possible
using p/invoke calls too).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
The ControlChars.Quote work a treat, thanks :-)

Jun 5 '07 #3

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

Similar topics

1
by: Jeroen van Vliet | last post by:
I made a program where wav files will be played from the database, with the full path.LIKE i = mciSendstring(open d:\sound.wav type waveaudio",0&,0,0) i = mciSendstring(play d:\sound.wav...
14
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great...
0
by: Emma Gumbdough | last post by:
Okay we have here a VB.NET version of the .net compact framework voice recorder sample that uses open net CF c# version at: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=79 THIS CODE...
3
by: Andrea | last post by:
Hello All, I need to record voice from a mic, in the simplest way, any idea??? tks a lot Andrea
0
by: kbodily | last post by:
Hi, I have this code in a dragdrop routine for a listview to get the duration of an mp3, where fPath is the path to the file that gets dropped Dim fname As String = Chr(34) + Trim(fPath) +...
1
by: _nabuchodonozor | last post by:
HI The mciSendString returns different value of tracks length than winamp. The value is longer about 20 seconds and I don't know why. Here is a code: public void SetTime() // I tried to set...
0
by: kofi | last post by:
hi everyone.. i am developing a media player using mcisendstring function call... i have encountered few problems so far.. 1...after setting the screen to fullscreen...the player pauses a video...
2
by: kumaragurur | last post by:
Hi all, In my application i record a voice in vxml page and post it in .aspx page. I could not able to save the file in .net. how to do this.. The sample .net code is as follows. ...
2
by: ravishi | last post by:
Well, this is my first topic at this forum and I'm a newbie on C programming too. I'm coding a little program and I've used some "dynamic arrays" on it. Compiling and running the program on Linux...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.