Category: ATL

Active Template Library related

MD5 and SHA-1 using CryptoAPI from JScript

Alax.Info Crypt Tools provides an interface to popular cryptography hash functions (AKA one-way functions) for scripting code, such as JScript/JavaScript, VBScript etc. Also might be used in other COM/OLE/ActiveX compatible environments, however this makes less sense due to presence of native API. The usage is rather simple: function MD5(Text){ Hash = WScript.CreateObject(“AlaxInfo.CryptTools.Md5Hash”); Hash.AddStringA(Text); WScript.Echo(“MD5(\”” +…

Read the full article

ATLASSERT vs ATLASSUME

ATL of Visual Studio 2005 contains a new interesting macro, undocumented though, which seems to provide a better hint for detecting bugs. Unlike documented ATLASSERT, ATLASSUME not only asserts on failure, but also makes an infinite loop with __analysis_assume intrinsic inside for the code analysis tool. However it is also important that this intrinsic does…

Read the full article

ATL bug with “Minimize CRT use in ATL” option

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=255092 We are not planning to do any work to improve support for ATLMINCRT in the next release of VisualStudio. Please check MSDN forums or contact developer support team to get help with using ATLMINCRT in VS2005.

Smart ATL/WTL combo box and list view classes to cast and optionally manage typed control item data

Inspired by the post on Yahoo’s WTL group (actually, I have been going to post on this topic for a couple of weeks already). Standard Windows controls (including common controls) that have multiple items (list box, combo box, list view, tree view etc.) have an option to attach user defined value of type DWORD_PTR (LPARAM)…

Read the full article