Mercurial > hg > vamp-plugin-load-checker
changeset 18:7eff522b23ae
More useful reporting output
author | Chris Cannam |
---|---|
date | Tue, 01 Nov 2016 15:09:44 +0000 |
parents | 78baaad4a001 |
children | c80c55cabfcd |
files | src/helper.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/helper.cpp Fri Oct 28 14:32:30 2016 +0100 +++ b/src/helper.cpp Tue Nov 01 15:09:44 2016 +0000 @@ -61,7 +61,9 @@ #include <process.h> #include <string> #ifdef UNICODE +static std::string lastLibraryName = ""; static HMODULE LoadLibraryUTF8(std::string name) { + lastLibraryName = name; int n = name.size(); int wn = MultiByteToWideChar(CP_UTF8, 0, name.c_str(), n, 0, 0); wchar_t *wname = new wchar_t[wn+1]; @@ -101,6 +103,10 @@ s.erase(i, 1); } } + std::size_t pos = s.find("%1"); + if (pos != std::string::npos && lastLibraryName != "") { + s.replace(pos, 2, lastLibraryName); + } return s; } #define DLOPEN(a,b) LoadLibraryUTF8(a)