1 /*=============================================================================
\r
4 ===============================================================================
\r
5 / Copyright (C) 1997-2007 Sota. All rights reserved.
\r
7 / Redistribution and use in source and binary forms, with or without
\r
8 / modification, are permitted provided that the following conditions
\r
11 / 1. Redistributions of source code must retain the above copyright
\r
12 / notice, this list of conditions and the following disclaimer.
\r
13 / 2. Redistributions in binary form must reproduce the above copyright
\r
14 / notice, this list of conditions and the following disclaimer in the
\r
15 / documentation and/or other materials provided with the distribution.
\r
17 / THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
\r
18 / IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
\r
19 / OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
\r
20 / IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
\r
21 / INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
\r
22 / BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
\r
23 / USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
\r
24 / ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
25 / (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
26 / THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
27 /============================================================================*/
\r
31 #include <winsock2.h>
\r
32 #include <windows.h>
\r
38 #include <windowsx.h>
\r
39 #include <commctrl.h>
\r
45 // SourceForge.JPによるフォーク
\r
46 //#define MAIL_ADDRESS "sota@mwa.biglobe.ne.jp"
\r
47 //#define SOFTWARE "FFFTP"
\r
48 //#define MYNAME "曽田"
\r
49 //#define MYURL "http://www2.biglobe.ne.jp/~sota/"
\r
50 //#define INFOFILE "http://www2.biglobe.ne.jp/~sota/product/update.inf"
\r
51 // TODO: 更新の通知用のINFファイルのURL(SourceForge.JPに作成可能かどうか不明)
\r
52 #define MAIL_ADDRESS "sota@mwa.biglobe.ne.jp"
\r
53 #define SOFTWARE "FFFTP"
\r
54 #define MYNAME "FFFTP Project"
\r
55 #define MYURL "http://sourceforge.jp/projects/ffftp/"
\r
56 #define INFOFILE "http://www2.biglobe.ne.jp/~sota/product/update.inf"
\r
59 /*----- 更新風鐸のローカル情報を書き込む --------------------------------------
\r
66 *----------------------------------------------------------------------------*/
\r
68 void SaveUpdateBellInfo(void)
\r
76 if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Upcheck", 0, KEY_CREATE_SUB_KEY, &hKey1) == ERROR_SUCCESS)
\r
78 if(RegCreateKeyEx(hKey1, MAIL_ADDRESS, 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY|KEY_SET_VALUE, NULL, &hKey2, &Dispos) == ERROR_SUCCESS)
\r
80 RegSetValueEx(hKey2, "Author", 0, REG_SZ, MYNAME, strlen(MYNAME)+1);
\r
81 RegSetValueEx(hKey2, "InfoURL", 0, REG_SZ, INFOFILE, strlen(INFOFILE)+1);
\r
82 RegSetValueEx(hKey2, "DisplayHost", 0, REG_SZ, MYURL, strlen(MYURL)+1);
\r
84 if(RegCreateKeyEx(hKey2, SOFTWARE, 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY|KEY_SET_VALUE, NULL, &hKey3, &Dispos) == ERROR_SUCCESS)
\r
86 Tmp = PROGRAM_VERSION_NUM;
\r
87 RegSetValueEx(hKey3, "Build", 0, REG_DWORD, (CONST BYTE *)&Tmp, sizeof(Tmp));
\r
88 RegSetValueEx(hKey3, "DistinctName", 0, REG_SZ, SOFTWARE, strlen(SOFTWARE)+1);
\r