mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
Sorry, I committed stuff I shouldn't
svn path=/trunk/; revision=35731
This commit is contained in:
parent
d1d5f6306d
commit
aa17a34237
1 changed files with 0 additions and 21 deletions
|
@ -47,8 +47,6 @@ DllCanUnloadNow(void)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//#define CHECKPOINT1 ERR("\n");
|
|
||||||
|
|
||||||
STDAPI
|
STDAPI
|
||||||
DllRegisterServer(void)
|
DllRegisterServer(void)
|
||||||
{
|
{
|
||||||
|
@ -57,29 +55,21 @@ DllRegisterServer(void)
|
||||||
WCHAR szNet[20];
|
WCHAR szNet[20];
|
||||||
UINT Length, Offset;
|
UINT Length, Offset;
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
|
if (RegCreateKeyExW(HKEY_CLASSES_ROOT, szNetConnectClass, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
|
||||||
return SELFREG_E_CLASS;
|
return SELFREG_E_CLASS;
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, szName, MAX_PATH))
|
if (LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, szName, MAX_PATH))
|
||||||
{
|
{
|
||||||
szName[MAX_PATH-1] = L'\0';
|
szName[MAX_PATH-1] = L'\0';
|
||||||
RegSetValueW(hKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
RegSetValueW(hKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szNamespaceKey, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szNamespaceKey, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegSetValueW(hSubKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
RegSetValueW(hSubKey, NULL, REG_SZ, szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
||||||
RegCloseKey(hSubKey);
|
RegCloseKey(hSubKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION);
|
Length = swprintf(szNet, L",-%u", IDS_NETWORKCONNECTION);
|
||||||
Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH);
|
Offset = GetModuleFileNameW(netshell_hInstance, &szName[1], MAX_PATH);
|
||||||
if (Offset + Length + 2 < MAX_PATH)
|
if (Offset + Length + 2 < MAX_PATH)
|
||||||
|
@ -90,37 +80,26 @@ DllRegisterServer(void)
|
||||||
RegSetValueExW(hKey, L"LocalizedString", 0, REG_SZ, (const LPBYTE)szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
RegSetValueExW(hKey, L"LocalizedString", 0, REG_SZ, (const LPBYTE)szName, (wcslen(szName)+1) * sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
szName[Offset+1] = L'\0';
|
szName[Offset+1] = L'\0';
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
/* store default icon */
|
/* store default icon */
|
||||||
if (RegCreateKeyExW(hKey, L"DefaultIcon", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
if (RegCreateKeyExW(hKey, L"DefaultIcon", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR));
|
RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR));
|
||||||
RegCloseKey(hSubKey);
|
RegCloseKey(hSubKey);
|
||||||
}
|
}
|
||||||
//CHECKPOINT1;
|
|
||||||
if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
if (RegCreateKeyExW(hKey, L"InProcServer32", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR));
|
RegSetValueW(hSubKey, NULL, REG_SZ, &szName[1], (Offset+1) * sizeof(WCHAR));
|
||||||
RegCloseKey(hSubKey);
|
RegCloseKey(hSubKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
if (RegCreateKeyExW(hKey, L"ShellFolder", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
if (RegCreateKeyExW(hKey, L"ShellFolder", 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DWORD dwAttributes = SFGAO_FOLDER;
|
DWORD dwAttributes = SFGAO_FOLDER;
|
||||||
RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD));
|
RegSetValueExW(hSubKey, L"Attributes",0, REG_BINARY, (const LPBYTE)&dwAttributes, sizeof(DWORD));
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECKPOINT1;
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue