Log Message:
-----------
para says "eff u querykbmap!!"
Modified Files:
--------------
/cvsroot/decaldev/source/Inject:
Manager.cpp
Revision Data
-------------
Index: Manager.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- Manager.cpp 8 Oct 2003 20:57:26 -0000 1.77
+++ Manager.cpp 16 Oct 2003 03:23:53 -0000 1.78
@@ -1288,6 +1288,7 @@
STDMETHODIMP cManager::QueryKeyboardMap(BSTR bstrName, long *pAsciiVal)
{
USES_CONVERSION;
+ // Para > this damned proc
RegKey key;
@@ -1304,28 +1305,33 @@
char* pDest;
char *pEnd;
TCHAR tempbuf[MAX_PATH];
+ TCHAR tempfile[MAX_PATH];
*pAsciiVal = 0;
- if (key.Open (HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00"), KEY_QUERY_VALUE) != ERROR_SUCCESS)
+ if (key.Open(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00"), KEY_QUERY_VALUE) == ERROR_SUCCESS)
{
- return E_FAIL;
+ ZeroMemory(tempbuf, sizeof(tempbuf));
+ if (key.QueryStringValue(_T("Path"), tempbuf, &dwLengthPath) == ERROR_SUCCESS)
+ {
+ dwLengthMap = MAX_PATH;
+ ZeroMemory(tempfile, sizeof(tempfile));
+ if (key.QueryMultiStringValue(_T("CurrentInputMap"), tempfile, &dwLengthMap) != ERROR_SUCCESS)
+ lstrcat(tempbuf, _T("\\default.map"));
+ else
+ {
+ // this is where vc7 was breaking
+ // someone less peaved than me can choose a better answer to the 2 strcat's
+ lstrcat(tempbuf, _T("\\"));
+ lstrcat(tempbuf, tempfile);
+ }
+ }
+ else
+ return E_FAIL;
}
-
- ZeroMemory(tempbuf, sizeof(tempbuf));
-
- if (key.QueryStringValue (_T("Path"), tempbuf, &dwLengthPath) != ERROR_SUCCESS)
- {
+ else
return E_FAIL;
- }
- dwLengthMap = MAX_PATH-dwLengthPath;
-
- if (key.QueryStringValue (_T("CurrentInputMap"), tempbuf, &dwLengthMap) != ERROR_SUCCESS)
- {
- // This seems to be what AC does
- lstrcat (tempbuf, _T("\\default.map"));
- }
hFile = CreateFile(tempbuf, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
|