From 7d5f17edf6b0808838ab18fe83aeaac5803dc756 Mon Sep 17 00:00:00 2001 From: binarymaster Date: Sun, 7 Dec 2014 20:34:04 +0300 Subject: [PATCH] Fix --- src-x86-x64-Fusix/RDPWrap.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src-x86-x64-Fusix/RDPWrap.cpp b/src-x86-x64-Fusix/RDPWrap.cpp index 9fd91af..f1c9991 100644 --- a/src-x86-x64-Fusix/RDPWrap.cpp +++ b/src-x86-x64-Fusix/RDPWrap.cpp @@ -87,14 +87,11 @@ HMODULE GetCurrentModule() } // Correct this -// TODO: Add *wchar_t argument, size argument. Write ExtractFilePath function -// Variable "Filename" will be deleted after you exit the function. -// Stas => vk.com/im -LPCWSTR GetBinaryPath() +// TODO: Write ExtractFilePath function +// see http://forum.sources.ru/index.php?showtopic=48042 +DWORD GetBinaryPath(LPTSTR lpFileName, DWORD nSize) { - wchar_t Filename[256]; - GetModuleFileName(GetCurrentModule(), Filename, 256); - return Filename; + return GetModuleFileName(GetCurrentModule(), lpFileName, nSize); } /*PLATFORM_DWORD SearchAddressBySignature(char *StartPosition, PLATFORM_DWORD Size, char *Signature, int SignatureSize)