Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

c++ - Use COM Object from DLL without register

Is it possible to use COM Object from DLL without register in C++ not managed code?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yes, if it does not rely internally on other registered objects.

  1. You LoadLibrary the DLL
  2. You GetProcAddress its DllGetClassObject
  3. You call DllGetClassObject to obtain IClassFactory pointer for CLSID of interest
  4. You are good to go with IClassFactory::CreateInstance and instantiate the coclass

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...