Added string lookup tool
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7251 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
79df77fa82
commit
60ab777e21
10 changed files with 426 additions and 43 deletions
|
@ -60,6 +60,9 @@ HMODULE LoadSysLibrary(LPCSTR Mod)
|
|||
return LoadLibrary(path);
|
||||
}
|
||||
|
||||
#ifdef DECLSPEC_NOINLINE
|
||||
DECLSPEC_NOINLINE
|
||||
#endif
|
||||
FARPROC GetSysProcAddr(LPCSTR Mod, LPCSTR FuncName)
|
||||
{
|
||||
return GetProcAddress(LoadSysLibrary(Mod), FuncName);
|
||||
|
@ -436,7 +439,7 @@ static DWORD RegReadString(HKEY hKey, LPCTSTR Name, LPTSTR Buf, DWORD cbBufSize)
|
|||
return ec;
|
||||
}
|
||||
|
||||
static DWORD RegOpenKeyForReading(HKEY hRoot, LPCTSTR SubKey, HKEY*pKey) {
|
||||
DWORD RegOpenKeyForReading(HKEY hRoot, LPCTSTR SubKey, HKEY*pKey) {
|
||||
return RegOpenKeyEx(hRoot, SubKey, 0, KEY_READ, pKey);
|
||||
}
|
||||
|
||||
|
@ -519,9 +522,9 @@ void SaveWindowPos(HWND hwnd) {
|
|||
HKEY hKey;
|
||||
WINDOWPLACEMENT p;
|
||||
p.length = sizeof(p);
|
||||
GetWindowPlacement(hwnd, &p);
|
||||
if (CreateRegSettingsKey(hKey)) {
|
||||
RegSetValueEx(hKey, REGLOC, 0, REG_BINARY, (LPBYTE)&p, sizeof(p));
|
||||
if (!GetWindowPlacement(hwnd, &p)) p.length = 0;
|
||||
if (p.length && CreateRegSettingsKey(hKey)) {
|
||||
RegSetValueEx(hKey, REGLOC, 0, REG_BINARY, (LPBYTE)&p, p.length);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue