1761e72c7Swinesync /*
2761e72c7Swinesync * DLL for testing self-registration
3761e72c7Swinesync *
4761e72c7Swinesync * Copyright 2018 Zebediah Figura
5761e72c7Swinesync *
6761e72c7Swinesync * This library is free software; you can redistribute it and/or
7761e72c7Swinesync * modify it under the terms of the GNU Lesser General Public
8761e72c7Swinesync * License as published by the Free Software Foundation; either
9761e72c7Swinesync * version 2.1 of the License, or (at your option) any later version.
10761e72c7Swinesync *
11761e72c7Swinesync * This library is distributed in the hope that it will be useful,
12761e72c7Swinesync * but WITHOUT ANY WARRANTY; without even the implied warranty of
13761e72c7Swinesync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14761e72c7Swinesync * Lesser General Public License for more details.
15761e72c7Swinesync *
16761e72c7Swinesync * You should have received a copy of the GNU Lesser General Public
17761e72c7Swinesync * License along with this library; if not, write to the Free Software
18761e72c7Swinesync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19761e72c7Swinesync */
20761e72c7Swinesync
21*f4be6dc3SMikhail #if 0
22*f4be6dc3SMikhail #pragma makedep testdll
23*f4be6dc3SMikhail #endif
24*f4be6dc3SMikhail
25761e72c7Swinesync #include <stdarg.h>
26761e72c7Swinesync #include <windef.h>
27761e72c7Swinesync #include <winbase.h>
28761e72c7Swinesync #include <winreg.h>
29761e72c7Swinesync
DllRegisterServer(void)30761e72c7Swinesync HRESULT WINAPI DllRegisterServer(void)
31761e72c7Swinesync {
32761e72c7Swinesync HKEY key;
33761e72c7Swinesync RegCreateKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
34761e72c7Swinesync RegCloseKey(key);
35761e72c7Swinesync return S_OK;
36761e72c7Swinesync }
37761e72c7Swinesync
DllUnregisterServer(void)38761e72c7Swinesync HRESULT WINAPI DllUnregisterServer(void)
39761e72c7Swinesync {
40761e72c7Swinesync RegDeleteKeyA(HKEY_CLASSES_ROOT, "selfreg_test");
41761e72c7Swinesync return S_OK;
42761e72c7Swinesync }
43