>I want to customize the context menu only within my namespace extension
If the files in pdtobj or folder in pidlFolder passed in do not belong to your namespace extension, return a failure value from your IShellExtInit::Initialize implementation.
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP