COM Apartment
When a thread calls CoInitialize(NULL) or CoInitializeEx(NULL,COINIT_APARTMENTTHREADED), it creates a new STA apartment. The creating thread is said to be in the apartment. When the thread later instantiates a COM […]
When a thread calls CoInitialize(NULL) or CoInitializeEx(NULL,COINIT_APARTMENTTHREADED), it creates a new STA apartment. The creating thread is said to be in the apartment. When the thread later instantiates a COM […]
When a program calls the COM lib function CoCreateInstance, what will happen? What work does CoCreateInstance do? How does CoCreateInstance work? The function has a parameter classid. The function looks […]
Unlike science, technique is easy to be followed, cracked, hacked, copied, plagiarized, stolen, even surpassed by others so it need some barriers. Why are there so many evil words associated […]
I hear the DllMain function is called when the process loads the needed dll at the start time, so I write the following code to verify this: //mydll.cpp #include <windows.h> […]
Suppose you have a myprogrammingnotes.dll that contains a COM object. You want to instantiate and use that COM object in your Qt app. How to do that? If myprogrammingnotes.dll contains […]
When running “regsvr32 some.dll”, what keys/names/values are added in the registry?(note that regsvr32 can register both 32bit dll and 64 bit dll on 64bit Windows) Computer\HKEY_CLASSES_ROOT\yourapp.YOURCLASSBinder\ CLSID CurVer Computer\HKEY_CLASSES_ROOT\yourapp.YOURCLASSBinder.1\ CLSID […]
You must know how to use QSslSocket::supportsSsl in your app to check if your Qt lib supports ssl. How does QSslSocket::supportsSsl decide if it supports ssl or not? The function […]
A lib file name typically ends with .a or .lib. A .a suffix lib is a static lib but a .lib suffix lib is either a static lib or an […]
What is a const function? Const functions are defined like int fun() const But only a member function can be const, i.e., there is no concept of const function outside […]
To check the type of a variable in C++, you can use typeid(variable).name(), for example #include <typeinfo> … … int b=9; char c=’a’; char * p=&c; int *d; printf(“%s\n”,typeid(b).name()); printf(“%s\n”,typeid(c).name()); […]