Memory Allocation Profiling is Managed Only!

People have been discovering that the VS Team System profiler can collect allocation data for an application.  It isn’t long after that they discover that it only works on managed code, not native.  Sadly, the documentation is not clear on this. The memory alloction profiling support in VSTS uses the profiler API provided by the CLR. …

2

How to shoot yourself in the foot with const (or the lack thereof)

It has long puzzled me why various Win32 functions take non-const string parameters, when clearly they have no business manipulating the string.  Take, for instance, GetNamedSecurityInfo: DWORD GetNamedSecurityInfo( LPTSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID* ppsidOwner, PSID* ppsidGroup, PACL* ppDacl, PACL* ppSacl, PSECURITY_DESCRIPTOR* ppSecurityDescriptor ); I can’t imagine why this function should ever need to…

2