2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 23:25:38 +00:00

update copyright notice

This commit is contained in:
Automatic Updater
2008-12-14 21:33:25 +00:00
parent cdd2498994
commit a4cd1c315a
4 changed files with 82 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Portions Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2001, 2003 Internet Software Consortium. * Portions Copyright (C) 2001, 2003 Internet Software Consortium.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: BINDInstallDlg.cpp,v 1.38 2008/12/14 21:27:24 marka Exp $ */ /* $Id: BINDInstallDlg.cpp,v 1.39 2008/12/14 21:33:22 tbox Exp $ */
/* /*
* Copyright (c) 1999-2000 by Nortel Networks Corporation * Copyright (c) 1999-2000 by Nortel Networks Corporation
@@ -76,7 +76,7 @@ static char THIS_FILE[] = __FILE__;
typedef struct _xexception typedef struct _xexception
{ {
_xexception(UINT string, ...); _xexception(UINT string, ...);
CString resString; CString resString;
} Exception; } Exception;
@@ -233,7 +233,7 @@ BOOL CBINDInstallDlg::OnInitDialog() {
dirname[index] = '\0'; dirname[index] = '\0';
CString Dirname(dirname); CString Dirname(dirname);
m_currentDir = Dirname; m_currentDir = Dirname;
CVersionInfo bindInst(filename); CVersionInfo bindInst(filename);
if(bindInst.IsValid()) if(bindInst.IsValid())
m_version.Format(IDS_VERSION, bindInst.GetFileVersionString()); m_version.Format(IDS_VERSION, bindInst.GetFileVersionString());
@@ -256,7 +256,7 @@ BOOL CBINDInstallDlg::OnInitDialog() {
&dwBufLen) == ERROR_SUCCESS) &dwBufLen) == ERROR_SUCCESS)
if (strcmp(buf, "")) if (strcmp(buf, ""))
m_defaultDir = buf; m_defaultDir = buf;
RegCloseKey(hKey); RegCloseKey(hKey);
} }
m_targetDir = m_defaultDir; m_targetDir = m_defaultDir;
@@ -318,14 +318,14 @@ void CBINDInstallDlg::OnBrowse() {
* User pressed the exit button * User pressed the exit button
*/ */
void CBINDInstallDlg::OnExit() { void CBINDInstallDlg::OnExit() {
EndDialog(0); EndDialog(0);
} }
/* /*
* User pressed the uninstall button. Make it go. * User pressed the uninstall button. Make it go.
*/ */
void CBINDInstallDlg::OnUninstall() { void CBINDInstallDlg::OnUninstall() {
UpdateData(); UpdateData();
if (MsgBox(IDS_UNINSTALL, MB_YESNO) == IDYES) { if (MsgBox(IDS_UNINSTALL, MB_YESNO) == IDYES) {
if (CheckBINDService()) if (CheckBINDService())
@@ -337,7 +337,7 @@ void CBINDInstallDlg::OnUninstall() {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
return; return;
} }
SC_HANDLE hService = OpenService(hSCManager, BIND_SERVICE_NAME, SC_HANDLE hService = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS); SERVICE_ALL_ACCESS);
if (!hService && GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST){ if (!hService && GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST){
@@ -349,7 +349,7 @@ void CBINDInstallDlg::OnUninstall() {
QueryServiceStatus(hService, &ss); QueryServiceStatus(hService, &ss);
if (ss.dwCurrentState == SERVICE_RUNNING) { if (ss.dwCurrentState == SERVICE_RUNNING) {
BOOL rc = ControlService(hService, BOOL rc = ControlService(hService,
SERVICE_CONTROL_STOP, &ss); SERVICE_CONTROL_STOP, &ss);
if (rc == FALSE || ss.dwCurrentState != SERVICE_STOPPED) { if (rc == FALSE || ss.dwCurrentState != SERVICE_STOPPED) {
MsgBox(IDS_ERR_STOP_SERVICE, GetErrMessage()); MsgBox(IDS_ERR_STOP_SERVICE, GetErrMessage());
return; return;
@@ -358,7 +358,7 @@ void CBINDInstallDlg::OnUninstall() {
} }
CloseServiceHandle(hService); CloseServiceHandle(hService);
CloseServiceHandle(hSCManager); CloseServiceHandle(hSCManager);
// Directories // Directories
m_etcDir = m_targetDir + "\\etc"; m_etcDir = m_targetDir + "\\etc";
m_binDir = m_targetDir + "\\bin"; m_binDir = m_targetDir + "\\bin";
@@ -372,12 +372,12 @@ void CBINDInstallDlg::OnUninstall() {
else else
GetDlgItem(IDC_CREATE_DIR)->SetWindowText("Not Removed"); GetDlgItem(IDC_CREATE_DIR)->SetWindowText("Not Removed");
// Delete registry keys for named // Delete registry keys for named
RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SESSION_SUBKEY); RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SESSION_SUBKEY);
RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SUBKEY); RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SUBKEY);
RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY); RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY);
ProgramGroup(FALSE); ProgramGroup(FALSE);
SetCurrent(IDS_UNINSTALL_DONE); SetCurrent(IDS_UNINSTALL_DONE);
@@ -404,7 +404,7 @@ void CBINDInstallDlg::OnInstall() {
/* /*
* Check that the Passwords entered match. * Check that the Passwords entered match.
*/ */
if (m_accountPassword != m_accountPasswordConfirm) { if (m_accountPassword != m_accountPasswordConfirm) {
MsgBox(IDS_ERR_PASSWORD); MsgBox(IDS_ERR_PASSWORD);
return; return;
@@ -422,7 +422,7 @@ void CBINDInstallDlg::OnInstall() {
MsgBox(IDS_ERR_WHITESPACE); MsgBox(IDS_ERR_WHITESPACE);
return; return;
} }
/* /*
* Check the entered account name. * Check the entered account name.
*/ */
@@ -497,7 +497,7 @@ void CBINDInstallDlg::OnInstall() {
#endif #endif
try { try {
CreateDirs(); CreateDirs();
CopyFiles(); CopyFiles();
RegisterService(); RegisterService();
RegisterMessages(); RegisterMessages();
@@ -514,7 +514,7 @@ void CBINDInstallDlg::OnInstall() {
RegCloseKey(hKey); RegCloseKey(hKey);
} }
SetCurrent(IDS_ADD_REMOVE); SetCurrent(IDS_ADD_REMOVE);
if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY, if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY,
&hKey) == ERROR_SUCCESS) { &hKey) == ERROR_SUCCESS) {
@@ -528,9 +528,9 @@ void CBINDInstallDlg::OnInstall() {
(LPBYTE)(LPCTSTR)buf, buf.GetLength()); (LPBYTE)(LPCTSTR)buf, buf.GetLength());
RegCloseKey(hKey); RegCloseKey(hKey);
} }
ProgramGroup(FALSE); ProgramGroup(FALSE);
if (m_startOnInstall) if (m_startOnInstall)
StartBINDService(); StartBINDService();
} }
@@ -571,7 +571,7 @@ void CBINDInstallDlg::CreateDirs() {
SetCurrent(IDS_CREATE_DIR, m_binDir); SetCurrent(IDS_CREATE_DIR, m_binDir);
if (!CreateDirectory(m_binDir, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) if (!CreateDirectory(m_binDir, NULL) && GetLastError() != ERROR_ALREADY_EXISTS)
throw(Exception(IDS_ERR_CREATE_DIR, m_binDir, GetErrMessage())); throw(Exception(IDS_ERR_CREATE_DIR, m_binDir, GetErrMessage()));
SetItemStatus(IDC_CREATE_DIR); SetItemStatus(IDC_CREATE_DIR);
} }
@@ -605,7 +605,7 @@ void CBINDInstallDlg::CopyFiles() {
installFiles[i].filename; installFiles[i].filename;
CString filespec = m_currentDir + "\\" + installFiles[i].filename; CString filespec = m_currentDir + "\\" + installFiles[i].filename;
CVersionInfo bindFile(destFile); CVersionInfo bindFile(destFile);
CVersionInfo origFile(filespec); CVersionInfo origFile(filespec);
if (!origFile.IsValid() && installFiles[i].checkVer) { if (!origFile.IsValid() && installFiles[i].checkVer) {
if (MsgBox(IDS_FILE_BAD, MB_YESNO, if (MsgBox(IDS_FILE_BAD, MB_YESNO,
@@ -614,9 +614,9 @@ void CBINDInstallDlg::CopyFiles() {
installFiles[i].filename, installFiles[i].filename,
GetErrMessage())); GetErrMessage()));
} }
try { try {
/* /*
* Ignore Version checking. We need to make sure that all files get copied regardless * Ignore Version checking. We need to make sure that all files get copied regardless
* of whether or not they are earlier or later versions since we cannot guarantee * of whether or not they are earlier or later versions since we cannot guarantee
* that we have either backward or forward compatibility between versions. * that we have either backward or forward compatibility between versions.
@@ -625,7 +625,7 @@ void CBINDInstallDlg::CopyFiles() {
} }
catch(...) { catch(...) {
if (installFiles[i].importance != FileData::Trivial) { if (installFiles[i].importance != FileData::Trivial) {
if (installFiles[i].importance == if (installFiles[i].importance ==
FileData::Critical || FileData::Critical ||
MsgBox(IDS_ERR_NONCRIT_FILE, MB_YESNO, MsgBox(IDS_ERR_NONCRIT_FILE, MB_YESNO,
installFiles[i].filename, installFiles[i].filename,
@@ -652,10 +652,10 @@ void CBINDInstallDlg::DeleteFiles(BOOL uninstall) {
destFile = DestDir(installFiles[i].destination) + "\\" + destFile = DestDir(installFiles[i].destination) + "\\" +
installFiles[i].filename; installFiles[i].filename;
if (uninstall) if (uninstall)
SetCurrent(IDS_DELETE_FILE, installFiles[i].filename); SetCurrent(IDS_DELETE_FILE, installFiles[i].filename);
DeleteFile(destFile); DeleteFile(destFile);
} }
@@ -664,10 +664,10 @@ void CBINDInstallDlg::DeleteFiles(BOOL uninstall) {
CString file = m_etcDir + "\\*.*"; CString file = m_etcDir + "\\*.*";
BOOL rc; BOOL rc;
HANDLE hFile; HANDLE hFile;
hFile = FindFirstFile(file, &findData); hFile = FindFirstFile(file, &findData);
rc = hFile != INVALID_HANDLE_VALUE; rc = hFile != INVALID_HANDLE_VALUE;
while (rc == TRUE) { while (rc == TRUE) {
if (strcmp(findData.cFileName, ".") && if (strcmp(findData.cFileName, ".") &&
strcmp(findData.cFileName, "..")) { strcmp(findData.cFileName, "..")) {
@@ -682,7 +682,7 @@ void CBINDInstallDlg::DeleteFiles(BOOL uninstall) {
if (uninstall) if (uninstall)
SetItemStatus(IDC_COPY_FILE, TRUE); SetItemStatus(IDC_COPY_FILE, TRUE);
} }
/* /*
* Get the service account name out of the registry, if any * Get the service account name out of the registry, if any
@@ -704,7 +704,7 @@ CBINDInstallDlg::GetCurrentServiceAccountName() {
else { else {
m_serviceExists = FALSE; m_serviceExists = FALSE;
} }
if (keyFound == TRUE) { if (keyFound == TRUE) {
/* Get the named service account, if one was specified */ /* Get the named service account, if one was specified */
if (RegQueryValueEx(hKey, "ObjectName", NULL, NULL, if (RegQueryValueEx(hKey, "ObjectName", NULL, NULL,
@@ -812,8 +812,8 @@ CBINDInstallDlg::RegisterService() {
hService = CreateService(hSCManager, BIND_SERVICE_NAME, hService = CreateService(hSCManager, BIND_SERVICE_NAME,
BIND_DISPLAY_NAME, SERVICE_ALL_ACCESS, dwServiceType, dwStart, BIND_DISPLAY_NAME, SERVICE_ALL_ACCESS, dwServiceType, dwStart,
SERVICE_ERROR_NORMAL, namedLoc, NULL, NULL, NULL, StartName, SERVICE_ERROR_NORMAL, namedLoc, NULL, NULL, NULL, StartName,
m_accountPassword); m_accountPassword);
if (!hService && GetLastError() != ERROR_SERVICE_EXISTS) if (!hService && GetLastError() != ERROR_SERVICE_EXISTS)
throw(Exception(IDS_ERR_CREATE_SERVICE, GetErrMessage())); throw(Exception(IDS_ERR_CREATE_SERVICE, GetErrMessage()));
@@ -938,7 +938,7 @@ void CBINDInstallDlg::RegisterMessages() {
if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_MESSAGE_SUBKEY, &hKey) if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_MESSAGE_SUBKEY, &hKey)
!= ERROR_SUCCESS) != ERROR_SUCCESS)
throw(Exception(IDS_ERR_CREATE_KEY, GetErrMessage())); throw(Exception(IDS_ERR_CREATE_KEY, GetErrMessage()));
/* Add the Event-ID message-file name to the subkey. */ /* Add the Event-ID message-file name to the subkey. */
if (RegSetValueEx(hKey, "EventMessageFile", 0, REG_EXPAND_SZ, if (RegSetValueEx(hKey, "EventMessageFile", 0, REG_EXPAND_SZ,
(LPBYTE)pszMsgDLL, strlen(pszMsgDLL) + 1) != ERROR_SUCCESS) (LPBYTE)pszMsgDLL, strlen(pszMsgDLL) + 1) != ERROR_SUCCESS)
@@ -951,7 +951,7 @@ void CBINDInstallDlg::RegisterMessages() {
throw(Exception(IDS_ERR_SET_VALUE, GetErrMessage())); throw(Exception(IDS_ERR_SET_VALUE, GetErrMessage()));
RegCloseKey(hKey); RegCloseKey(hKey);
SetItemStatus(IDC_REG_MESSAGE); SetItemStatus(IDC_REG_MESSAGE);
} }
@@ -969,7 +969,7 @@ void CBINDInstallDlg::UnregisterMessages(BOOL uninstall) {
/* Remove named from the list of messages sources */ /* Remove named from the list of messages sources */
if (RegDeleteKey(hKey, BIND_MESSAGE_NAME) != ERROR_SUCCESS) if (RegDeleteKey(hKey, BIND_MESSAGE_NAME) != ERROR_SUCCESS)
break; break;
rc = TRUE; rc = TRUE;
break; break;
} }
@@ -996,7 +996,7 @@ void CBINDInstallDlg::FailedInstall() {
*/ */
void CBINDInstallDlg::InstallTags() { void CBINDInstallDlg::InstallTags() {
CString tag; CString tag;
tag.LoadString(IDS_INSTALL_FILE); tag.LoadString(IDS_INSTALL_FILE);
GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag); GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag);
GetDlgItem(IDC_COPY_FILE)->SetWindowText(""); GetDlgItem(IDC_COPY_FILE)->SetWindowText("");
@@ -1008,7 +1008,7 @@ void CBINDInstallDlg::InstallTags() {
tag.LoadString(IDS_INSTALL_SERVICE); tag.LoadString(IDS_INSTALL_SERVICE);
GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag); GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag);
tag.LoadString(IDS_INSTALL_MESSAGE); tag.LoadString(IDS_INSTALL_MESSAGE);
GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag); GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag);
GetDlgItem(IDC_REG_MESSAGE)->SetWindowText(""); GetDlgItem(IDC_REG_MESSAGE)->SetWindowText("");
@@ -1019,7 +1019,7 @@ void CBINDInstallDlg::InstallTags() {
*/ */
void CBINDInstallDlg::UninstallTags() { void CBINDInstallDlg::UninstallTags() {
CString tag; CString tag;
tag.LoadString(IDS_UNINSTALL_FILES); tag.LoadString(IDS_UNINSTALL_FILES);
GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag); GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag);
GetDlgItem(IDC_COPY_FILE)->SetWindowText(""); GetDlgItem(IDC_COPY_FILE)->SetWindowText("");
@@ -1031,7 +1031,7 @@ void CBINDInstallDlg::UninstallTags() {
tag.LoadString(IDS_UNINSTALL_SERVICE); tag.LoadString(IDS_UNINSTALL_SERVICE);
GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag); GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag);
GetDlgItem(IDC_REG_SERVICE)->SetWindowText(""); GetDlgItem(IDC_REG_SERVICE)->SetWindowText("");
tag.LoadString(IDS_UNINSTALL_MESSAGE); tag.LoadString(IDS_UNINSTALL_MESSAGE);
GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag); GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag);
GetDlgItem(IDC_REG_MESSAGE)->SetWindowText(""); GetDlgItem(IDC_REG_MESSAGE)->SetWindowText("");
@@ -1056,7 +1056,7 @@ void CBINDInstallDlg::SetCurrent(int id, ...) {
va_start(va, id); va_start(va, id);
vsprintf(buf, format, va); vsprintf(buf, format, va);
va_end(va); va_end(va);
m_current.Format("%s", buf); m_current.Format("%s", buf);
UpdateData(FALSE); UpdateData(FALSE);
} }
@@ -1066,20 +1066,20 @@ void CBINDInstallDlg::SetCurrent(int id, ...) {
*/ */
void CBINDInstallDlg::StopBINDService() { void CBINDInstallDlg::StopBINDService() {
SERVICE_STATUS svcStatus; SERVICE_STATUS svcStatus;
SetCurrent(IDS_STOP_SERVICE); SetCurrent(IDS_STOP_SERVICE);
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (!hSCManager) { if (!hSCManager) {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
} }
SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME, SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS); SERVICE_ALL_ACCESS);
if (!hBINDSvc) { if (!hBINDSvc) {
MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage());
} }
BOOL rc = ControlService(hBINDSvc, SERVICE_CONTROL_STOP, &svcStatus); BOOL rc = ControlService(hBINDSvc, SERVICE_CONTROL_STOP, &svcStatus);
} }
@@ -1093,7 +1093,7 @@ void CBINDInstallDlg::StartBINDService() {
if (!hSCManager) { if (!hSCManager) {
MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage());
} }
SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME, SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME,
SERVICE_ALL_ACCESS); SERVICE_ALL_ACCESS);
if (!hBINDSvc) { if (!hBINDSvc) {
@@ -1126,7 +1126,7 @@ BOOL CBINDInstallDlg::CheckBINDService() {
/* /*
* Display message boxes with variable args, using string table strings * Display message boxes with variable args, using string table strings
* for the format specifiers * for the format specifiers
*/ */
int CBINDInstallDlg::MsgBox(int id, ...) { int CBINDInstallDlg::MsgBox(int id, ...) {
CString format; CString format;
@@ -1161,10 +1161,10 @@ int CBINDInstallDlg::MsgBox(int id, UINT type, ...) {
/* /*
* Call GetLastError(), retrieve the message associated with the error * Call GetLastError(), retrieve the message associated with the error
*/ */
CString CBINDInstallDlg::GetErrMessage(DWORD err) { CString CBINDInstallDlg::GetErrMessage(DWORD err) {
LPVOID msgBuf; LPVOID msgBuf;
static char buf[BUFSIZ]; static char buf[BUFSIZ];
DWORD len = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, DWORD len = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err == -1 ? GetLastError() : err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msgBuf, 0, NULL ); NULL, err == -1 ? GetLastError() : err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msgBuf, 0, NULL );
@@ -1178,8 +1178,8 @@ CString CBINDInstallDlg::GetErrMessage(DWORD err) {
void CBINDInstallDlg::ProgramGroup(BOOL create) { void CBINDInstallDlg::ProgramGroup(BOOL create) {
TCHAR path[MAX_PATH], commonPath[MAX_PATH], fileloc[MAX_PATH], linkpath[MAX_PATH]; TCHAR path[MAX_PATH], commonPath[MAX_PATH], fileloc[MAX_PATH], linkpath[MAX_PATH];
HRESULT hres; HRESULT hres;
IShellLink *psl = NULL; IShellLink *psl = NULL;
LPMALLOC pMalloc = NULL; LPMALLOC pMalloc = NULL;
ITEMIDLIST *itemList = NULL; ITEMIDLIST *itemList = NULL;
@@ -1197,60 +1197,60 @@ void CBINDInstallDlg::ProgramGroup(BOOL create) {
} }
return; return;
} }
hr = SHGetPathFromIDList(itemList, commonPath); hr = SHGetPathFromIDList(itemList, commonPath);
pMalloc->Free(itemList); pMalloc->Free(itemList);
if (create) { if (create) {
sprintf(path, "%s\\ISC", commonPath); sprintf(path, "%s\\ISC", commonPath);
CreateDirectory(path, NULL); CreateDirectory(path, NULL);
sprintf(path, "%s\\ISC\\BIND", commonPath); sprintf(path, "%s\\ISC\\BIND", commonPath);
CreateDirectory(path, NULL); CreateDirectory(path, NULL);
hres = CoInitialize(NULL); hres = CoInitialize(NULL);
if (SUCCEEDED(hres)) { if (SUCCEEDED(hres)) {
// Get a pointer to the IShellLink interface. // Get a pointer to the IShellLink interface.
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *)&psl); hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *)&psl);
if (SUCCEEDED(hres)) if (SUCCEEDED(hres))
{ {
IPersistFile* ppf; IPersistFile* ppf;
sprintf(linkpath, "%s\\BINDCtrl.lnk", path); sprintf(linkpath, "%s\\BINDCtrl.lnk", path);
sprintf(fileloc, "%s\\BINDCtrl.exe", m_binDir); sprintf(fileloc, "%s\\BINDCtrl.exe", m_binDir);
psl->SetPath(fileloc);
psl->SetDescription("BIND Control Panel");
hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); psl->SetPath(fileloc);
if (SUCCEEDED(hres)) { psl->SetDescription("BIND Control Panel");
WCHAR wsz[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH); hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
hres = ppf->Save(wsz, TRUE); if (SUCCEEDED(hres)) {
ppf->Release(); WCHAR wsz[MAX_PATH];
}
MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH);
hres = ppf->Save(wsz, TRUE);
ppf->Release();
}
if (GetFileAttributes("readme.txt") != -1) { if (GetFileAttributes("readme.txt") != -1) {
sprintf(fileloc, "%s\\Readme.txt", m_targetDir); sprintf(fileloc, "%s\\Readme.txt", m_targetDir);
sprintf(linkpath, "%s\\Readme.lnk", path); sprintf(linkpath, "%s\\Readme.lnk", path);
psl->SetPath(fileloc); psl->SetPath(fileloc);
psl->SetDescription("BIND Readme"); psl->SetDescription("BIND Readme");
hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
if (SUCCEEDED(hres)) { if (SUCCEEDED(hres)) {
WCHAR wsz[MAX_PATH]; WCHAR wsz[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH); MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH);
hres = ppf->Save(wsz, TRUE); hres = ppf->Save(wsz, TRUE);
ppf->Release(); ppf->Release();
} }
psl->Release(); psl->Release();
} }
} }
CoUninitialize(); CoUninitialize();
} }
} }
else { else {
TCHAR filename[MAX_PATH]; TCHAR filename[MAX_PATH];

View File

@@ -1,5 +1,5 @@
<!-- <!--
- Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2006-2008 Internet Systems Consortium, Inc. ("ISC")
- -
- Permission to use, copy, modify, and/or distribute this software for any - Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above - purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
- PERFORMANCE OF THIS SOFTWARE. - PERFORMANCE OF THIS SOFTWARE.
--> -->
<!-- $Id: index.html,v 1.7 2008/12/14 21:14:54 marka Exp $ --> <!-- $Id: index.html,v 1.8 2008/12/14 21:33:25 tbox Exp $ -->
<html> <html>
<head> <head>

View File

@@ -1,8 +1,8 @@
Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2001, 2003 Internet Software Consortium. Copyright (C) 2001, 2003 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: readme1st.txt,v 1.19 2008/12/14 21:14:54 marka Exp $ $Id: readme1st.txt,v 1.20 2008/12/14 21:33:25 tbox Exp $
Release of BIND 9.5 for Window 2000/XP/2003 Release of BIND 9.5 for Window 2000/XP/2003

View File

@@ -1,8 +1,8 @@
Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2001, 2002 Internet Software Consortium. Copyright (C) 2001, 2002 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id: win32-build.txt,v 1.12 2008/12/14 21:14:54 marka Exp $ $Id: win32-build.txt,v 1.13 2008/12/14 21:33:25 tbox Exp $
BIND 9.4 for Win32 Source Build Instructions. 28-May-2005 BIND 9.4 for Win32 Source Build Instructions. 28-May-2005