The Old New Thing

Is the atom returned by RegisterClass(Ex) a "real" atom?

A customer was debugging some code that calls Register­Class on a class that's already been registered. In this case, it was registered by another DLL in the same process. Normally, this wouldn't be a problem, because each DLL passes its own instance handle to Register­Class so that there are no name collisions. However, in this case...
Comments are closed.0 0
Code

Access to a file's attributes is controlled by two things

We saw some time ago that permission to delete a file is granted either if you have DELETE access on the file, or if you have FILE_DELETE_CHILD access on the containing directory. File attributes behave in an analogous way. Permission to read a file's attributes is granted either if you have FILE_READ_ATTRIBUTES access on the file...

Why can't I have variadic COM methods?

COM methods cannot be variadic. Why not? Answer: Because the marshaler doesn't know when to stop. Suppose variadic COM methods were possible. And then you wrote this code: interface IVariadic { HRESULT Mystery([in] int code, ...); }; IVariadic *variadic = something; uint32_t ipaddr; HRESULT hr = variadic->Mystery(9, 192, 168, 1, 1...
Comments are closed.0 0
Code