Dynamically add event handlers to controls in a custom .NET control with C#

A few years back I came up with something called “FRF” (Forms Rendering Framework) which allowed me to render any UI (whether they are Web or Windows based) based on a template definition (Yes, this was long before Microsoft released XAML). Anyways, on one of my personal projects I had a requirement to dynamically create […]

Continue Reading

Pass information to .NET control from Native Code with Visual C++

As a follow up to this post on interoperability between .NET and native code, this post describes how we can host a .NET user control from an ActiveX control, but more importantly set properties that drive or change the behaviour of the .NET user control. First of all, we need to define an interface with […]

Continue Reading

Unit testing our Visual C++ code with Microsoft Unit Testing Framework

One of the things I love about unit testing (besides all of the well-known benefits) is the ability to test code without writing a tester or test harness application, but I can pretty much leverage what Microsoft have already built for us. Image below depicts an unit test I’ve written for this JNI .NET bridge or […]

Continue Reading

Beware of where you call _CrtDumpMemoryLeaks

The Visual C++ compiler has a myriad of great features to build robust and high-quality software. A good example of this could be _CrtDumpMemoryLeaks function that allows to detect any memory leaks  that has occurred in the debug heap.  There is an entire section on debugging native code here.  The results produced by the function […]

Continue Reading

Easy and convenient way to convert Wide Characters to Multibyte with modern C++

One  of the most common tasks we developers have to do comes in the form of data conversion. A good example would be converting  void* (equivalent of Object in .NET) to a specific pointer of a different class through reinterpret_cast, this is however one example. Today’s post is about converting strings as Wide Characters to […]

Continue Reading

Some tools that every Visual C++ / .NET developer should have in their toolbox

Hi Community, This post is about some of the tools I use when building stuff or diagnosing misbehaving applications, so I thought it’d come handy to have them, or learn about them [in case you don’t know them] Process Explorer Process Monitor Visual SOS Extension – It’s also documented here DebugView Autoruns WinDBG PerfView DebugDiag […]

Continue Reading

Native Windows Service Example

Hi Community, This blog post describes and explains the steps required to build a native Windows Service. One of the projects I’m currently working on is about a metadata filesystem for Windows (Similar to what WinFS was supposed to be but different in many aspects, mainly because users will have a greater level of customization […]

Continue Reading

Interoperability between Java World and Microsoft World by implementing a MSMQ Bridge in Visual C++

  Hi Community, As Developers, consultants or architects we always have to face challenges when it comes to integrating to existing systems. This is a bit harder when technologies aren’t from the same vendor. This blog post describes an IPC mechanism I had to implement for an integration project that comprised Microsoft technologies and Java. […]

Continue Reading

Building a Visual Studio Add-In To Leverage WinDBG and SOS

  Hi Community, I am currently building an Visual Studio add-in to leverage SOS and make it more user friendly, thus I have called it Visual SOS. On this blog post I will describe the main debugging interfaces that are required as well as an artefact called SOS Wrapper which encapsulates the functionality as a […]

Continue Reading

Microsoft Visual C++ MVP Award for 2015

Hi community, It gives me great pleasure to announce that Microsoft has awarded me with an MVP recognition once again in the Visual C++ category. This is my tenth consecutive time as an MVP award recipient. Wow!!! Who woulda have imagined, MVP award recipient for a decade 🙂 I am thrilled and excited about this, […]

Continue Reading