|
The stl header declaration, <iostream.h> , etc. are all depreciated. Use <iostream> (without the .h) instead.
I Dream of Absolute Zero
|
|
|
|
|
Not sure if this is the right forum for this, but I need to determine whether a given .wma file has DRM set in it or not. I'm working on a project that uses a 3rd party tool to burn CD's, and they have told us that these types of files are not supported, so I need to weed them out before they get there.
I've been digging around MSDN pretty much all morning, and keep going in circles, not really finding anything out. Most of the DRM articles talk about encoding the file to begin with, not what to do after. The only one thing I found about after the fact was this little not to promising tidbit: "The actual mechanics of DRM take place through low-level functions in the operating system. As a result, higher level APIs, such as DirectShow, and the applications built on top of them, such as Windows Media Player, have little opportunity interact directly with DRM."
Any ideas? There must be some way of detecting it.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
I have an application written as a C console mode program. I am considering using MFC to gain access to dbDAO classes.
Can anyone tell me if this is feasable, and if so, how to go about changing my app to MFC console mode?
Thanks
John Alderman
|
|
|
|
|
not directly, as MFC is a superset of Wrappers...
if you really need to develop in MFC, you will have to use your time and your brains to port you code up. otherwise, it will be "a bit" easier for you to use Win32 APIs
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes, you can certainly make your C console mode app link with MFC. Best to start by creating a new console app and select MFC in the app wizard.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I just began to write a database program using ODBC, and got 2 problems.
the 1st was: I used the m_db.ExecuteSQL(), but failed, get error info as "ORA-00911 invalid string "
here is the sample code:
CString sql="drop table employee cascade constraints create table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
this piece of code failed, I don't kown where is wrong .
the another similiar SQL command is below
CString sql="insert into employee values('a',1); insert into employee values('b',2);";
m_db.ExecuteSQL(sql);
this snippet didn't work too. the same error occured !
the 2nd questions is, How can I know if a table exists or not, if the table doesn't exist, the
command
m_db.ExecuteSQL("drop table employee ;")
always failed with erro info "the table or view doesn't exist;"
By executing this snippet, what I want to do is to drop the table first , then create the table again, and import some records, just do a new complete installation.
pseudocode below:
if(table exists)
drop table and create table again
else
create table without drop table or an errror showing "the table or view doesn't exist" prompted.
I don't known how to resolve these problems, Any help will be appreciated!
|
|
|
|
|
Do you know them to be valid and formatted correctly for Oracle?
|
|
|
|
|
CString sql="insert into employee values('a',1); insert into employee values('b',2);";
m_db.ExecuteSQL(sql);
this doesn't work!
but
m_db.ExecuteSQL("insert into employee values('a',1); ");
do work! why!
|
|
|
|
|
I think the sql string is valid. I don't know where is wrong?
|
|
|
|
|
Not sure if this works for tables, but try
create or replace ....; instead of the
drop ...; create ...; I use this all the time for views and procedures. I think it works for tables too.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
do you mean it should looks like below:
CString sql="create or replace table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
instead of
CString sql="drop table employee cascade constraints create table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
How about the 2nd questions?
|
|
|
|
|
Sorry I was wrong, for tables, the 'create or replace' can not be used. I think what you have to code it like the following
CString sql = "drop table employee cascade constraints";
m_db.ExecuteSQL(sql);
sql = "create table employee(name varchar2(90) not null, id number(6) not null)";
m_db.ExecuteSQL(sql);
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Does anyone know how to create a window with the familiar grey canvas/workspace which can house multiple windows which can be restored, maximized and minimized?
|
|
|
|
|
|
Hi all,
Do anyone has some idea on how to implement a toolbar with right- or center-aligned buttons (not the right-aligned text on buttons) with Visual C++?
Looking forward to your warmly reply.
|
|
|
|
|
I'm trying to activate profiling in Visual C++ 6.0.
I've activated Settings->Link->General->Enable Profiling tab.
However Build ->Profile is still greyed out!
|
|
|
|
|
I want to handel WM_MOUSEMOVE message and change color of picture when mouse is over them but my program didn't work and stop working after some minutes
plese help me
thanks a lot
|
|
|
|
|
Can you post the code of your WM_MOUSEMOVE handler?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
You could create a region around the picture and then use PtInRegion in your WM_MOUSEMOVE handler to check if the mouse is over the picture. If it is then you can make the alterations to the picture, if not leave it as is.
Hope this is of some help.
|
|
|
|
|
Hi everybody. Some of you helped me quite a lot since I became a Code Project member. Some of you also know that this help of yours goes in a good cause: I'm working at a freeware which I consider that will be my gift to all of you people that help others on forums. It's not something spectacular, but not something little either.
In the meantime however, I decided that I can give something back sooner, since my freeware is still not completed. An article. I'm thinking about writing an article about how to link Visual C++ with a VB application and viceversa. With all sorts of neat tricks that I learned in the past months. This could be a good resource for programmers that know both languages and want to benefit from the advantages of linking them.
Before I write my article I have one more final question. So that I don't write stupid things.
Is it possible to call a function in a Visual Basic EXE (Application) from a Visual C++ EXE while both applications are running?
OR: Is it possible to call a function in ANY exe from Visual C++? Not necesarily a VB. Something else.
I KNOW that calling a function in a VB DLL, FROM Visual C++ IS possible. But I need to know if this stands true for EXE.
Please answer only if you know the absolute sure answer. Your answer will influence me about how to write the article.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote:
I KNOW that calling a function in a VB DLL, FROM Visual C++ IS possible. But I need to know if this stands true for EXE.
Nope, Unless EXE is ATL SERVER Executable!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
This is a general answer, cause like a lot of things the devil is always in the details. But you can call a function from any executable file when coding in any environment if the following three conditions can be met.
1) The function is exported from the executable file.
2) The calling convention of the function is known and your programming environment supports that calling convention.
3) The signature of the function is known. ie. What does the function return, what is it's name and what parameters does it require.
Usually, regardless of the file being an EXE, a DLL or any type of executable, if you can satisfy all three of the above you should be able to call the function. Oh and if I've forgot something, just blame it on my three Guinness lunch.
Oh and good luck with your article.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Hm. But Visual Basic can't built EXE like C++. C++ I know that has that "def" file which can allow you to specify export functions. Or you can use "dll_export" or something like this. So practically, the only way you can call a function from VB is to make some DLL, not EXE.
Right?
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote:
So practically, the only way you can call a function from VB is to make some DLL, not EXE.
Nope, You can call Method/Property from Interface exposed by OutProcess Server Executable (i.e. Executable based COM/ATL)!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|