mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Be consistent in usage of FB_DEFAULT_INSTANCE.
This commit is contained in:
parent
4ad63828ba
commit
d1f5482882
@ -122,7 +122,7 @@ int WINAPI WinMain(
|
|||||||
service_flag = (OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
service_flag = (OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||||
|
|
||||||
if (service_flag) {
|
if (service_flag) {
|
||||||
strcpy(instance, DEFAULT_INSTANCE);
|
strcpy(instance, FB_DEFAULT_INSTANCE);
|
||||||
service_flag = parse_args(lpszCmdLine, instance);
|
service_flag = parse_args(lpszCmdLine, instance);
|
||||||
MemoryPool& pool = *getDefaultMemoryPool();
|
MemoryPool& pool = *getDefaultMemoryPool();
|
||||||
service_name = FB_NEW(pool) Firebird::string(pool);
|
service_name = FB_NEW(pool) Firebird::string(pool);
|
||||||
@ -150,7 +150,7 @@ int WINAPI WinMain(
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
// BRS There is a error in MinGW (3.1.0) headers
|
// BRS There is a error in MinGW (3.1.0) headers
|
||||||
// the parameter of StartServiceCtrlDispatcher is declared const in msvc headers
|
// the parameter of StartServiceCtrlDispatcher is declared const in msvc headers
|
||||||
#if defined(MINGW)
|
#if defined(MINGW)
|
||||||
if (!StartServiceCtrlDispatcher(const_cast<SERVICE_TABLE_ENTRY*>(service_table)))
|
if (!StartServiceCtrlDispatcher(const_cast<SERVICE_TABLE_ENTRY*>(service_table)))
|
||||||
@ -184,7 +184,7 @@ static bool parse_args(LPCSTR lpszArgs, TEXT* instance)
|
|||||||
* Returns
|
* Returns
|
||||||
* A value of true or false depending on if -s is specified.
|
* A value of true or false depending on if -s is specified.
|
||||||
* CVC: Service is the default for NT, use -a for application.
|
* CVC: Service is the default for NT, use -a for application.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
bool is_service = true;
|
bool is_service = true;
|
||||||
@ -231,16 +231,16 @@ static THREAD_ENTRY_DECLARE WINDOW_main(THREAD_ENTRY_PARAM)
|
|||||||
* Functional description
|
* Functional description
|
||||||
*
|
*
|
||||||
* This function is where the actual service code starts.
|
* This function is where the actual service code starts.
|
||||||
* Do all the window init stuff, then fork off a thread for starting
|
* Do all the window init stuff, then fork off a thread for starting
|
||||||
* the server.
|
* the server.
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
|
|
||||||
unsigned long thread_id = 0;
|
unsigned long thread_id = 0;
|
||||||
|
|
||||||
/* If we're a service, don't create a window */
|
/* If we're a service, don't create a window */
|
||||||
if (service_flag) {
|
if (service_flag) {
|
||||||
gds__thread_start(start_and_watch_server, 0,
|
gds__thread_start(start_and_watch_server, 0,
|
||||||
THREAD_medium, 0, &thread_id);
|
THREAD_medium, 0, &thread_id);
|
||||||
|
|
||||||
if (thread_id == (DWORD) -1) {
|
if (thread_id == (DWORD) -1) {
|
||||||
@ -297,7 +297,7 @@ static THREAD_ENTRY_DECLARE WINDOW_main(THREAD_ENTRY_PARAM)
|
|||||||
hWndGbl = hWnd;
|
hWndGbl = hWnd;
|
||||||
|
|
||||||
/* begin a new thread for calling the start_and_watch_server */
|
/* begin a new thread for calling the start_and_watch_server */
|
||||||
gds__thread_start(start_and_watch_server, 0,
|
gds__thread_start(start_and_watch_server, 0,
|
||||||
THREAD_medium, 0, &thread_id);
|
THREAD_medium, 0, &thread_id);
|
||||||
|
|
||||||
if (thread_id == (DWORD) -1) {
|
if (thread_id == (DWORD) -1) {
|
||||||
@ -313,7 +313,7 @@ static THREAD_ENTRY_DECLARE WINDOW_main(THREAD_ENTRY_PARAM)
|
|||||||
SendMessage(hWnd, WM_COMMAND, IDM_CANCEL, 0);
|
SendMessage(hWnd, WM_COMMAND, IDM_CANCEL, 0);
|
||||||
UpdateWindow(hWnd);
|
UpdateWindow(hWnd);
|
||||||
|
|
||||||
MSG message;
|
MSG message;
|
||||||
while (GetMessage(&message, NULL, 0, 0)) {
|
while (GetMessage(&message, NULL, 0, 0)) {
|
||||||
if (hPSDlg) { /* If property sheet dialog is open */
|
if (hPSDlg) { /* If property sheet dialog is open */
|
||||||
/* Check if the message is property sheet dialog specific */
|
/* Check if the message is property sheet dialog specific */
|
||||||
@ -432,7 +432,7 @@ static LRESULT CALLBACK WindowFunc(
|
|||||||
|
|
||||||
case WM_SWITCHICONS:
|
case WM_SWITCHICONS:
|
||||||
nRestarts++;
|
nRestarts++;
|
||||||
gds__thread_start(swap_icons, hWnd,
|
gds__thread_start(swap_icons, hWnd,
|
||||||
THREAD_medium, 0, &thread_id);
|
THREAD_medium, 0, &thread_id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ static LRESULT CALLBACK WindowFunc(
|
|||||||
if (!service_flag) {
|
if (!service_flag) {
|
||||||
HICON hIcon = (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_IBGUARD),
|
HICON hIcon = (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_IBGUARD),
|
||||||
IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
|
||||||
|
|
||||||
NOTIFYICONDATA nid;
|
NOTIFYICONDATA nid;
|
||||||
nid.cbSize = sizeof(NOTIFYICONDATA);
|
nid.cbSize = sizeof(NOTIFYICONDATA);
|
||||||
nid.hWnd = hWnd;
|
nid.hWnd = hWnd;
|
||||||
@ -559,7 +559,7 @@ THREAD_ENTRY_DECLARE start_and_watch_server(THREAD_ENTRY_PARAM)
|
|||||||
*
|
*
|
||||||
* Functional description
|
* Functional description
|
||||||
*
|
*
|
||||||
* This function is where the server process is created and
|
* This function is where the server process is created and
|
||||||
* the thread waits for this process to exit.
|
* the thread waits for this process to exit.
|
||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
@ -642,7 +642,7 @@ THREAD_ENTRY_DECLARE start_and_watch_server(THREAD_ENTRY_PARAM)
|
|||||||
sa.lpSecurityDescriptor = NULL;
|
sa.lpSecurityDescriptor = NULL;
|
||||||
sa.bInheritHandle = TRUE;
|
sa.bInheritHandle = TRUE;
|
||||||
success = CreateProcess(NULL, const_cast<char*>(prog_name.c_str()),
|
success = CreateProcess(NULL, const_cast<char*>(prog_name.c_str()),
|
||||||
&sa, NULL, FALSE, 0,
|
&sa, NULL, FALSE, 0,
|
||||||
NULL, NULL, &si, &pi);
|
NULL, NULL, &si, &pi);
|
||||||
if (success != TRUE)
|
if (success != TRUE)
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
@ -709,7 +709,7 @@ THREAD_ENTRY_DECLARE start_and_watch_server(THREAD_ENTRY_PARAM)
|
|||||||
Sleep(100);
|
Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int ret_val = WaitForSingleObject(procHandle, INFINITE);
|
const int ret_val = WaitForSingleObject(procHandle, INFINITE);
|
||||||
if (ret_val == WAIT_ABANDONED)
|
if (ret_val == WAIT_ABANDONED)
|
||||||
exit_status = CRASHED;
|
exit_status = CRASHED;
|
||||||
else if (ret_val == WAIT_OBJECT_0)
|
else if (ret_val == WAIT_OBJECT_0)
|
||||||
@ -843,7 +843,7 @@ LRESULT CALLBACK GeneralPage(HWND hDlg, UINT unMsg, WPARAM wParam,
|
|||||||
* Description: This is the window procedure for the "General" page dialog
|
* Description: This is the window procedure for the "General" page dialog
|
||||||
* of the property sheet dialog box. All the Property Sheet
|
* of the property sheet dialog box. All the Property Sheet
|
||||||
* related events are passed as WM_NOTIFY messages and they
|
* related events are passed as WM_NOTIFY messages and they
|
||||||
* are identified within the LPARAM which will be pointer to
|
* are identified within the LPARAM which will be pointer to
|
||||||
* the NMDR structure
|
* the NMDR structure
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
HINSTANCE hInstance = (HINSTANCE) GetWindowLongPtr(hDlg, GWLP_HINSTANCE);
|
HINSTANCE hInstance = (HINSTANCE) GetWindowLongPtr(hDlg, GWLP_HINSTANCE);
|
||||||
@ -862,7 +862,7 @@ LRESULT CALLBACK GeneralPage(HWND hDlg, UINT unMsg, WPARAM wParam,
|
|||||||
*/
|
*/
|
||||||
SetDlgItemInt(hDlg, IDC_RESTARTS, nRestarts, FALSE);
|
SetDlgItemInt(hDlg, IDC_RESTARTS, nRestarts, FALSE);
|
||||||
|
|
||||||
/* get the path to the exe.
|
/* get the path to the exe.
|
||||||
Make sure that it is null terminated */
|
Make sure that it is null terminated */
|
||||||
GetModuleFileName(hInstance, szWindowText, sizeof(szWindowText));
|
GetModuleFileName(hInstance, szWindowText, sizeof(szWindowText));
|
||||||
char* pszPtr = strrchr(szWindowText, '\\');
|
char* pszPtr = strrchr(szWindowText, '\\');
|
||||||
@ -913,8 +913,8 @@ LRESULT CALLBACK GeneralPage(HWND hDlg, UINT unMsg, WPARAM wParam,
|
|||||||
ListView_InsertColumn(hWndLog, index, &lvC);
|
ListView_InsertColumn(hWndLog, index, &lvC);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_info* liTemp = log_entry->next;
|
log_info* liTemp = log_entry->next;
|
||||||
LV_ITEM lvI;
|
LV_ITEM lvI;
|
||||||
lvI.cchTextMax = sizeof(liTemp->log_action);
|
lvI.cchTextMax = sizeof(liTemp->log_action);
|
||||||
lvI.mask = LVIF_TEXT;
|
lvI.mask = LVIF_TEXT;
|
||||||
for (index = 0; liTemp->log_action;
|
for (index = 0; liTemp->log_action;
|
||||||
@ -1090,7 +1090,7 @@ void write_log(int log_action, const char* buff)
|
|||||||
LoadString(hInstance_gbl, log_action + 1, tmp_buff,
|
LoadString(hInstance_gbl, log_action + 1, tmp_buff,
|
||||||
sizeof(tmp_buff));
|
sizeof(tmp_buff));
|
||||||
sprintf(act_buff[0], "%s", buff);
|
sprintf(act_buff[0], "%s", buff);
|
||||||
|
|
||||||
LPVOID lpMsgBuf;
|
LPVOID lpMsgBuf;
|
||||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
FORMAT_MESSAGE_ARGUMENT_ARRAY |
|
FORMAT_MESSAGE_ARGUMENT_ARRAY |
|
||||||
@ -1101,7 +1101,7 @@ void write_log(int log_action, const char* buff)
|
|||||||
strlen(static_cast<const char*>(lpMsgBuf)) - 1);
|
strlen(static_cast<const char*>(lpMsgBuf)) - 1);
|
||||||
LocalFree(lpMsgBuf);
|
LocalFree(lpMsgBuf);
|
||||||
WORD wLogType;
|
WORD wLogType;
|
||||||
|
|
||||||
switch (log_action) {
|
switch (log_action) {
|
||||||
case IDS_LOG_START:
|
case IDS_LOG_START:
|
||||||
case IDS_LOG_STOP:
|
case IDS_LOG_STOP:
|
||||||
@ -1110,7 +1110,7 @@ void write_log(int log_action, const char* buff)
|
|||||||
default:
|
default:
|
||||||
wLogType = EVENTLOG_ERROR_TYPE;
|
wLogType = EVENTLOG_ERROR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ReportEvent
|
if (!ReportEvent
|
||||||
(hLog, wLogType, 0, log_action + 1, NULL, 1, 0,
|
(hLog, wLogType, 0, log_action + 1, NULL, 1, 0,
|
||||||
const_cast<const char**>(act_buff), NULL))
|
const_cast<const char**>(act_buff), NULL))
|
||||||
@ -1139,7 +1139,7 @@ void write_log(int log_action, const char* buff)
|
|||||||
void HelpCmd(HWND hWnd, HINSTANCE hInst, WPARAM wId)
|
void HelpCmd(HWND hWnd, HINSTANCE hInst, WPARAM wId)
|
||||||
{
|
{
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
*
|
*
|
||||||
* H e l p C m d
|
* H e l p C m d
|
||||||
*
|
*
|
||||||
****************************************************************
|
****************************************************************
|
||||||
@ -1150,7 +1150,7 @@ void HelpCmd(HWND hWnd, HINSTANCE hInst, WPARAM wId)
|
|||||||
* nId - The help message Id.
|
* nId - The help message Id.
|
||||||
*
|
*
|
||||||
* Description: Invoke the Windows Help facility with context of nId.
|
* Description: Invoke the Windows Help facility with context of nId.
|
||||||
*
|
*
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
char szPathFileName[1024 + 256 + 1];
|
char szPathFileName[1024 + 256 + 1];
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "../jrd/os/config_root.h"
|
#include "../jrd/os/config_root.h"
|
||||||
#include "../utilities/install/registry.h"
|
#include "../utilities/install/registry.h"
|
||||||
|
#include "../utilities/install/install_nt.h"
|
||||||
|
|
||||||
typedef Firebird::PathName string;
|
typedef Firebird::PathName string;
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ bool getRootFromRegistry(string& root)
|
|||||||
DWORD bufsize = MAXPATHLEN;
|
DWORD bufsize = MAXPATHLEN;
|
||||||
char buffer[MAXPATHLEN];
|
char buffer[MAXPATHLEN];
|
||||||
DWORD type;
|
DWORD type;
|
||||||
const long RegRC = RegQueryValueEx(hkey, FB_DEFAULT_INSTANCE,
|
const long RegRC = RegQueryValueEx(hkey, FB_DEFAULT_INSTANCE,
|
||||||
NULL, &type, reinterpret_cast<UCHAR*>(buffer), &bufsize);
|
NULL, &type, reinterpret_cast<UCHAR*>(buffer), &bufsize);
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
if (RegRC == ERROR_SUCCESS) {
|
if (RegRC == ERROR_SUCCESS) {
|
||||||
@ -96,7 +97,7 @@ void ConfigRoot::osConfigRoot()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// As a last resort get it from the default install directory
|
// As a last resort get it from the default install directory
|
||||||
root_dir = FB_PREFIX;
|
root_dir = FB_PREFIX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,22 +14,22 @@
|
|||||||
* 20841 klaus 12-JAN-1996
|
* 20841 klaus 12-JAN-1996
|
||||||
* Add interprocess comm under remote component
|
* Add interprocess comm under remote component
|
||||||
*
|
*
|
||||||
* 20804 RCURRY 9-JAN-1996
|
* 20804 RCURRY 9-JAN-1996
|
||||||
* Change priority for NP threads to normal
|
* Change priority for NP threads to normal
|
||||||
*
|
*
|
||||||
* 20768 klaus 20-DEC-1995
|
* 20768 klaus 20-DEC-1995
|
||||||
* More xnet driver work
|
* More xnet driver work
|
||||||
*
|
*
|
||||||
* 20729 klaus 8-DEC-1995
|
* 20729 klaus 8-DEC-1995
|
||||||
* Begin adding xnet protocol
|
* Begin adding xnet protocol
|
||||||
*
|
*
|
||||||
* 20716 jmayer 6-DEC-1995
|
* 20716 jmayer 6-DEC-1995
|
||||||
* Update to not show NamedPipes as supported on Win95.
|
* Update to not show NamedPipes as supported on Win95.
|
||||||
*
|
*
|
||||||
* 20690 jmayer 4-DEC-1995
|
* 20690 jmayer 4-DEC-1995
|
||||||
* Change to start the IPC protocol when running as a service.
|
* Change to start the IPC protocol when running as a service.
|
||||||
*
|
*
|
||||||
* 20682 jmayer 3-DEC-1995
|
* 20682 jmayer 3-DEC-1995
|
||||||
* Update to write to logfile and display msg box as a non-service.
|
* Update to write to logfile and display msg box as a non-service.
|
||||||
*
|
*
|
||||||
* 20373 RCURRY 24-OCT-1995
|
* 20373 RCURRY 24-OCT-1995
|
||||||
@ -147,27 +147,27 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
hInst = hThisInst;
|
hInst = hThisInst;
|
||||||
|
|
||||||
// We want server to crash without waiting for feedback from the user
|
// We want server to crash without waiting for feedback from the user
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!Config::getBugcheckAbort())
|
if (!Config::getBugcheckAbort())
|
||||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
|
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
|
||||||
}
|
}
|
||||||
catch (Firebird::fatal_exception& e)
|
catch (Firebird::fatal_exception& e)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, e.what(), "Firebird server failure",
|
MessageBox(NULL, e.what(), "Firebird server failure",
|
||||||
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
||||||
return STARTUP_ERROR; // see /jrd/common.h
|
return STARTUP_ERROR; // see /jrd/common.h
|
||||||
}
|
}
|
||||||
catch (Firebird::status_exception& e)
|
catch (Firebird::status_exception& e)
|
||||||
{
|
{
|
||||||
TEXT buffer[BUFFER_LARGE];
|
TEXT buffer[BUFFER_LARGE];
|
||||||
const ISC_STATUS* vector = e.value();
|
const ISC_STATUS* vector = e.value();
|
||||||
if (! (vector && fb_interpret(buffer, sizeof(buffer), &vector)))
|
if (! (vector && fb_interpret(buffer, sizeof(buffer), &vector)))
|
||||||
{
|
{
|
||||||
strcpy(buffer, "Unknown internal failure");
|
strcpy(buffer, "Unknown internal failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox(NULL, buffer, "Firebird server failure",
|
MessageBox(NULL, buffer, "Firebird server failure",
|
||||||
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
||||||
return STARTUP_ERROR; // see /jrd/common.h
|
return STARTUP_ERROR; // see /jrd/common.h
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
protocol_inet[0] = 0;
|
protocol_inet[0] = 0;
|
||||||
protocol_wnet[0] = 0;
|
protocol_wnet[0] = 0;
|
||||||
|
|
||||||
strcpy(instance, DEFAULT_INSTANCE);
|
strcpy(instance, FB_DEFAULT_INSTANCE);
|
||||||
|
|
||||||
HANDLE connection_handle = parse_args(lpszArgs, &server_flag);
|
HANDLE connection_handle = parse_args(lpszArgs, &server_flag);
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
char buffer[100];
|
char buffer[100];
|
||||||
sprintf(buffer, "Cannot terminate process with pid = %d", shutdown_pid);
|
sprintf(buffer, "Cannot terminate process with pid = %d", shutdown_pid);
|
||||||
MessageBox(NULL, buffer,
|
MessageBox(NULL, buffer,
|
||||||
"Firebird server failure",
|
"Firebird server failure",
|
||||||
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
MB_OK | MB_ICONHAND | MB_SYSTEMMODAL | MB_DEFAULT_DESKTOP_ONLY);
|
||||||
return STARTUP_ERROR; // see /jrd/common.h
|
return STARTUP_ERROR; // see /jrd/common.h
|
||||||
}
|
}
|
||||||
@ -262,7 +262,7 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
int nReturnValue = 0;
|
int nReturnValue = 0;
|
||||||
ISC_STATUS_ARRAY status_vector;
|
ISC_STATUS_ARRAY status_vector;
|
||||||
|
|
||||||
if (connection_handle != INVALID_HANDLE_VALUE)
|
if (connection_handle != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
rem_port* port = 0;
|
rem_port* port = 0;
|
||||||
THREAD_ENTER();
|
THREAD_ENTER();
|
||||||
@ -277,20 +277,20 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
service_connection(port);
|
service_connection(port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(server_flag & SRVR_non_service))
|
else if (!(server_flag & SRVR_non_service))
|
||||||
{
|
{
|
||||||
Firebird::string service_name;
|
Firebird::string service_name;
|
||||||
service_name.printf(REMOTE_SERVICE, instance);
|
service_name.printf(REMOTE_SERVICE, instance);
|
||||||
|
|
||||||
CNTL_init(start_connections_thread, instance);
|
CNTL_init(start_connections_thread, instance);
|
||||||
|
|
||||||
const SERVICE_TABLE_ENTRY service_table[] =
|
const SERVICE_TABLE_ENTRY service_table[] =
|
||||||
{
|
{
|
||||||
{const_cast<char*>(service_name.c_str()), CNTL_main_thread},
|
{const_cast<char*>(service_name.c_str()), CNTL_main_thread},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
// BRS There is a error in MinGW (3.1.0) headers
|
// BRS There is a error in MinGW (3.1.0) headers
|
||||||
// the parameter of StartServiceCtrlDispatcher is declared const in msvc headers
|
// the parameter of StartServiceCtrlDispatcher is declared const in msvc headers
|
||||||
#if defined(MINGW)
|
#if defined(MINGW)
|
||||||
if (!StartServiceCtrlDispatcher(const_cast<SERVICE_TABLE_ENTRY*>(service_table))) {
|
if (!StartServiceCtrlDispatcher(const_cast<SERVICE_TABLE_ENTRY*>(service_table))) {
|
||||||
@ -303,7 +303,7 @@ int WINAPI WinMain(HINSTANCE hThisInst,
|
|||||||
server_flag |= SRVR_non_service;
|
server_flag |= SRVR_non_service;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (server_flag & SRVR_inet) {
|
if (server_flag & SRVR_inet) {
|
||||||
gds__thread_start(inet_connect_wait_thread, 0, THREAD_medium, 0,
|
gds__thread_start(inet_connect_wait_thread, 0, THREAD_medium, 0,
|
||||||
@ -659,7 +659,7 @@ static HANDLE parse_args( LPCSTR lpszArgs, USHORT * pserver_flag)
|
|||||||
case 'Z':
|
case 'Z':
|
||||||
// CVC: printf doesn't work because we don't have a console attached.
|
// CVC: printf doesn't work because we don't have a console attached.
|
||||||
//printf("Firebird remote server version %s\n", FB_VERSION);
|
//printf("Firebird remote server version %s\n", FB_VERSION);
|
||||||
MessageBox(NULL, FB_VERSION, "Firebird server version",
|
MessageBox(NULL, FB_VERSION, "Firebird server version",
|
||||||
MB_OK | MB_ICONINFORMATION | MB_TOPMOST | MB_DEFAULT_DESKTOP_ONLY);
|
MB_OK | MB_ICONINFORMATION | MB_TOPMOST | MB_DEFAULT_DESKTOP_ONLY);
|
||||||
exit(FINI_OK);
|
exit(FINI_OK);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,7 @@ static const char* ISCGUARD_EXECUTABLE = "bin\\fbguard";
|
|||||||
|
|
||||||
static const char* GUARDIAN_MUTEX = "FirebirdGuardianMutex%s";
|
static const char* GUARDIAN_MUTEX = "FirebirdGuardianMutex%s";
|
||||||
|
|
||||||
static const char* DEFAULT_INSTANCE = "DefaultInstance";
|
static const char* FB_DEFAULT_INSTANCE = "DefaultInstance";
|
||||||
|
|
||||||
// Starting with 128 the service params are user defined
|
// Starting with 128 the service params are user defined
|
||||||
const DWORD SERVICE_CREATE_GUARDIAN_MUTEX = 128;
|
const DWORD SERVICE_CREATE_GUARDIAN_MUTEX = 128;
|
||||||
|
@ -74,7 +74,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
USHORT sw_arch = ARCH_SS;
|
USHORT sw_arch = ARCH_SS;
|
||||||
bool sw_interactive = false;
|
bool sw_interactive = false;
|
||||||
|
|
||||||
const TEXT *instance = DEFAULT_INSTANCE;
|
const TEXT *instance = FB_DEFAULT_INSTANCE;
|
||||||
|
|
||||||
TEXT *username = 0;
|
TEXT *username = 0;
|
||||||
TEXT *password = 0;
|
TEXT *password = 0;
|
||||||
@ -368,7 +368,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
|
|
||||||
if (status2 == FB_SUCCESS)
|
if (status2 == FB_SUCCESS)
|
||||||
{
|
{
|
||||||
printf("Service \"%s\" successfully deleted.\n",
|
printf("Service \"%s\" successfully deleted.\n",
|
||||||
remote_display_name.c_str());
|
remote_display_name.c_str());
|
||||||
}
|
}
|
||||||
else if (status2 == IB_SERVICE_RUNNING)
|
else if (status2 == IB_SERVICE_RUNNING)
|
||||||
@ -400,7 +400,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
|
|
||||||
if (status == FB_SUCCESS)
|
if (status == FB_SUCCESS)
|
||||||
{
|
{
|
||||||
printf("Service \"%s\" successfully started.\n",
|
printf("Service \"%s\" successfully started.\n",
|
||||||
guard_display_name.c_str());
|
guard_display_name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ USHORT REGISTRY_remove(HKEY hkey_rootnode,
|
|||||||
return (*err_handler) (status, "RegOpenKeyEx", NULL);
|
return (*err_handler) (status, "RegOpenKeyEx", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the DEFAULT_INSTANCE value
|
// Remove the FB_DEFAULT_INSTANCE value
|
||||||
if ((status = RegDeleteValue(hkey_instances, FB_DEFAULT_INSTANCE))
|
if ((status = RegDeleteValue(hkey_instances, FB_DEFAULT_INSTANCE))
|
||||||
!= ERROR_SUCCESS)
|
!= ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ static void cleanup_key(HKEY hkey_rootnode, const char* key)
|
|||||||
**************************************/
|
**************************************/
|
||||||
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
if (RegOpenKeyEx(hkey_rootnode, key, 0,
|
if (RegOpenKeyEx(hkey_rootnode, key, 0,
|
||||||
KEY_READ | KEY_WRITE, &hkey) == ERROR_SUCCESS)
|
KEY_READ | KEY_WRITE, &hkey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ static USHORT remove_subkeys(
|
|||||||
if ((status = RegOpenKeyEx(hkey, sub_key,
|
if ((status = RegOpenKeyEx(hkey, sub_key,
|
||||||
0,
|
0,
|
||||||
KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE |
|
KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE |
|
||||||
KEY_WRITE, &hkey_sub)) != ERROR_SUCCESS)
|
KEY_WRITE, &hkey_sub)) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
p = "RegOpenKeyEx";
|
p = "RegOpenKeyEx";
|
||||||
break;
|
break;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* MODULE: registry.h
|
* MODULE: registry.h
|
||||||
* DESCRIPTION: Defines for the registry
|
* DESCRIPTION: Defines for the registry
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the Independant Developers
|
* The contents of this file are subject to the Independant Developers
|
||||||
* Public License Version 1.0 (the "License"); you may not use this file
|
* Public License Version 1.0 (the "License"); you may not use this file
|
||||||
* except in compliance with the License. You may obtain a copy
|
* except in compliance with the License. You may obtain a copy
|
||||||
* of the License at http://www.ibphoenix.com/IDPL.html
|
* of the License at http://www.ibphoenix.com/IDPL.html
|
||||||
@ -28,7 +28,6 @@
|
|||||||
static const char* REG_KEY_ROOT_COMPANY = "SOFTWARE\\Firebird Project";
|
static const char* REG_KEY_ROOT_COMPANY = "SOFTWARE\\Firebird Project";
|
||||||
static const char* REG_KEY_ROOT_PRODUCT = "SOFTWARE\\Firebird Project\\Firebird Server";
|
static const char* REG_KEY_ROOT_PRODUCT = "SOFTWARE\\Firebird Project\\Firebird Server";
|
||||||
static const char* REG_KEY_ROOT_INSTANCES = "SOFTWARE\\Firebird Project\\Firebird Server\\Instances";
|
static const char* REG_KEY_ROOT_INSTANCES = "SOFTWARE\\Firebird Project\\Firebird Server\\Instances";
|
||||||
static const char* FB_DEFAULT_INSTANCE = "DefaultInstance";
|
|
||||||
|
|
||||||
#endif // REGISTRY_DEFINES_H
|
#endif // REGISTRY_DEFINES_H
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user