diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-16 18:09:12 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-16 18:09:12 +0000 |
commit | 27e633391b30caa8d567d9137e2055097727902d (patch) | |
tree | bc9141732e14fcff6de3d8579bdc82a42b76be29 /ace/ACE.cpp | |
parent | 37cef167ad4fe78773ef0b66a483b727c0a043ab (diff) | |
download | ATCD-27e633391b30caa8d567d9137e2055097727902d.tar.gz |
Added debug DLL automatic searching machanism to ACE::ldfind.
Diffstat (limited to 'ace/ACE.cpp')
-rw-r--r-- | ace/ACE.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 42a45f3a749..1c5deb0aaef 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -578,7 +578,7 @@ ACE::ldfind (const ASYS_TCHAR filename[], ASYS_TCHAR tempcopy[MAXPATHLEN + 1]; ASYS_TCHAR searchpathname[MAXPATHLEN + 1]; - ASYS_TCHAR searchfilename[MAXPATHLEN + 1]; + ASYS_TCHAR searchfilename[MAXPATHLEN + 2]; // Create a copy of filename to work with. if (ACE_OS::strlen (filename) + 1 @@ -651,7 +651,18 @@ ACE::ldfind (const ASYS_TCHAR filename[], return -1; } - // Use absolute pathname if there is one. +#if defined (ACE_WIN32) && defined (_DEBUG) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) + size_t len_searchfilename = ACE_OS::strlen (searchfilename); + searchfilename [len_searchfilename] = 'd'; + searchfilename [len_searchfilename+1] = 0; + + for (int tag = 1; tag >= 0; tag --) + { + if (tag == 0) + searchfilename [len_searchfilename] = 0; + +#endif /* ACE_WIN32 && _DEBUG && !ACE_DISABLE_DEBUG_DLL_CHECK */ + // Use absolute pathname if there is one. if (ACE_OS::strlen (searchpathname) > 0) { if (ACE_OS::strlen (searchfilename) @@ -778,6 +789,9 @@ ACE::ldfind (const ASYS_TCHAR filename[], return result; } } +#if defined (ACE_WIN32) && defined (_DEBUG) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) + } +#endif /* ACE_WIN32 && _DEBUG && !ACE_DISABLE_DEBUG_DLL_CHECK */ errno = ENOENT; return -1; |