|
Millymanz wrote: ...was wondering if anyone of you guys could show me where exactly to start? What c++ libraries should I be using? Tutorials?
I have a hard time believing that a final year student could be this lost.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yet we keep seeing more and more of these 'requests' for final projects. Where the h*ll are these people going to school?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Refer this link.
http://www.mp3-tech.org/programmer/decoding.html
I think you are looking for a complete decoder implementation along with a player
|
|
|
|
|
you're welcome,and also except mp3 you can plat mpg,avi,... and other files.
Good luck;)
|
|
|
|
|
Hello Friends,
In my one of the project i need to access the remote function(Its on the file located on Internet) by passing the argument and recieve the return Value. I m thinking to use the WinInet class's CHttpConnection:->. I have tried to understand this stuff from MSDN but failed . So If u can, plz help me in understanding this .
-- modified at 7:02 Monday 20th August, 2007
|
|
|
|
|
|
In my MFC application i have to connect to an ftp server, i do it this way
sess.GetFtpConnection(servername,username,password);
The above mentioned function works smoothly if the "work offline" option in internet explorer is unchecked. if the "work offline" option is checked then the above funtion throws an exception with message "The computer is disconnected from network",
It looks there is some global variable that controls the connectivity, which is set/unset by work ofline option in internet explorer,
How can i set/unset this option programatically? or there is some other reason of this problem.
Thanks in advace
|
|
|
|
|
Hi,
i'm not sure, but i don't think that has a relation.
I never tried, but i think the "work offline" mode is only related to the
Internet Explorer, so that no connection is set and all websites in the cache
could be displayed without the internet...
But you have also the option "Deal no connection*" so, don't have a internet connection if
you use a modem ( in case of a router you have always a connection there )
Do you tested this case some times?
* i don't now the exact grammatically sentence
|
|
|
|
|
This application runs on lan, so no dialup needed, ftp server is also on same lan.
|
|
|
|
|
Hi All,
I am developing a MFC ActiveX Control in Visual Studio 2005. I want to compile some methods in debug1 and some in release.
class MyClass
{
debugMethod();
debug1Method();
releaseMethod()
AdvanceReleaeMethod();
}
Now I want that when active configuration is "Debug" only debugMethod should compile and when active configuration is "Advance Releae" only "AdvanceReleaeMethod" method should compile.
Any Help?
Thanks in advance.
Micky
Micky
|
|
|
|
|
put a preprocessor checking like
class MyClass
{
#ifdef _DEBUG
debugMethod();
debug1Method();
#else if _RELEASEMODE
releaseMethod()
#else
AdvanceReleaeMethod();
#end if
}
and now in the Release mode settings define _RELEASEMODE
|
|
|
|
|
You can have configuration specific macros defined in project settings.
And based on that, compile code conditinally, using #ifdef .
Prasad
MS MVP - VC++
|
|
|
|
|
#ifdef _DEBUG
debugMethod();
debug1Method();
#else if _RELEASE
releaseMethod();
#else
AdvanceReleaeMethod();
#endif
Regards,
Paresh.
|
|
|
|
|
For doing this you need to know the concept of preprocessor directive
#IFDEF | #IFNDEF ConstantName
Commands
[#ELSE
Commands]
#ENDIF
if you know this you can do it by just defining a macro suppose _DEBUG_MODE
and put it in preprocessor defination of C++ in project properties under debug configuration.
and then define like this
class MyClass
{
#ifdef _DEBUG_MODE
debugMethod();
debug1Method();
#ELSE
releaseMethod()
#ENDIF
}
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
How do i create an MS SQL database table during installation of an MFC application. how and where do i run the necessary SQL script??
I have created an installer using Visual Studio 2003.NET
|
|
|
|
|
yashveer wrote: create an MS SQL database table during installation of an MFC application
Can you more exaplain,please?
|
|
|
|
|
You can use SQLExecute("CREATE DATABASE...") for this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I tried the following:
SQLHSTMT hstmt;<br />
SQLCHAR temp[]="CREATE TABLE [dbo].[Purchase]([PurchaseOrderID] [int] NOT NULL,[LineNumber] [smallint] NOT NULL)";<br />
<br />
SQLRETURN sql_ret;<br />
sql_ret=SQLPrepare(hstmt,temp,SQL_NTS);<br />
<br />
SQLExecute(hstmt);
It gives an error at line SQLprepare():
Unhandled exception in .exe(ODBC32.DLL): Access Denied
|
|
|
|
|
Next i tried this:
SQLHENV henv;<br />
SQLHDBC hdbc[10];<br />
SQLAllocEnv(&henv);<br />
SQLAllocConnect(henv,hdbc);<br />
SQLCHAR server[]="Rel";<br />
SQLCHAR uid[]="";<br />
SQLCHAR pwd[]="";<br />
SQLRETURN rc;<br />
rc=SQLConnect(*hdbc,server,SQL_NTS,uid,SQL_NTS,pwd,SQL_NTS);<br />
<br />
SQLHANDLE hstmt;<br />
SQLHANDLE hconn; <br />
SQLAllocHandle(SQL_HANDLE_STMT,hdbc,&hstmt);<br />
<br />
SQLCHAR str[]="SELECT dat FROM transact1";<br />
rc=SQLExecDirect(hstmt,str,SQL_NTS);<br />
int i=0;
I m getting the same error on SQLExecDirect() line.
Unhandled exception:Access denied
|
|
|
|
|
What if you ommitted SQLPrepare() and SQLExecute() , and called SQLExecDirect(hstmt, temp, SQL_NTS) instead?
Of course, you've not shown us how you are calling SQLAllocHandle() , so it may be in error further upstream.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I would suggest getting a "real" installer system! For example, Wise Installer (as of at last 4 years ago) was capable of installing databases and related items (SPs, views, users, logins, etc.) into an RDBMS.
Short of that, you can just create a little application that contains all of the SQL you need to deploy your entire schema and knows how to connect to your target RDBMS(es) and can execute the SQL. You can then have your installer launch it during installation (and during uninstallation for cleanup if necessary) to install the database for you.
One thing I did previously was to put the DB installation logic into the application itself, and the first time it ran and noticed the database was not in the specified RDBMS, it installed it. Sounds a bit kludgy, but it worked well for targeting multiple RDBMSes (QA, staging and production) from a single installation of the application.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
James R. Twine wrote: One thing I did previously was to put the DB installation logic into the application itself,
and the first time it ran and noticed the database was not in the specified RDBMS,
it installed it. Sounds a bit kludgy...
Hmm. I still do that. I think having to have an install program is kludgy
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You said: you can just create a little application that contains all of the SQL you need to deploy your entire schema and knows how to connect to your target RDBMS(es) and can execute the SQL.
How can this be achieved?
I tried SQLPrepare() and SQLExecute()....Please see my reply to David Crow.
|
|
|
|
|
Thnks a lot every one!!!!
I have been able to create a database and a table programmatically
The error wasin the line
SQLAllocHandle(SQL_HANDLE_STMT,hdbc,&hstmt);
I changed it to:
SQLAllocHandle(SQL_HANDLE_STMT,*hdbc,&hstmt);
|
|
|
|