示例#1
0
LONG WINAPI Mine_RegSetValueExW(HKEY a0, LPCWSTR a1, DWORD a2, DWORD a3, const BYTE* a4, DWORD a5)
{
    if (CFilterMapper2::m_pFilterMapper2 && (a0 == FAKEHKEY || (INT_PTR)a0 < 0)) {
        return ERROR_SUCCESS;
    }
    return Real_RegSetValueExW(a0, a1, a2, a3, a4, a5);
}
示例#2
0
LONG WINAPI Mine_RegSetValueExW(HKEY a0, LPCWSTR a1, DWORD a2, DWORD a3, const BYTE* a4, DWORD a5)
{
    // (INT_PTR)a0 < 0 will catch all attempts to use a predefined HKEY directly
    if (CFilterMapper2::s_pFilterMapper2 && (a0 == FAKEHKEY || (INT_PTR)a0 < 0)) {
        return ERROR_SUCCESS;
    }
    return Real_RegSetValueExW(a0, a1, a2, a3, a4, a5);
}
示例#3
0
LSTATUS APIENTRY RegTree::RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE* lpData, DWORD cbData)
{
	RegPath path;
	ResolveKey(hKey,  path);
	Console::GetInstance().Print(L"SetValueEx: %s, %s\n", path.ToString().c_str(), lpValueName);
	
	return Real_RegSetValueExW(hKey, lpValueName, Reserved, dwType, lpData, cbData);
}
示例#4
0
LONG WINAPI Replace_RegSetValueExW(HKEY hKey,LPCWSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE* lpData,DWORD cbData)
{
	LONG nRet;
	__try
	{
		nRet = Real_RegSetValueExW(hKey, lpValueName, Reserved, dwType, lpData, cbData);
		if(!HOOK_RegSetValueEx)
			return nRet;
		if(GetCurrentProcessId() == ExplorerPID)
			return nRet;
		if(GetCurrentProcessId() == RegMonPID)
			return nRet;
		if((PID == 0) || ((GetCurrentProcessId() == PID) && (PID>0)) )
		{
			if(lpValueName == NULL || lpData == NULL)
				return nRet;
			COPYDATASTRUCT data;
			PARAMS params;
			memset(&params,0,sizeof(PARAMS));
			params.PID = GetCurrentProcessId();
			params.hKey = hKey;
			memcpy(params.buf1, lpValueName, wcslen(lpValueName)*2);
			params.type = dwType;
			if(cbData>MAX_BUF_LEN ) // 判断是否大于第一缓冲区的内容
			{
				memcpy(params.buf2, lpData, MAX_BUF_LEN );
				params.cbbuf2 = MAX_BUF_LEN ;
			}
			else // 存放在第二缓冲区内
			{
				memcpy(params.buf2, lpData, cbData);
				params.cbbuf2 = cbData;
			}
			params.result = nRet;
			
			data.cbData = sizeof(PARAMS);
			data.lpData = (void *)&params;
			data.dwData = TYPE_RegSetValueExW;
			SendMessage(g_hWnd, WM_COPYDATA, (WPARAM)g_hWnd, (LPARAM)&data);
		}
	}__finally
	{
	};
	return nRet;
}
示例#5
0
LONG WINAPI Mine_RegSetValueExW(HKEY a0, LPCWSTR a1, DWORD a2, DWORD a3, BYTE* a4, DWORD a5)
{
	TRACE_SVP5(_T("SET Mine_RegSetValueExW %s") , a1);
	if(CFilterMapper2::m_pFilterMapper2 && (a0 == FAKEHKEY || (int)a0 < 0)) {return ERROR_SUCCESS;}
	return Real_RegSetValueExW(a0, a1, a2, a3, a4, a5);
}