Wednesday, December 05, 2007

C++ library for configuration files

C++ Config File library
+ Simple: one header and one library file
+ Support multiple sections in one configuration file
- The output library under vs2003 is large (2.3M for /MDd)

Configuration File Reader for C++
+ Very simple: one header and one cpp file
+ Using template to reduce codes for different primitives
- Do NOT support
multiple sections

Labels: ,


Tuesday, December 04, 2007

Never Call Virtual Functions during Construction or Destruction

An Excerpt from Effective C++, Third Edition by Scott Meyers

Today I write one piece of codes doing that thing. After reading this
excerpt, the codes are changed to use initialization list to pass parameter to generic class for its construction.

Monday, December 03, 2007

repair offline file (*.ost) of outlook after moved the ost file location

Yesterday I cleaned up my personal data and moved the location of my OST file; unfortunately, outlook 2003 cannot open entirely. It says"...the set of folders could not be opened..."

Searched several solutions, for example, a solution from office.microsoft.com(Repair an .ost or .pst file in Outlook). It seems work but failed eventually and some pieces of information are out of date, e.g. the location of scanost.exe, on my machine it is in C:\Program Files\Common Files\System\MSMAPI\1033


Finally I got a solution that works on TECHSPOT.COM (Cannot open Outlook). A user posted his mail received from Micro$oft technician. The mail content is attached in the end.

Actually the outlook can be configured offline in "Control Panel->Mail->show profiles": the *.pst file is configured in "date files" and *.ost file is defined in "email account".

The email attached:
Thank you for contacting Microsoft Office Online Support Service. My name is ***, and I will be helping you with this service request.

After reviewing the case log, I understand this issue is: You are currently experiencing an Outlook problem, when you open Outlook, you had an error message saying “cannot find server”. You are unable to use Outlook.

If I misunderstand your concerns, please let me know.

Based on my research, the problem may be related to many factors, please try following steps to narrow down the problem.

Step 1: Disable Anti-Virus programs or some other third party program

=========================================================

Please disable any Anti-Virus, firewalls, spy, Anti-Spam programs and check whether you have installed any third party program related to Outlook on your computer. If so, please temporarily disable it.

Does the problem still persist? If so, please go on to the next step:

Step 2: Start Outlook in Safe Mode

=======================
1. Quit Outlook.

2. Choose Start menu -> Run

3. Type "Outlook.exe /safe" and click OK. (Without quotation marks but there is a space in front of "/")

Please perform a test in Outlook Safe Mode.

If the problem persists in Outlook Safe Mode, Please try next step.

Step 3: Create a new profile

===========================================================
Please create a new profile to see if the problem is caused by the corrupt profile

1. Close Outlook.

2. Click Start, and click Control Panel. Click Mail icon.

3. Click Show Profiles.

4. In the "When starting Microsoft Office Outlook, use this profile:" area, please select "Prompt for a profile to be used"

5. Click Add and type the new profile name as you like in the Profile name box.

Note: Please don't choose the same name of your original profile.

6. Choose "Add a new e-mail account" and click Next.

7. Choose your email type and type the necessary information. (You can gain information of the email account from the ISP)

8. Click Next and click Finish.

9. Reopen Outlook. Choose the new profile in the profile list and click OK.

For more information, please refer to the following Knowledge Base article:

287072 OL2002: How to Create a New E-mail Profile for Outlook

http://support.microsoft.com/?id=287072

Note: This article also applies to Outlook 2003

Is the problem resolved in the new profile? If yes, you could import your data from the original profile. You can refer to the following Knowledge Base article on how to import Outlook data:

Q287070 OL2002: How to Back Up, Restore, or Move Outlook Data

http://support.microsoft.com/default.aspx?scid=kb;en-us;287070

Note: This article also applies to Outlook 2003

If the problem persists after you tired above steps, would you please send a screenshot of the exact error to me?

To save the screenshots, please follow the steps below:

(a) When the error appears, press the Print Screen key several times (the Print Screen key is located to the right of the F12 key on the keyboard)

(b) Open Paint or Microsoft Word or WordPad.

(c) Click Edit (menu) -> Paste or press Ctrl + V.

(d) Click File (menu) -> Save. Save it to a file and attach it in email to send it to me.

Please try the suggestions and update me with the result at your earliest convenience. If there is anything unclear in my email, please feel free to let me know. I look forward to hearing from you.

Best regards,

Microsoft Office Setup/Outlook Team
Microsoft Product Support Services

Labels: , , , ,


Sunday, December 02, 2007

Integrate Qt and Dev-C++ in Windows (incompleted)

Integrate Qt and Dev-C++ in Windows

Download:

Qt/Windows Open Source Edition 4.1.4
(Qt/Windows Open Source Edition only support g++ in Windows currently, Visual Studio support is only available in commerical edition)
Dev-C++ 5 (versoin 4.9.9.2)
MinGW 3.4.2 , a g++ compiler in windows

Decompress / install:

Decompress qt-win-opensource-src-4.1.4.zip to D:/cpp/qt/4.1.4 (you could manage your own directory for decompression)
Install MinGW to D:/cpp/mingw/
Install Dev-C++ 5 where you like (must install mingw first, because Dev-C++ 5 will look for a valid g++ compiler)

Compile Qt:

1. Enter command line, go to QT installation directory, for example, D:/cpp/qt/4.1.4
2. Start CONFIGURE tool with parameters you like, e.g.
configure -platform win32-g++ -release -static

notes: -platform win32-g++ means compile QT with g++ compiler in windows (just like mingw)
-release means only generate RELEASE targets (smaller in size, but can not be debugged)
-static means generate library files in static (aggregation) format (*.lib, *.a). This choice cause large linked objects but faster speed and less dependent requirements.
for more parameters, execute configure -help

This page is powered by Blogger. Isn't yours?