本文整理汇总了C++中firebird::GlobalPtr::printf方法的典型用法代码示例。如果您正苦于以下问题:C++ GlobalPtr::printf方法的具体用法?C++ GlobalPtr::printf怎么用?C++ GlobalPtr::printf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类firebird::GlobalPtr
的用法示例。
在下文中一共展示了GlobalPtr::printf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: guard
const char *Config::getUdfAccess()
{
static Firebird::GlobalPtr<Firebird::Mutex> udfMutex;
static Firebird::GlobalPtr<Firebird::string> udfValue;
static const char* volatile value = 0;
if (value)
{
return value;
}
Firebird::MutexLockGuard guard(udfMutex, "Config::getUdfAccess");
if (value)
{
return value;
}
const char* v = (const char*) getDefaultConfig()->values[KEY_UDF_ACCESS];
if (CASE_SENSITIVITY ? (! strcmp(v, UDF_DEFAULT_CONFIG_VALUE) && FB_UDFDIR[0]) :
(! fb_utils::stricmp(v, UDF_DEFAULT_CONFIG_VALUE) && FB_UDFDIR[0]))
{
udfValue->printf("Restrict %s", FB_UDFDIR);
value = udfValue->c_str();
}
else
{
value = v;
}
return value;
}
示例2: CNTL_init
void CNTL_init(ThreadEntryPoint* handler, const TEXT* name)
{
/**************************************
*
* C N T L _ i n i t
*
**************************************
*
* Functional description
*
**************************************/
main_handler = handler;
service_name->printf(REMOTE_SERVICE, name);
mutex_name->printf(GUARDIAN_MUTEX, name);
}
示例3: CNTL_init
void CNTL_init(ThreadEntryPoint* handler, const TEXT* name)
{
/**************************************
*
* C N T L _ i n i t
*
**************************************
*
* Functional description
*
**************************************/
main_handler = handler;
//MemoryPool& pool = *getDefaultMemoryPool();
service_name->printf(ISCGUARD_SERVICE, name);
remote_name->printf(REMOTE_SERVICE, name);
}
示例4: WinMain
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE /*hPrevInstance*/, LPSTR lpszCmdLine, int /*nCmdShow*/)
{
/**************************************
*
* m a i n
*
**************************************
*
* Functional description
* The main routine for Windows based server guardian.
*
**************************************/
strcpy(instance, FB_DEFAULT_INSTANCE);
service_flag = parse_args(lpszCmdLine);
service_name->printf(ISCGUARD_SERVICE, instance);
remote_name->printf(REMOTE_SERVICE, instance);
mutex_name->printf(GUARDIAN_MUTEX, instance);
// set the global HINSTANCE as we need it in WINDOW_main
hInstance_gbl = hInstance;
// allocate space for the event list
log_entry = static_cast<log_info*>(malloc(sizeof(log_info)));
log_entry->next = NULL;
// since the flag is set we run as a service
if (service_flag)
{
CNTL_init(WINDOW_main, instance);
const SERVICE_TABLE_ENTRY service_table[] =
{
{const_cast<char*>(service_name->c_str()), CNTL_main_thread},
{NULL, NULL}
};
// BRS There is a error in MinGW (3.1.0) headers
// the parameter of StartServiceCtrlDispatcher is declared const in msvc headers
#if defined(MINGW)
if (!StartServiceCtrlDispatcher(const_cast<SERVICE_TABLE_ENTRY*>(service_table)))
#else
if (!StartServiceCtrlDispatcher(service_table))
#endif
{
if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
CNTL_shutdown_service("StartServiceCtrlDispatcher failed");
}
if (watcher_thd)
{
WaitForSingleObject(watcher_thd, 5000);
CloseHandle(watcher_thd);
}
}
else {
return WINDOW_main(0);
}
return TRUE;
}