Is the dll registered as a COM component on your PC?
The code is correct, and usually works without registration, but maybe this dll wants to be registered anyway.
I use Tools/Type Libraries and register component and library again, it shows that results : Component :failed Library:Success (I remember the results : Component :Success Library:Success for first time ?)
Is correct?
Try to register with regsvr32.exe, it probably has a "verbose" option that may give more info why it fails.
Before, exit QM to make sure that the dll is not loaded.
Yes, you are right. I don't specify any class name for other dll file , and it can run successfully.
But, the code can not work for previous dll file , I think that it should not be used for QM.