Working with COM objects isnt obvious! =(

Hi! Sry for bad english, first of all =)
Only today i learned something about COM inteface. It is very hard to understand for me, how to use this tool. But i trying to understand =)
I need help from skilled guys, coz my effort gone to noway!

Here is a typical example of my pains:
We have class ID2D1Bitmap that inherited from another class, that i dont need. I need only ID2D1Bitmap class (it is COM class). And i wanted to create one. Simple, realy? =)
All that i can do is:
ID2D1Bitmap *pointerBitmap;
But this is Acces Violation. I need to allocate memory for it.
The only function for creating instances of COM objects i know is
1
2
3
4
5
6
7
HRESULT CoCreateInstance(
  _In_   REFCLSID rclsid,
  _In_   LPUNKNOWN pUnkOuter,
  _In_   DWORD dwClsContext,
  _In_   REFIID riid,
  _Out_  LPVOID *ppv
);

But my problem, is that i cant find CLSID for ID2D1Bitmap! And dont know another parametrs! So, i think: maybe another function will be more usefull? But i cudnt find it!
Guys, plz help me!
Tell me how and where i can find information, about creating new instance of COM-class! I cant find it in MSDN or i dont know WHAT to find and HOW to find it.
Any adwices will be very nice!
Last edited on
This object creating with inner function. My problem were wrong convertation formats.
Topic archived. No new replies allowed.