|
then you either have to compile the MFC as a static library, or provide with your exe the DLLs required (most of the time, mfcxx.dll, mscvrxx.dll, msvcpxx.dll where xx is the version of the dll)
|
|
|
|
|
|
Suresh H wrote: ...it gives error some library files are missing...
Such as?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Lots of info here: Deployment (C++)[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
New to the text-to-speech program, I begin with the basic speech SDK API.
Below is the code which designed function is to read "Hello world!" and save the speech into output.wav.
I had hoped I could heard the pronunciation of the words, meanwhile the data for the voice
could be processed into .wav file. However, the result of the running of the program is that I heard
nothing, only get the output.wav, so my question is how can I get the sound to be heard and simultaneously get
the process for the outputing the sound into wave file ?
Thanks for any help!
-----------------------------------------------------------------------------------
#include <sapi.h>
#include <sphelper.h>
#pragma comment(lib,"ole32.lib")
#pragma comment(lib,"sapi.lib")
int main(int argc, char* argv[])
{
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
CComPtr<ispstream> cpWavStream;
CComPtr<ispstreamformat> cpOldStream;
CSpStreamFormat OriginalFmt;
pVoice->GetOutputStream( &cpOldStream );
OriginalFmt.AssignFormat(cpOldStream);
hr = SPBindToFile( L"c:\\output.wav",SPFM_CREATE_ALWAYS,&cpWavStream,&OriginalFmt.FormatId(), \
OriginalFmt.WaveFormatExPtr() );
if( SUCCEEDED( hr ) )
{
pVoice->SetOutput(cpWavStream,TRUE);
WCHAR WTX[] = L"<voice required="\"gender=female\"">Hello world!";
pVoice->Speak(WTX, SPF_IS_XML, NULL);
pVoice->WaitUntilDone( INFINITE );
pVoice->Release();
pVoice = NULL;
}
}
::CoUninitialize();
return TRUE;
}
The list for the Internet telephone service providers
|
|
|
|
|
|
Hi all
I am working on a FTP based application in which I am trying to download a file from server.
I used CInternetSession class object for session and CFtpConnection class pointer to establish a connection to the server.
The connection is established successfully but when I tried to download the file by using GetFile() function from CFtpConnection class, it returns 0, i.e. it fails.
I used GetLastError() and InternetGetLastResponseInfo() to find out the exact reason behind it. And error message that I got says that the file that I have specified for downloading is not present on the server (error code 12003). But I can confirm its presence on specified path by typing the same url in the IE which shows me the file contents in the browser.
I could be the reason behind “No such file or directory” error?
I am using a Non-Microsoft FTP server. Will it cause any problem to download a file from Non-Microsoft FTP server with WinInet APIs?
Here I am posting a code snippet which I am using to download a file...
///////////////////////////////////////////////////////////////////////////
BOOL bRetVal = FALSE;
CInternetSession sesion;
CFtpConnection *mFtpObj = NULL;
CString strCopyAt;
CString strHost,strUserID,strPassword,strPort,strXMLFilePath;
try
{
strHost = "*******";
strUserID = "***";
strPassword = "******";
strPort = "**";
strXMLFilePath = "***/ABC.xml";
}
catch(...)
{
return FALSE;
}
int nPort = atoi(strPort);
try
{
mFtpObj = sesion.GetFtpConnection(strHost,strUserID,strPassword,nPort);
}
catch(...)
{
return FALSE;
}
// Copy the file from server with temp name.
strCopyAt = "c:\Temp_ABC.xml"
bRetVal = mFtpObj->GetFile(
strXMLFilePath,
strCopyAt,
FALSE,
FILE_ATTRIBUTE_NORMAL,
FTP_TRANSFER_TYPE_BINARY
);
DWORD wrd = GetLastError();
DWORD len = 1000;
char errorMsg[1000];
bool b = InternetGetLastResponseInfo(&wrd,errorMsg,&len);
///////////////////////////////////////////////////////////////////////////
This is the error message that I get for string errorMsg;
{"200 Type set to I
200 PORT command successful
550 *****/ABC.xml: No such file or directory
550 *****/ABC.xml: No such file or directory
"}
Thanks
-- modified at 5:51 Thursday 22nd February, 2007
Sameer Thakur
|
|
|
|
|
Sameer,
Recently I developed a TCP/IP application. I received the same error, after my researh into the error, I discovered that if the file is 0kb it doesn't find it i.e (No such file or directory). I'm not saying this is the problem in your case, but maybe this might be useful to you.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi.
Thanks for the info, but as u said that the file which I am trying to download is present on the server and I can see its contents in the browser by typing its URL.
I am using a Non-Microsoft FTP server. Will it cause any problem to download a file from Non-Microsoft FTP server with WinInet APIs?
Here I am posting a code snippet which I am using to download a file...
///////////////////////////////////////////////////////////////////////////
BOOL bRetVal = FALSE;
CInternetSession sesion;
CFtpConnection *mFtpObj = NULL;
CString strCopyAt;
CString strHost,strUserID,strPassword,strPort,strXMLFilePath;
try
{
strHost = "*******";
strUserID = "***";
strPassword = "******";
strPort = "**";
strXMLFilePath = "***/ABC.xml";
}
catch(...)
{
return FALSE;
}
int nPort = atoi(strPort);
try
{
mFtpObj = sesion.GetFtpConnection(strHost,strUserID,strPassword,nPort);
}
catch(...)
{
return FALSE;
}
// Copy the file from server with temp name.
strCopyAt = "c:\Temp_ABC.xml"
bRetVal = mFtpObj->GetFile(
strXMLFilePath,
strCopyAt,
FALSE,
FILE_ATTRIBUTE_NORMAL,
FTP_TRANSFER_TYPE_BINARY
);
DWORD wrd = GetLastError();
DWORD len = 1000;
char errorMsg[1000];
bool b = InternetGetLastResponseInfo(&wrd,errorMsg,&len);
///////////////////////////////////////////////////////////////////////////
This is the error message that I get for string errorMsg;
{"200 Type set to I
200 PORT command successful
550 *****/ABC.xml: No such file or directory
550 *****/ABC.xml: No such file or directory
"}
Sameer Thakur
|
|
|
|
|
Sameer_Thakur wrote: strCopyAt = "c:\Temp_ABC.xml"
Use two backslashes in string literals.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Use two backslashes in string literals.
But wouldn't the compiler give an error state ting that an illegal escape character has been used?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: But wouldn't the compiler give an error state ting that an illegal escape character has been used?
No, why would you think that? String literal paths always use two backslashes.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Not in that case because \t is a valid escape character
|
|
|
|
|
What about using cURL:
curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE and LDAP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other
http://curl.haxx.se/[^]
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Sorry about my message not clearly.
I have 2 workspace: A & B
A contain 20 projects (.dsp)
B contain 10 projects (10 .dsp)
I want to integrate projects of B in to A, when I compile A will compile B. But B is a workspace (.dsw) so I can not insert a workspace in to a workspace.
My solution is: Add a new project (.dsp) in to A. When I select compile this new project, compiler will go to compile B (or all projects of B). Folder B is child of folder A
Do you have a suggest?
Thanks
Papais
|
|
|
|
|
dungpapai wrote: I want to integrate projects of B in to A
I think, you want to insert project from B to A.
dungpapai wrote: But B is a workspace (.dsw) so I can not insert a workspace in to a workspace.
But you can add all project from B to workspace A, isn't it ?
dungpapai wrote: Add a new project (.dsp) in to A. When I select compile this new project, compiler will go to compile B (or all projects of B).
Dependencies can be set among projects in same workspace.
|
|
|
|
|
prasad_som wrote: But you can add all project from B to workspace A, isn't it ?
If I add all projects from B to A then A is not clearly by have very many project in A. So I want to compile B through compile a project of A.
OR
How do you add a workspace (include it's projects) in to another workspace (not add each project).
Or How can I compile a workspace from compile another workspace?
Thank you all!
Papais
|
|
|
|
|
dungpapai wrote: How do you add a workspace (include it's projects) in to another workspace (not add each project).
Or How can I compile a workspace from compile another workspace?
No, its not possible.
|
|
|
|
|
Thanks and Best Regards - Prasad
Papais
|
|
|
|
|
|
Do mean icon ? What about this ?
ShellAbout(m_hWnd,L"Test Shell" ,L"OtherStuff",LoadIcon(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDI_ICON1)));
|
|
|
|
|
Thank you very much ... I'll try it...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi All..
I paint several lines in dialog using pDC->LineTo(a,b) (where: CDC *pDC = this->GetDC() )
After finish using it, I want to remove it from the screen and draw another things. How can I clear the dialog's DC? (of course, not by hide and show the dialog )
Thank you in advance...
ps. i'm too lazy too search the boards... so, it would be ok if you have the link to the same question in this board... ^^
-Houari
|
|
|
|
|
To clear a window...
Invalidate(TRUE);
UpdateWindow();
...will do it.
Or using the DC, erase the background yourself using PatBlt() or whatever.
Mark
-- modified at 0:36 Thursday 22nd February, 2007
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|