I am not sure if I have a SQL-NS problem or a MMC problem. But hopefully someone has run into and can help.
I am developing an Microsoft Management Console (MMC) snapin that uses the SQL Namespace (SQL-NS) COM interface (I have SQL Server 2000 installed so all SQL components are available). Under certain situations I recieve the error message "Unspecfied error" (HRESULT x80004005) when calling the SQL-NS Initialize method.
This error only occurs when I start MMC, "add" the snapin, and then cause the SQL-NS Initialize method to be invoked. If I load my MMC from a saved .msc file and invoke the SQL-NS Initialize method the error does not occur.
Other interesting facts:
- On my Win2K system, the error may not occur the first few
times but once it does it appears to require a reboot to clear
- On my WinXP test system, the error always occurs when "adding"
the snapin but also never occurs when loading from a saved
- I did some testing using a MFC application and could not reproduce
- I can instantiate and use other COM Interfaces, such as SQL-DMO,
with no problems.
The following paraphrases the test code I use, which doesn't seem to be the problem: