|
ok i did that, and did a rebuild all, but it still doesn't work... anything else?
thanks
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
Strange, it worked for me and a handful of others I've talked to. I wonder if there's a setting that doesn't get updated from VC6 to 2005 that does with 2003 to 2005.
I would just create a simple VS 2005 project, and verify that the Linker -> Manifest File and Manifest Tool settings match that of your updated project.
If they're the same, and you still can't get it to work, I'd try posting something to the MSDN forums:
http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=8&SiteID=1
"My dog worries about the economy. Alpo is up to 99 cents a can. That's almost seven dollars in dog money" - Wacky humour found in a business magazine
|
|
|
|
|
Try removing the #ifdef _UNICODE .... #endif block
-Prakash
|
|
|
|
|
Brilliant! That did it.... Thanks
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
We use a combination of malloc() and the new operator in our VC++ programs. How can we get a summary of either or both items total memory allocation? The heap walker stuff doesn't seem to do anything unless you use those dinosaur LocalAlloc() / GlobalAlloc() calls which are not portable to Unix.
thanks for any help
|
|
|
|
|
|
Another method would be to use "Performance Counters" on that process. I believe there may be a few other APIs that get various information as well.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
Thanks Toby! There's still too much instrumentation for our simple needs. Here is what made the boss happy:
C:\Temp>printmemorystats.exe
total used 5054, free 760
OK - end of heap
total used 10174, free 3816
OK - end of heap
total used 12222, free 1760
OK - end of heap
total used 16318, free 5848
OK - end of heap
total used 24510, free 9936
OK - end of heap
total used 40894, free 14024
OK - end of heap
total used 73662, free 22128
OK - end of heap
total used 139198, free 26216
OK - end of heap
total used 270270, free 30304
OK - end of heap
total used 532414, free 34392
OK - end of heap
<code>#include <malloc.h>
#include <stdio.h>
static void PrintMemoryStats();
int main()
{
int sizemem=1024;
int ii;
char *foo;
for (ii=0; ii<10; ii++) {
PrintMemoryStats();
foo = malloc(sizemem);
sizemem *= 2;
}
}
static void PrintMemoryStats()
{
_HEAPINFO hinfo;
int heapstatus;
long totalUsed = 0, totalFree = 0;
hinfo._pentry = NULL;
while( ( heapstatus = _heapwalk( &hinfo ) ) == _HEAPOK )
{
if (hinfo._useflag == _USEDENTRY)
totalUsed += hinfo._size;
else if (hinfo._useflag == _FREEENTRY)
totalFree += hinfo._size;
}
printf ("total used %ld, free %ld\n", totalUsed, totalFree);
switch( heapstatus )
{
case _HEAPEMPTY:
printf( "OK - empty heap\n" );
break;
case _HEAPEND:
printf( "OK - end of heap\n" );
break;
case _HEAPBADPTR:
printf( "ERROR - bad pointer to heap\n" );
break;
case _HEAPBADBEGIN:
printf( "ERROR - bad start of heap\n" );
break;
case _HEAPBADNODE:
printf( "ERROR - bad node in heap\n" );
break;
}
}
</code>
-- modified at 15:25 Friday 27th January, 2006</code>
|
|
|
|
|
See if this helps.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I need to make a combobox by which user can choose color they want. what kind of method can I use?
thanks.
|
|
|
|
|
|
Although it's not a combobox, there's also MFC's CColorDialog class.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Help!
Does anybody know the code on the web page, mentioned below? It should make working with ListControls much easier.
I added the code to my project, and made the changements in the code as described. I am using a dialog-based application. To make it work, do I have to create a dialog, which is equal to the one, which is shown in the example? Or should it work for every dialog using a ListBox?
Thanks!
-- modified at 10:49 Friday 27th January, 2006
|
|
|
|
|
Try posting your questions on the message board for that article - you'll probably get better help there (as the article author will get your question emailed to him)
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
class A
{
public :
virtual void foo() { } ;
};
class B : public virtual A
{
public :
virtual void foo() { } ;
};
class C : public virtual A
{
public :
virtual void foo() { } ;
};
class D : public B , public C
{
public :
} ;
say somewhere in code
D *ptr ;
..
....
ptr->Foo()
whose copy of Foo() will i call ? Will it be B's copy as it is the first inherited class during declaration from left to right ?
|
|
|
|
|
act_x wrote: whose copy of Foo() will i call ?
Why not just try it and see?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I don't know, and I always try not to do that kind of multiple inheritance; and having a common base class worsen it.
I think that the
the way ( i think ) to resolve ambiguity, is to explicitly call the method :
ptr->B::food();
ptr->C::food();
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
act_x wrote: whose copy of Foo() will i call ?
None. The code will not even compile.
And adding virtual keyword to B and C classes does not have a sense in this case as the existance of class A.
Try compiling next code, it will not compile also :
#include "stdafx.h"
#include <iostream>
using namespace std;
class B
{
public :
virtual void foo() { } ;
};
class C
{
public :
virtual void foo() { } ;
};
class D : public B , public C
{
public :
} ;
int _tmain(int argc, _TCHAR* argv[])
{
D *ptr = new D ;
ptr->foo();
delete ptr;
return 0;
}
Adding virtual keyword assures that D will inherit just one copy of members of A.
Consider we have next code :
#include "stdafx.h"
#include <iostream>
using namespace std;
class A
{
public :
virtual void GetX() { cout<<X; } ;
int X;
};
class B : public virtual A
{
public :
void setXB() {X = 20;}
};
class C : public virtual A
{
public :
void setXC() {X = 30;}
};
class D : public B , public C
{
public :
} ;
int _tmain(int argc, _TCHAR* argv[])
{
D *p = new D();
p->setXC();
p->setXB();
p->GetX();
delete p;
return 0;
}
PS. By adding virtual keyword to B and C classes we are sure that B and C " share same instance of class A ".
Therefore output will be 20.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 14:06 Friday 27th January, 2006
|
|
|
|
|
I have a 2 dimensional array created with the new operater,
int (*treeinbunch)[1000][20];
treeinbunch = new int [1000][1000][20];
that works fine throughout the program. When I try to pass it to a function to retrieve values from it, it doesn't work.
The function call uses this: function(int piece[1000][20]) and compiles fine, but
the values of piece in the function are garbage. If I replace piece in the function with *treeinbunch[index][index] it works fine. Why isn't piece initialized with the values of treeinbunch? How do I pass the array treeinbunch without losing its values?
Fleetmanager gone wrong
-- modified at 11:11 Friday 27th January, 2006
|
|
|
|
|
fleetmanager wrote: If I replace piece in the function with *treeinbunch[index][index] it works fine...How do I pass the array treeinbunch without losing its values?
Aren't these two contradictory? Are you still losing values with the modified function signature?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
m_bAutoMenuEnable is member of CFrameWnd.
how to Auto Enable Menu for dialog similar to CFrameWnd?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
as far as I know, in dialogs, there is no ON_UPDATE_COMMAND_UI equivalent, you need to handle all of them manually.
( but I might be wrong ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If 2 users use the smae software (liencense count = 1) at same time, so it is illegal.
my question is:
How to monitor users who are illegal.
E.g. one idea may be:
when user installs my software, my software sends user info(i.e. computer name) to me, I record it.
so second user can not install again.
when user uninstalls, I remove the record, so second user can install.
but how to record user info? because my site uses mysql database, which requires pre-allowed ip address, so my software can not access mysql database from user's computer.
any comments for this idea, or any other comments?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
includeh10 wrote: E.g. one idea may be:
when user installs my software, my software sends user info(i.e. computer name) to me, I record it.
This makes the big assumption that the computer has Internet or e-mail.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
personally, I would be pissed if I cannot install a software if someone else already installed it.
running it is another matter.
There is no way to prevent malicious users to run and install multiple copies of a software on more than one machine; either with licensing servers, hardware keys, passwords, registration, ... It just makes it harder, but not impossible.
one software I use has the following scheme, it ships with a serial number, the serial is used to register on their site, once it's done, they send back a full ( and bigger ) license key that will be used to unlock the software; the company allows the SW to be run ( as full versions ) on 2 different computers, and will check when you submit a second time ( or more ) the serial key; and will not send back the full key if the 2 hardware are used. The company also let you "unregister" hardware, but it's more complicated, you have to contact them personally ( i think, I never did it )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|