|
OK, perhaps you ought to mension who wrote the API. Perhaps others here have used it and know what quirks it has.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
I am upgrading the underling database in my application from Access 97 to Access 2000. I took the approach that I need to update STDAFX.H. Within this resource file is an #include of afxdao.h. I can’t find it on anywhere on my system. (everything compiles ok so it does not seem to be a problem not being there.
Is this the correct approach?
If a down load a new version where does it go in my project
I am using CV++ Can someone assist me in the right direction?
Thanks
TomH
|
|
|
|
|
Ouenstreet wrote:
I am upgrading the underling database in my application from Access 97 to Access 2000. I took the approach that I need to update STDAFX.H.
A change to stdafx.h should not be necessary simply because you went from Access 97 to Access 2000.
Ouenstreet wrote:
Within this resource file is an #include of afxdao.h. I can’t find it on anywhere on my system. (everything compiles ok so it does not seem to be a problem not being there.
Is this the correct approach?
If you've commented out the #include <afxdao.h> statement and your application still compiles ok, it obviously means the file is not needed.
Ouenstreet wrote:
I can’t find it on anywhere on my system.
I found it on my machine in the ...\VC98\MFC\Include folder.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks so much.
I can't believe I missed it. I have upgraded my app to Access 2000 and so far it works. Still more testing to do.
I had to make some minor changes to Daocore.cpp file in the MFC SRC directory and some minor change in my app.
I get lots of answers on this board. Thanks much for all you do.
TomH
TomH
|
|
|
|
|
Ouenstreet wrote:
I had to make some minor changes to Daocore.cpp file...
Generally not considered a good idea. This requires that you rebuild and redistribute the MFC DLLs.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
http://www.codeproject.com/Purgatory/blackozemia.asp
This artivle is word for word out of Deitel's book, C++ How to program book.
This is illegal unless you asked permission First osbano
|
|
|
|
|
My suggestion would be to notify the author of the article, the CP webmaster, and the author of the book. Posting such a message to this forum really serves no purpose.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
At first I thought it meant "A swarm of deadly locusts will descend upon your crops..." or "A horde of angry bullfrogs will infest your rice paddies..." but then I realized he must have meant plagiarizms...
|
|
|
|
|
Blake Miller wrote:
plagiarizms
plagiarisms.
If you are going to criticize someone else's spelling, you had better make sure your own spelling is correct.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Anyone pls can help me on this: i want to read the signal I apply to the line in on the soundcard. It is not necessarily an audible signal ... I simply want to use the soundcard as an AD converter. Thx in advance.
|
|
|
|
|
I am working on a VS.net project. The project has a backup, debug, release, hlp, and res folder. I only want to save the required project files to a version manager program and not save any unnecessary files like .obj files, etc. Which folder(s) contains the necessary files for a project that should be saved??
Jerry
|
|
|
|
|
Your best to back up your main project directory, minus the debug and release folders. The company should keep a copy of the development enviroment and related files, incase the code needs to be recompiled/debuged in the future. That is if the company changes the development eviroment in future years, they need to be able to reproduce the origanal eviroment years down the road (or until the program is no longer supported).
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
look it up in the header file..
If you don't know which is the header file that defines it, do a search for a *.h file with the constant you wonna know the value of. Make the search case sensitive to avoid too many invalid files... But I guess with a const like PURGE_TXABORT even case-insensitive search will result in correct file...
Greets,
Davy
|
|
|
|
|
Place the cursor anywhere on the PURGE_TXABORT value and hit the F12 key. You may be asked if you want to build the browser database.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
check out afxres.h
regards
pradeep
Between the great things we cannot do and the small things we will not do, the danger is that we shall do nothing
|
|
|
|
|
Why? What does that have to do with my reply to wk_vigorous? Knowing where something is located is one thing, but knowing how to find it is another.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I've read a few times that "..doing it THIS operation is no faster than doing it THAT way; just look at the assembly after it's compiled" - or something like that. I've used the Win32 disassembler to look at code, and even seen the assembly for an .exe in VS. But if I write a function, how can I view the assembly for that specific function, so that I could see which takes more operations?
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Are you referring to the /FAs compiler switch?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I really don't know. I'm trying to find out how I can view the difference between this:
//hypothetically, GetRate() performs some intensive calculations that returns an int
for(int i = 0; i < 5; i++)
{
int j = GetRate() * i;
}
and this:
int x = GetRate();
int j;
for(int i = 0; i < 5; i++)
{
j = x * i;
} once they're compiled
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
The latter is going to be a bit more efficient since the GetRate() function is only called once. Also, since the value of x does not change, the compiler is likely to optimize that by using a register.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I already understand that (not that I usually do ) Just in case you didn't know, I am the programmer formerly known as 'bdiamond'. Anyway, I was talking about for other operations that I might not be familiar with. I wrote in another forum once (please CPians forgive me) that using the '+=' operator was faster with CStrings because I read that in a game programming book. One of the forums moderators told me there was no difference. So I put a breakpoint in my code (release version) in an arbitrary function that I used just to test this by going to debug->windows->disassembly and went back throught the disassembly, and this is what I got for two CStrings that started off as "test" and then had "add" concatenated to them.
str += "add";004015BC push offset string "add" (4037D0h) <br />
004015C1 lea ecx,[esp+8] <br />
004015C5 call dword ptr [__imp_ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::operator+= (4031DCh)] <br />
<br />
str2 = str2 + "add";<br />
004015CB push offset string "add" (4037D0h) <br />
004015D0 lea eax,[esp+4] <br />
004015D4 push eax <br />
004015D5 lea ecx,[esp+10h] <br />
004015D9 push ecx <br />
004015DA call ATL::operator+ (4011C0h) <br />
004015DF add esp,0Ch <br />
004015E2 push eax <br />
004015E3 lea ecx,[esp+4] <br />
004015E7 mov byte ptr [esp+18h],2 <br />
004015EC call dword ptr [__imp_ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::operator= (4031D8h)] <br />
004015F2 lea ecx,[esp+8] <br />
004015F6 call dword ptr [__imp_ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > >::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char> > > (403188h)]
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
One of the underlying reasons why the += operator might be a bit faster is that it (possibly) does not have to copy the source strings (the left side of the += ) for most cases. In VC++ 6.0 Release mode, all CString buffers are allocated in predefined amounts (e.g., 64, 128, 256, and 512 bytes). So, unless the strings are very long, the creation of the concatenated string is an optimized version of a strcat() operation (since it knows the location of the end of the string it doesn't have to search for it, as strcat() would; it just calls memcpy() to the correct place) plus a recomputation of the length of the string. So it is about as efficient as the clumsier pure-C code.
Read here for more.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I'm just wondering, how much of a performance increase could I gain from using inline assembly? I know it's all relative to what I'm doing and so on and so forth. But if every nanosecond counts in a processing loop that dealt with a lot of numbers, would inline assembly make it any faster?
int i = 2, x = 2;
int j = x + y;
sprintf("%d",j);
4.7388937 ???
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
I think, this depends how smart is your compiler. If you will do it in the inline assembly (or in the assembly at all) you know exactly what are you doing so you can take the appropriate optimalization (e.g. using registers and memory as needed), compiler can just guess it from your code in the higher level language. Also, compiler writers can optimize only on some common scenarios.
So in theory, with a supersmart compiler, your assembly and result of the compilation should be equal. But in reality, it always depends how smart your compiler is in that specific situation, and how your high-level language is structured and interpreted by the compiler.
|
|
|
|
|