I'd recommend to use XML files for logging. There are tons of libraries to modify XML files. You can then use XSL to convert it into a HTML file. If you link the XML file to the XSL file then loading the XML file with a browser automatically shows the desired HTML page. I learned everything form www.w3schools.com/[^]. Kind regards Marcus
khb
Posts
-
How to create and maintain HTML file? -
VC++ 6.0 - No Unicode in debug output windowI tried all fonts that I can select in VC6's settings but none did the trick. Is there a way to add new fonts? I never figured out how to do this... Kind regards Marcus
-
VC++ 6.0 - No Unicode in debug output windowThank you for your reply Rajesh. Using L"..." shows correct characters if I just type Latin characters. If I use a message box then, for example, Russian characters are shown correctly but not for the debug window. Do you have any further advice for me? Kind regards Marcus
-
VC++ 6.0 - No Unicode in debug output windowHello together, I'm using VC++ 6.0 for developing a Unicode application. It works fine, but I have a problem with Unicode output in the debug window. As described everywhere, I checked "Tools->Options->Debug->Display Unicode strings" and I use the TRACE0, TRACE1, etc. macros. But Unicode characters are still shown as '?'. Does anyone has a solution for this? Thanks in advance... Kind regards Marcus
-
__int64 questionThanks for the tip! But don't forget to pass in the second parameter of operator>> by reference (__int64& value). Then it works perfectly! Regards Marcus
-
SHFileOperation and Vista64David, thank you very much for pointing me out that there is a more recent SDK for VC6. The service pack I already have. Kind regards Marcus
-
SHFileOperation and Vista64Doesn't matter. This confirms my feeling again that someday I have to buy VS20xy :| Kind regards Marcus
-
SHFileOperation and Vista64Then I fear that it won't work. I'm just reading the release notes and they state that the current SDK only applies for VS2005 and VS2008. Anyway, thanks for the hint. Kind regards Marcus
-
SHFileOperation and Vista64Wow! This is unawaited :) A long time ago somebody told me that the PSDKs from 2002 and later don't apply to VC6 any more. Therefore I'm still using the Oct. 2001 version. Does the latest SDK really compile for VC6? Thank you very much for your help! Kind regards Marcus
-
How to remove the carriage return to newline conversion in C.Lines in files are terminated by "\r\n". You still seem to print out the "\n" after handling the "\r". Kind regards Marcus
-
SHFileOperation and Vista64Hello! I've developed an MFC application with VC++6.0. It still works for Vista32, but when I try to move a file to the recycle bin using SHFileOperation on Vista64 then I get the error code 120(ERROR_CALL_NOT_IMPLEMENTED). I know for Vista I should use IFileOperation, but I'm still using VC++6.0. Is there any way to move files to the recycle bin on Vista64 using VC++6.0? Kind regards Marcus
-
Can I declare a control based on OS version in .h file?I'm sorry, I got your sentence "how do we differentiate the OS version (if feasible)" wrong :-O Regards Marcus
-
Can I declare a control based on OS version in .h file?Determining the OS is not so hard. Take a look at the article "XWinVer - Simple class to get windows OS version" by Hans Dietrich. Regards, Marcus.
-
Addstring functionIt depends. If in your case
myobj
is a member of your dialog where the list box belongs to and ifmyobj
is associated with that list box, then no. If you createdmyobj
in some function locally, then yes. Maybe you can have a look at the MFC Controls -> List controls section for some sample code to study. Regards Marcus -
Addstring functionBefore calling
Create(...)
no window exists for the list box. And you can't add items to the list before creating a corresponding window. See MSDN for how to use the function. Regards, Marcus. -
Addstring functionI guess you have to call the CListBox member function
Create(...)
before adding items to the list. Regards Marcus -
How do I count CPU cores?Hi Mike, thanks for your answer. Currently I'm using the code from the article Counting Physical and Logical Processors here on CP. It makes also use of the functions you mentioned. I split up the code on did some tests on the following 2 PCs (I was wrong before: Pentium D has no HT):
- Pentium 4, 3.06GHz, Single core, HT
- Pentium D 950, 3.40GHz, Dual core, No HT
I'd like to calculate the following values:
-
CPUs: 1, #Cores: 1, #Log. CPUs per Core: 2
-
CPUs: 1, #Cores: 2, #Log. CPUs per Core: 1
Now the problem: The functions you mentioned return the following values for both(!) CPUs:
GetSystemInfo.dwNumberOfProcessors: 2
cpuid HTT bit: Set
cpuid # logical CPUs per physical CPU: 2This shows that it's not possible to distinguish between HT and dual core :(( Regards, Marcus.
-
How do I count CPU cores?Now I'm getting confused ;) I just tried
Win32_ComputerSystem
. For example, I can getNumberOfProcessors
correctly. But I can't getNumberOfLogicalProcessors
, it's not in the query result. But this is alright according to MSDN which says aboutNumberOfLogicalProcessors
: Windows Server 2003, Windows XP, Windows 2000, Windows NT 4.0, and Windows Me/98/95: This property is not available. Then I triedWin32_Processor
. For example, I can getName
correctly. But I get neitherNumberOfLogicalProcessors
norNumberOfCores
, they're both not in the query result. But again this is alright, because MSDN states for both properties what I already cited above. Or did I get something completely wrong? Thank you for your patience, David! Regards, Marcus. -
How do I count CPU cores?DavidCrow wrote:
These were added for Vista.
Whoops, I somehow missed that :-O Well, this brings me right back to my initial question: Is there any chance to get the processor specs on non-Vista systems? Regards, Marcus.
-
How do I count CPU cores?DavidCrow wrote:
This makes no sense. If the members of Win32_Processor are not valid, why would you then state that they should contain the data you're looking for?
Maybe I understood wrong what MSDN says. I just read: "To determine the total number of processor instances associated with a computer system object, use the Win32_ComputerSystemProcessor association class."
DavidCrow wrote:
How are you verifying this?
Maybe I'm doing something wrong. I compiled the code with VC6 on my single core P4 with HT enabled (Win XP). I also run the program on a dual core Pentium D with HT enabled (also Win XP). In both cases
NumberOfCores
was not found andNumberOfLogicalProcessors
was 0. I guess that the code works, as I can retrieve other members like, e.g.,Name
correctly. However, I can post the code if you like. Regards, Marcus.