You need to built the dll with CRT statically linked, i.e. use /MT instead of /MD.