Showing results for April 2015 - The Old New Thing

Apr 29, 2015
0
0

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

Raymond Chen
Raymond Chen

A customer was debugging some code that calls 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 so that there are no name collisions. However, in this case, both DLLs are passing the flag, which m...

Code
Apr 28, 2015
0
0

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

Raymond Chen
Raymond Chen

We saw some time ago that permission to delete a file is granted either File attributes behave in an analogous way. Permission to read a file's attributes is granted either If you want the file's attributes, you could always get it by reading the directory, because one of the pieces of information you get from is the file attributes. There...

CodeTips/Support
Apr 24, 2015
0
0

Why can't I have variadic COM methods?

Raymond Chen
Raymond Chen

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: How would COM know how to marshal this function call? In other words, suppose that is a pointer to a proxy that refers to an object in another process. The COM marshaler...

Code