I was compiling the source code using the Windows NMake file and added the /MTd switch instead of the /MT compiler switch so I could debug the source code. When I tried to run the code then I encountered a heap corruption. I tracked the issue down to the zbx_mutex_create_per_process_name function in the src/libs/zbxsys/mutexs.c source file. You can see how I did it in the attached source file. I also corrected the issue and commented out the original line. According to the Microsoft documentation (https://msdn.microsoft.com/en-us/library/f30dzcf6.aspx) the second parameter of the _snwprintf_s function is the count of characters and not the size of the buffer in bytes.