Index: /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.sln
===================================================================
--- /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.sln (revision 391)
+++ /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.sln (revision 392)
@@ -12,15 +12,25 @@
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Debug|Win32.ActiveCfg = Debug|Win32
{2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Debug|Win32.Build.0 = Debug|Win32
+ {2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Debug|x64.ActiveCfg = Debug|x64
+ {2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Debug|x64.Build.0 = Debug|x64
{2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Release|Win32.ActiveCfg = Release|Win32
{2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Release|Win32.Build.0 = Release|Win32
+ {2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Release|x64.ActiveCfg = Release|x64
+ {2890BFE5-E617-4A03-AB3D-DAB56592CB22}.Release|x64.Build.0 = Release|x64
{D1AFB657-936A-4429-BA89-AF45854B5968}.Debug|Win32.ActiveCfg = Debug|Win32
{D1AFB657-936A-4429-BA89-AF45854B5968}.Debug|Win32.Build.0 = Debug|Win32
+ {D1AFB657-936A-4429-BA89-AF45854B5968}.Debug|x64.ActiveCfg = Debug|x64
+ {D1AFB657-936A-4429-BA89-AF45854B5968}.Debug|x64.Build.0 = Debug|x64
{D1AFB657-936A-4429-BA89-AF45854B5968}.Release|Win32.ActiveCfg = Release|Win32
{D1AFB657-936A-4429-BA89-AF45854B5968}.Release|Win32.Build.0 = Release|Win32
+ {D1AFB657-936A-4429-BA89-AF45854B5968}.Release|x64.ActiveCfg = Release|x64
+ {D1AFB657-936A-4429-BA89-AF45854B5968}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
Index: /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.vcxproj
===================================================================
--- /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.vcxproj (revision 391)
+++ /trunk/Utilities/Miscellaneous/GetModuleFileName01/GetModuleFileName01.vcxproj (revision 392)
@@ -6,7 +6,15 @@
Win32
+
+ Debug
+ x64
+
Release
Win32
+
+
+ Release
+ x64
@@ -24,5 +32,20 @@
Static
+
+ Application
+ true
+ v110
+ Unicode
+ Static
+
+ Application
+ false
+ v110
+ true
+ Unicode
+ Static
+
+
Application
false
@@ -38,5 +61,11 @@
+
+
+
+
+
+
@@ -44,9 +73,36 @@
true
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+
+ true
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
false
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+
+ false
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
Use
@@ -78,4 +134,21 @@
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
@@ -86,5 +159,7 @@
Create
+ Create
Create
+ Create
Index: /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.cpp
===================================================================
--- /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.cpp (revision 391)
+++ /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.cpp (revision 392)
@@ -1,17 +1,33 @@
#include "stdafx.h"
+#include
int _tmain(int argc, _TCHAR* argv[])
{
- static LPCTSTR g_pszPath = _T("\\\\?\\D:\\Projects\\Alax.Info\\Repository-Public\\Utilities\\Miscellaneous\\GetModuleFileName01\\Debug\\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\\GetModuleFileName01.exe");
+ TCHAR pszPath[1024] = { 0 };
+ ATLVERIFY(GetModuleFileName(NULL, pszPath + 4, _countof(pszPath) - 4));
+ ATLVERIFY(PathRemoveFileSpec(pszPath + 4));
+ pszPath[0] = _T('\\');
+ pszPath[1] = _T('\\');
+ pszPath[2] = _T('?');
+ pszPath[3] = _T('\\');
+ static const LPCTSTR g_pszSubdirectory = _T("123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
+ _tcscat_s(pszPath, _T("\\"));
+ _tcscat_s(pszPath, g_pszSubdirectory);
+ _tcscat_s(pszPath, _T("\\"));
+ _tcscat_s(pszPath, _T("GetModuleFileName01.exe"));
+ _tprintf(_T("Path: (%d) %s\n"), _tcslen(pszPath), pszPath);
STARTUPINFO StartupInfo;
ZeroMemory(&StartupInfo, sizeof StartupInfo);
StartupInfo.cb = sizeof StartupInfo;
PROCESS_INFORMATION ProcessInformation;
- BOOL bResult = CreateProcess(g_pszPath, NULL, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInformation);
+ BOOL bResult = CreateProcess(pszPath, NULL, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInformation);
if(!bResult)
{
- _tprintf(_T("Error: %d\n"), GetLastError()); // 122 = ERROR_INSUFFICIENT_BUFFER
+ const DWORD nLastError = GetLastError();
+ _tprintf(_T("Error: %d\n"), nLastError);
+ if(nLastError != ERROR_INSUFFICIENT_BUFFER)
+ return 1;
TCHAR pszShortPath[MAX_PATH] = { 0 };
- ATLVERIFY(GetShortPathName(g_pszPath, pszShortPath, _countof(pszShortPath)));
+ ATLVERIFY(GetShortPathName(pszPath, pszShortPath, _countof(pszShortPath)));
_tprintf(_T("Short Path: (%d) %s\n"), _tcslen(pszShortPath), pszShortPath);
bResult = CreateProcess(pszShortPath, NULL, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInformation);
@@ -24,7 +40,18 @@
/*
+
+Win32:
+
+Path: (279) \\?\D:\Projects\Alax.Info\Repository-Public\Utilities\Miscellaneous\GetModuleFileName01\_Bin\Win32\Debug\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\GetModuleFileName01.exe
Error: 122
-Short Path: (90) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\Debug\123456~1\GETMOD~1.EXE
-(90) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\Debug\123456~1\GETMOD~1.EXE
-(90) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\Debug\123456~1\GETMOD~1.EXE
+Short Path: (101) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\_Bin\Win32\Debug\123456~1\GETMOD~1.EXE
+(101) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\_Bin\Win32\Debug\123456~1\GETMOD~1.EXE
+(101) \\?\D:\Projects\ALAX~1.INF\REPOSI~2\UTILIT~1\MISCEL~1\GETMOD~1\_Bin\Win32\Debug\123456~1\GETMOD~1.EXE
+
+x64:
+
+Path: (277) \\?\D:\Projects\Alax.Info\Repository-Public\Utilities\Miscellaneous\GetModuleFileName01\_Bin\x64\Debug\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\GetModuleFileName01.exe
+(259) \\?\D:\Projects\Alax.Info\Repository-Public\Utilities\Miscellaneous\GetModuleFileName01\_Bin\x64\Debug\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\GetMo
+(277) \\?\D:\Projects\Alax.Info\Repository-Public\Utilities\Miscellaneous\GetModuleFileName01\_Bin\x64\Debug\123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\GetModuleFileName01.exe
+
*/
Index: /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.vcxproj
===================================================================
--- /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.vcxproj (revision 391)
+++ /trunk/Utilities/Miscellaneous/GetModuleFileName01/Launch/Launch.vcxproj (revision 392)
@@ -6,7 +6,15 @@
Win32
+
+ Debug
+ x64
+
Release
Win32
+
+
+ Release
+ x64
@@ -24,5 +32,20 @@
Static
+
+ Application
+ true
+ v110
+ Unicode
+ Static
+
+ Application
+ false
+ v110
+ true
+ Unicode
+ Static
+
+
Application
false
@@ -38,5 +61,11 @@
+
+
+
+
+
+
@@ -44,9 +73,36 @@
true
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+
+ true
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
false
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+
+ false
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\
+ $(SolutionDir)_Bin\$(Platform)\$(Configuration)\$(ProjectName)\
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
Use
@@ -78,4 +134,21 @@
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
@@ -86,5 +159,7 @@
Create
+ Create
Create
+ Create