ReadFile
The return value of ReadFile is of BOOL type, which means the return value only indicates whether the function succeeds or fails. If the function fails, the return value does […]
The return value of ReadFile is of BOOL type, which means the return value only indicates whether the function succeeds or fails. If the function fails, the return value does […]
The prototype of RegSetValueExA is: LSTATUS RegSetValueExA(HKEY hKey,LPCSTR lpValueName,DWORD Reserved,DWORD dwType,const BYTE *lpData,DWORD cbData); lpData points to the data to be stored in registry. cbData is the number of first […]
Today, we’ll talk about the “simplest” class of Qt, a class we use every day, a class we often do need to care about the details – QString. Despite the […]
If you build a dll using Mingw g++ like: g++ -shared -o myprogrammingnotes.dll myprogrammingnotes.cpp If __declspec(dllexport) is not present in the source file, all functions except the entry point function(DllMain) […]
This is what it looks like when writing an int 0x123456 to a file viewed in hex view of notepad++. At the first glance, you cannot match it with the […]
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 […]