From 931a7dc1ac0dbc7e6c1083583ced915e572f5b47 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Mar 2019 12:32:44 +0300 Subject: all protocols (even virtual ones) moved to the Protocols folder --- protocols/CurrencyRates/src/CreateFilePath.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 protocols/CurrencyRates/src/CreateFilePath.cpp (limited to 'protocols/CurrencyRates/src/CreateFilePath.cpp') diff --git a/protocols/CurrencyRates/src/CreateFilePath.cpp b/protocols/CurrencyRates/src/CreateFilePath.cpp new file mode 100644 index 0000000000..71490432a9 --- /dev/null +++ b/protocols/CurrencyRates/src/CreateFilePath.cpp @@ -0,0 +1,17 @@ +#include "StdAfx.h" + +tstring CreateFilePath(const tstring &rsName) +{ + wchar_t szPath[_MAX_PATH]; + ::GetModuleFileName(g_plugin.getInst(), szPath, _MAX_PATH); + + wchar_t* p = wcsrchr(szPath, '\\'); + if (p) + *p = 0; + + tstring s(rsName); + FixInvalidChars(s); + tostringstream o; + o << szPath << L"\\CurrencyRates\\" << s; + return o.str(); +} \ No newline at end of file -- cgit v1.2.3