Hello Avelino,
Thank you for your question and for reaching out with your question today.
Based on the code you provided, it seems that you are correctly registering your custom store provider and physical store. However, there could be a few potential issues that could prevent your CertDllOpenStoreProv
function from being called:
- Ensure your custom CSP DLL (
MyCSP.dll
) is registered properly:- Make sure that you are running the registration process with administrative privileges.
- Check that the DLL is located in a directory where it can be found by the system. Placing it in the same directory as your code or in a system directory (e.g.,
C:\Windows\System32
) should work. - Double-check that the DLL name (
DLL_NAME
) matches the actual name of your custom CSP DLL.
- Verify that the
DllRegisterServer
function is being called:- You can add additional logging or debugging statements to check if the
DllRegisterServer
function is being executed. - Ensure that the function is properly exported from your DLL and can be accessed by the registration process.
- You can add additional logging or debugging statements to check if the
- Confirm the context in which you are attempting to use the custom store:
- When using the Certificates dialog or
certutil
, make sure you are selecting the appropriate store and provider that should trigger the call toCertDllOpenStoreProv
. - The custom store provider (
MY
) and physical store name (My Physical Store
) should match the values you registered.
- When using the Certificates dialog or
By checking the above points and troubleshooting any potential issues, you should be able to identify why your CertDllOpenStoreProv
function is not being called.
I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.
If the reply was helpful, please don’t forget to upvote or accept as answer.