Friday, January 31, 2020

clone old hard driver to SSD

clone old hard driver to SSD


.suo issue in Visual Studio 2017 -- tips in compiling MFC project

tips in compiling MFC project . working on some examples in <Programming MFC ground up > book. first example in the book.

  1. Quick tip: What to do when Visual Studio freaks out and everything is red
  2. Having just installed Xamarin, I first thought that it was the culprit. Or maybe Resharper. Anyway whatever the cause was (and I am still not 100% sure what actually triggered this behavior), recovering from it is actually quite easy:

    1. Close Visual Studio
    2. Delete the SUO file
    3. Restart Visual Studio.

    The SUO file is a hidden file,, which is placed in the same folder as the SLN file. It contains a lot of information such as which files are currently open in the IDE, some local settings, etc. Personally I hate this file because it can cause a lot of trouble if it gets corrupted. And since it is hidden, you don’t always think about it.

    So the rule is: If you see some weird behavior in Visual Studio, try to delete the SUO file first, before you try anything else.

    Update: I was just told that unloading and reloading the project file might help too. I suspect that under the cover this also modifies the SUO file and solves the issue. Good to know :)


    this tip works well: unload project and then reload project.

    Adding to the votes:

    • – Deleting suo did not help
    • – Restarting VS did not help
    • – Unloading and reloading the project solved the issue!

  3. Visual C++ : Please help me with the following code
  4. the answer is: These errors have to do with the fact that your application is using Unicode (wchar_t) strings. The best thing to do is change all your string literals to wide character literals, e.g.

  5. Visual Studio displaying errors even if projects build
  6. My symptoms in VS2019 were that I would build with some errors. Then I'd fix the errors, and the build would work, as shown in the Output window. But the Errors windows still showed the old errors. I could run it just fine. Closing VS2019 and reopneing fixed the issue, but only for a little while. This started happening on version 16.4.3

    This solution seems to work for me:

    Uncheck Tools->Option->Projects and Solutions->General->Allow parallel project initialization

  7. VS 2019 Intellisense reports compile errors when rebuild all does not.
  8. Thank you for report this issues. Do these errors go away if you uncheck Tools > Options > Projects and Solutions > General > Allow parallel project initialization, delete the .vs folder, and reload the solution?

  9. Fixing Visual Studio Intellisense Errors
  10. Clearing up Intellisense There's usually a simple solution when IntelliSense decides to sleep one off:

    Delete the .vs folder

    The .vs folder holds solution related temp data including the .suo file that caches intellisense and some debug data. That folder also holds Web site configuration data for Web projects and a few other things. It's safe to delete this folder - Visual Studio recreates it when it's missing.

    Older versions of Visual Studio (prior to VS 2015) didn't have a separate folder and dumped that same information into files in the solution's root folder.

    In these older versions you can fix Intellisense issues by deleting the Solution's .suo file. Deleting the .vs folder in newer version nukes the .suo file which is responsible for cached IntelliSense and also some cached Debug data. When VS acts up and reports whacky errors that seem wrong, the burning down the .suo file is a nice quick thing to try first.

    To do this:
    1. Shut down VS
    2. Nuke the .vs folder or the .suo file
    3. Restart VS

    The .suo file contains cached IntelliSense data and once that file is off, no amount of recompilation or clearing the project is going to help. Nuke the .suo file. or in VS 2015 or later the .vs folder and get back to sanity.

  11. Quick tip: What to do when Visual Studio freaks out and everything is red

beginner's step on GDI+

memory management research

memory management research. search "memory management" on codeproject.com

  1. Memory Management and RAII
  2. Memory Management for Beginners
  3. CString Management
  4. C++ Memory Management Innovation: GC Allocator
  5. Allocated Memory Management in C
  6. tonious/hash.c
  7. A Primer of the Windows Architecture
  8. Windows Memory Management - Part 2
  9. Memory Allocation Tool
  10. Unable to find atlapp.h file in Visual Studio 2017
  11. Exploiting Managed Memory
  12. Memory Leak Detection
  13. Windows Memory leak detection (update to existing article)
  14. Memory and Memory Corruption
  15. How a weak_ptr Might Prevent Full Memory Cleanup of Managed Object
  16. C++ Memory Pool
  17. How to create a Simple Lock Framework for C++ Synchronization
  18. SmartObject Class (Objective-C like Memory Management) for C++ (A substitute for Smart Pointer maybe?)

  19. What is Msimg32.dll?
  20. VS IDE Editor Tip: Quick Macros
  21. using / namespace
  22. Guide to Image Composition with Win32 MsImg32.dl
  23. Guide to WIN32 Paint for Beginners
  24. Guide to WIN32 Paint for Intermediates
  25. Guide to Win32 Memory DC
  26. Guide to WIN32 Regions
  27. A Guide to WIN32 Clipping Regions

  28. Walking the callstack
  29. C++ Memory Leak Finder
  30. Simple debug log for C++
  31. Easy Detection of Memory Leaks
  32. Diagnostic
  33. Catching Memory Leaks
  34. Memory Leak Detection in C
  35. Handle Management - Complete Solution

Thursday, January 30, 2020

add manifest into my application

tips on TotoriseSVN tool

scheme of software protection

some thoughts of software protection. include three components:

search "updater" in codeproject.com.

  1. software updater. it update software version and check sum into registry item.
  2. software version enforcer. it will check current running software copy version and check sum. then compare the assembly version and check sum in the current registry. if the comparison match/equal, then let current copy working. otherwise disable current working copy. this software enforcer must be signed with my public key.
  3. my software product. it is obfuscated copy first. when it starts to run, it needs to check if my software version enforcer installed, then check public key of my company. if it is my company public key, or no software enforcer installed, then stop working and refuse to run.

  4. Copy Protection for Windows Applications
  5. Copy Protection for Windows Applications (Part 2)
  6. Copy Protection for Windows Applications (Part 3
  7. Copy Protection for Windows Applications (Part 4)

  8. An efficient way for automatic updating
  9. Download-Manager-for-Application-Updates
  10. TU: The Easy Update Library for Your Projects
  11. SmartClient: .NET Self Updating Applications
  12. Updating application clients with a Windows Installer: a simple workaround
  13. CatenaLoigc product
  14. Updater
  15. Adding automatic updates to your program - Part 1
  16. Application Auto Update Revisited
  17. Automatic Online Update Toolkit
  18. Purchase the Software Update Wizard
  19. Simple update check function
  20. UpdaterApp - a Library for Easy Update

  21. Maintenance and Updating of Legacy Code
  22. MS Access (*.mdb) + C#: SELECT, INSERT, DELETE and UPDATE Queries
  23. Batch Image Resizer
  24. An Updated Batch Image Resize Tool