From e2722e2ccb5459c59d4b801db9de2b92c673621a Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 25 Feb 2013 20:54:17 +0000 Subject: - VC6 compatibility git-svn-id: http://svn.miranda-ng.org/main/trunk@3771 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/pu_stub/make_vc6.bat | 23 +++++++++++++++++++++++ plugins/PluginUpdater/pu_stub/pu_stub.cpp | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 plugins/PluginUpdater/pu_stub/make_vc6.bat (limited to 'plugins') diff --git a/plugins/PluginUpdater/pu_stub/make_vc6.bat b/plugins/PluginUpdater/pu_stub/make_vc6.bat new file mode 100644 index 0000000000..3e3fd613ee --- /dev/null +++ b/plugins/PluginUpdater/pu_stub/make_vc6.bat @@ -0,0 +1,23 @@ +:: set path to your Visual studio folder here! +:: Root of Visual Developer Studio. +set VSDir=%programfiles%\Microsoft Visual Studio +:: ---------------------------------------------- + + +:: Root of Visual Developer Studio Common files. +set VSCommonDir=%VSDir%\Common + +:: Root of Visual Developer Studio installed files. +set MSDevDir=%VSDir%\Common\msdev98 + +:: Root of Visual C++ installed files. +set MSVCDir=%VSDir%\VC98 + +:: Setting environment for using Microsoft Visual C++ tools. +set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE% +set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB% +set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\WINNT;%VSCommonDir%\TOOLS;%PATH% + +cl /O1 /MD -D_UNICODE -DUNICODE pu_stub.cpp + +del /f /q *.obj \ No newline at end of file diff --git a/plugins/PluginUpdater/pu_stub/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/pu_stub.cpp index ef9d7f0352..3ac358d4d4 100644 --- a/plugins/PluginUpdater/pu_stub/pu_stub.cpp +++ b/plugins/PluginUpdater/pu_stub/pu_stub.cpp @@ -65,7 +65,11 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int) hInst = hInstance; TCHAR tszPipeName[MAX_PATH]; - _stprintf_s(tszPipeName, MAX_PATH, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine); + #ifdef _MSC_VER < 1400 + _stprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine); + #else + stprintf_s(tszPipeName, MAX_PATH, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine); + #endif log( L"Opening pipe %s...", tszPipeName); HANDLE hPipe = CreateFile(tszPipeName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (hPipe == INVALID_HANDLE_VALUE) { -- cgit v1.2.3