本文整理汇总了C++中VNCLOG函数的典型用法代码示例。如果您正苦于以下问题:C++ VNCLOG函数的具体用法?C++ VNCLOG怎么用?C++ VNCLOG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VNCLOG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VNCLOG
vncEncodeZlib::vncEncodeZlib()
{
m_buffer = NULL;
m_buffer2 = NULL;
m_Queuebuffer = NULL;
m_QueueCompressedbuffer = NULL;
m_bufflen = 0;
m_Queuelen = 0;
m_Maskbuffer =NULL;
m_MaskbufferSize =0;
compStreamInited = false;
MaxQueuebufflen=128*1024;
m_Queuebuffer = new BYTE [MaxQueuebufflen+1];
if (m_Queuebuffer == NULL)
{
vnclog.Print(LL_INTINFO, VNCLOG("Memory error"));
}
m_QueueCompressedbuffer = new BYTE [MaxQueuebufflen+(MaxQueuebufflen/100)+8];
if (m_Queuebuffer == NULL)
{
vnclog.Print(LL_INTINFO, VNCLOG("Memory error"));
}
}
示例2: fpTimer
// [email protected] - For now we use a mmtimer to test the shutdown event periodically
// Maybe there's a less rude method...
void CALLBACK fpTimer(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
if (hShutdownEvent)
{
// vnclog.Print(LL_INTERR, VNCLOG("****************** SDTimer tic\n"));
DWORD result=WaitForSingleObject(hShutdownEvent, 0);
if (WAIT_OBJECT_0==result)
{
ResetEvent(hShutdownEvent);
fShutdownOrdered = true;
vnclog.Print(LL_INTERR, VNCLOG("****************** WaitForSingleObject - Shutdown server\n"));
}
}
}
示例3: setConsoleSession
void setConsoleSession(DWORD sessionId) {
#ifdef RFB_HAVE_WINSTATION_CONNECT
if (!_WinStationConnect.isValid()) {
vnclog.Print(LL_INTERR, VNCLOG("WinSta APIs missing"));
return;
}
if (sessionId == -1)
sessionId = mySessionId.id;
// Try to reconnect our session to the console
ConsoleSessionId console;
vnclog.Print(LL_INTINFO, VNCLOG("Console session is %d"), console.id);
if (!(*_WinStationConnect)(0, sessionId, console.id, L"", 0)) {
vnclog.Print(LL_INTERR, VNCLOG("Unable to connect session to Console (error %d)"), GetLastError());
return;
}
// Lock the newly connected session, for security
if (_LockWorkStation.isValid())
(*_LockWorkStation)();
#else
vnclog.Print(LL_INTERR, VNCLOG("setConsoleSession not implemented"));
#endif
}
示例4: VNCLOG
BOOL
vncBuffer::GetRemotePalette(RGBQUAD *quadlist, UINT ncolours)
{
// Try to get the RGBQUAD data from the encoder
// This will only work if the remote client is palette-based,
// in which case the encoder will be storing RGBQUAD data
if (m_encoder == NULL)
{
vnclog.Print(LL_INTWARN, VNCLOG("GetRemotePalette called but no encoder set\n"));
return FALSE;
}
// Now get the palette data
return m_encoder->GetRemotePalette(quadlist, ncolours);
}
示例5: VNCLOG
HKEY vncVideoDriver::CreateDeviceKey(LPCTSTR szMpName)
{
HKEY hKeyProfileMirror = (HKEY)0;
if (RegCreateKey(
HKEY_LOCAL_MACHINE,
(MINIPORT_REGISTRY_PATH),
&hKeyProfileMirror) != ERROR_SUCCESS)
{
vnclog.Print(LL_INTERR, VNCLOG("Can't access registry.\n"));
return FALSE;
}
HKEY hKeyProfileMp = (HKEY)0;
LONG cr = RegCreateKey(
hKeyProfileMirror,
szMpName,
&hKeyProfileMp);
RegCloseKey(hKeyProfileMirror);
if (cr != ERROR_SUCCESS)
{
vnclog.Print(
LL_INTERR,
VNCLOG("Can't access \"%s\" hardware profiles key.\n"),
szMpName);
return FALSE;
}
HKEY hKeyDevice = (HKEY)0;
if (RegCreateKey(
hKeyProfileMp,
("DEVICE0"),
&hKeyDevice) != ERROR_SUCCESS)
{
vnclog.Print(LL_INTERR, VNCLOG("Can't access DEVICE0 hardware profiles key.\n"));
}
RegCloseKey(hKeyProfileMp);
return hKeyDevice;
}
示例6: VNCLOG
// Internal methods
BOOL
vncClient::SendRFBMsg(CARD8 type, BYTE *buffer, int buflen)
{
// Set the message type
((rfbServerToClientMsg *)buffer)->type = type;
// Send the message
if (!m_socket->SendExact((char *) buffer, buflen))
{
vnclog.Print(LL_CONNERR, VNCLOG("failed to send RFB message to client\n"));
Kill();
return FALSE;
}
return TRUE;
}
示例7: VNCLOG
VSocket::VSocket()
{
// Clear out the internal socket fields
sock = -1;
vnclog.Print(LL_SOCKINFO, VNCLOG("VSocket() m_pDSMPlugin = NULL \n"));
m_pDSMPlugin = NULL;
//adzm 2009-06-20
m_pPluginInterface = NULL;
m_fUsePlugin = false;
m_pNetRectBuf = NULL;
m_nNetRectBufSize = 0;
m_fWriteToNetRectBuf = false;
m_nNetRectBufOffset = 0;
queuebuffersize=0;
}
示例8: LoadNImport
HINSTANCE LoadNImport(LPCTSTR szDllName, LPCTSTR szFName, TpFn &pfn)
{
HINSTANCE hDll = LoadLibrary(szDllName);
if (hDll)
{
pfn = (TpFn)GetProcAddress(hDll, szFName);
if (pfn)
return hDll;
FreeLibrary(hDll);
}
vnclog.Print(
LL_INTERR,
VNCLOG("Can not import '%s' from '%s'.\n"),
szFName, szDllName);
return NULL;
}
示例9: VNCLOG
vncMenu::~vncMenu()
{
vnclog.Print(LL_INTERR, VNCLOG("vncmenu killed\n"));
// adzm 2009-07-05 - Tray icon balloon tips
if (m_BalloonInfo) {
free(m_BalloonInfo);
m_BalloonInfo = NULL;
}
if (m_BalloonTitle) {
free(m_BalloonTitle);
m_BalloonTitle = NULL;
}
if (hWTSDll)
{
WTSUNREGISTERSESSIONNOTIFICATION FunctionWTSUnRegisterSessionNotification;
FunctionWTSUnRegisterSessionNotification = (WTSUNREGISTERSESSIONNOTIFICATION)GetProcAddress((HINSTANCE)hWTSDll,"WTSUnRegisterSessionNotification" );
if (FunctionWTSUnRegisterSessionNotification)
FunctionWTSUnRegisterSessionNotification( m_hwnd );
FreeLibrary( hWTSDll );
hWTSDll = NULL;
}
if (m_winvnc_icon)
DestroyIcon(m_winvnc_icon);
if (m_flash_icon)
DestroyIcon(m_flash_icon);
// Remove the tray icon
DelTrayIcon();
// Destroy the loaded menu
if (m_hmenu != NULL)
DestroyMenu(m_hmenu);
// Tell the server to stop notifying us!
if (m_server != NULL)
m_server->RemNotify(m_hwnd);
if (m_server->RemoveWallpaperEnabled())
RestoreWallpaper();
if (m_server->RemoveAeroEnabled())
ResetAero();
}
示例10: l
// Modef [email protected]
void
vncServer::SetNewSWSize(long w,long h,BOOL desktop)
{
vncClientList::iterator i;
omni_mutex_lock l(m_clientsLock);
// Post this screen size update to all the connected clients
for (i = m_authClients.begin(); i != m_authClients.end(); i++)
{
// Post the update
if (!GetClient(*i)->SetNewSWSize(w,h,desktop)) {
vnclog.Print(LL_INTINFO, VNCLOG("Unable to set new desktop size\n"));
KillClient(*i);
}
}
}
示例11: GetThreadDesktop
void
vncDesktop::StartInitWindowthread()
{
// Check if the input desktop == Default desktop
// Hooking the winlogon is not needed, no clipboard
// see if the threaddesktop== Default
HDESK desktop = GetThreadDesktop(GetCurrentThreadId());
DWORD dummy;
char new_name[256];
can_be_hooked=false;
vnclog.Print(LL_INTINFO, VNCLOG("StartInitWindowthread \n"));
if (GetUserObjectInformation(desktop, UOI_NAME, &new_name, 256, &dummy))
{
if (strcmp(new_name,"Default")==0)
{
vnclog.Print(LL_INTINFO, VNCLOG("StartInitWindowthread default desk\n"));
if (InitWindowThreadh==NULL)
{
ResetEvent(restart_event);
InitWindowThreadh=CreateThread(NULL,0,InitWindowThread,this,0,&pumpID);
DWORD status=WaitForSingleObject(restart_event,10000);
if (status==WAIT_TIMEOUT)
{
vnclog.Print(LL_INTINFO, VNCLOG("ERROR: initwindowthread failed to start \n"));
if (InitWindowThreadh!=NULL)
{
TerminateThread(InitWindowThreadh,0);
CloseHandle(InitWindowThreadh);
m_hwnd=NULL;
InitWindowThreadh=NULL;
}
can_be_hooked=false;
}
else
{
vnclog.Print(LL_INTINFO, VNCLOG("StartInitWindowthread started\n"));
can_be_hooked=true;
}
}
else
{
// initwindowthread is still running
// make it back active
vnclog.Print(LL_INTINFO, VNCLOG("StartInitWindowthread reactivate\n"));
can_be_hooked=true;
}
}
else
{
vnclog.Print(LL_INTINFO, VNCLOG("StartInitWindowthread no default desk\n"));
}
}
}
示例12: VNCLOG
void
vncProperties::SaveUserPrefs(HKEY appkey)
{
// SAVE THE PER USER PREFS
vnclog.Print(LL_INTINFO, VNCLOG("saving current settings to registry\n"));
// Connection prefs
SaveInt(appkey, "SocketConnect", m_server->SockConnected());
SaveInt(appkey, "HTTPConnect", m_server->HTTPConnectEnabled());
SaveInt(appkey, "AutoPortSelect", m_server->AutoPortSelect());
if (!m_server->AutoPortSelect())
SaveInt(appkey, "PortNumber", m_server->GetPort());
SaveInt(appkey, "InputsEnabled", m_server->RemoteInputsEnabled());
SaveInt(appkey, "LocalInputsDisabled", m_server->LocalInputsDisabled());
SaveInt(appkey, "IdleTimeout", m_server->AutoIdleDisconnectTimeout());
// Connection querying settings
SaveInt(appkey, "QuerySetting", m_server->QuerySetting());
SaveInt(appkey, "QueryTimeout", m_server->QueryTimeout());
// Lock settings
SaveInt(appkey, "LockSetting", m_server->LockSettings());
// Wallpaper removal
SaveInt(appkey, "RemoveWallpaper", m_server->RemoveWallpaperEnabled());
// Save the password
char passwd[MAXPWLEN];
m_server->GetPassword(passwd);
SavePassword(appkey, passwd);
#if(defined(_CORBA))
// Don't save the CORBA enabled flag if CORBA is not compiled in!
SaveInt(appkey, "CORBAConnect", m_server->CORBAConnected());
#endif
// Polling prefs
SaveInt(appkey, "PollUnderCursor", m_server->PollUnderCursor());
SaveInt(appkey, "PollForeground", m_server->PollForeground());
SaveInt(appkey, "PollFullScreen", m_server->PollFullScreen());
SaveInt(appkey, "OnlyPollConsole", m_server->PollConsoleOnly());
SaveInt(appkey, "OnlyPollOnEvent", m_server->PollOnEventOnly());
}
示例13: VNCLOG
BOOL
vncService::PostAddNewClientInit(unsigned long ipaddress, unsigned short port)
{
// Post to the WinVNC menu window
if (!PostToWinVNC(MENU_ADD_CLIENT_MSG_INIT, (WPARAM)port, (LPARAM)ipaddress))
{
//MessageBoxSecure(NULL, sz_ID_NO_EXIST_INST, szAppName, MB_ICONEXCLAMATION | MB_OK);
//Little hack, seems postmessage fail in some cases on some os.
//permission proble
//use G_var + WM_time to reconnect
vnclog.Print(LL_INTERR, VNCLOG("PostAddNewClient failed\n"));
if (port==1111 && ipaddress==1111) G_1111=true;
return FALSE;
}
return TRUE;
}
示例14: VNCLOG
void
vncDesktop::ShutdownInitWindowthread()
{
// we keep the sink window running
// but ignore info
can_be_hooked=false;
vnclog.Print(LL_INTINFO, VNCLOG("ShutdownInitWindowthread \n"));
if (startw8)
{
#ifdef _DEBUG
char szText[256];
sprintf(szText,"StartStophookdll(0) \n");
OutputDebugString(szText);
#endif
StartStophookdll(0);
Hookdll_Changed = true;
}
}
示例15: BlackWindow
DWORD WINAPI BlackWindow(LPVOID lpParam)
{
// TODO: Place code here.
HDESK desktop;
desktop = OpenInputDesktop(0, FALSE,
DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW |
DESKTOP_ENUMERATE | DESKTOP_HOOKCONTROL |
DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS |
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE
);
if (desktop == NULL)
vnclog.Print(LL_INTERR, VNCLOG("OpenInputdesktop Error \n"));
else
vnclog.Print(LL_INTERR, VNCLOG("OpenInputdesktop OK\n"));
HDESK old_desktop = GetThreadDesktop(GetCurrentThreadId());
DWORD dummy;
char new_name[256];
if (desktop)
{
if (!GetUserObjectInformation(desktop, UOI_NAME, &new_name, 256, &dummy))
{
vnclog.Print(LL_INTERR, VNCLOG("!GetUserObjectInformation \n"));
}
vnclog.Print(LL_INTERR, VNCLOG("SelectHDESK to %s (%x) from %x\n"), new_name, desktop, old_desktop);
if (!SetThreadDesktop(desktop))
{
vnclog.Print(LL_INTERR, VNCLOG("SelectHDESK:!SetThreadDesktop \n"));
}
}
create_window();
MSG msg;
while (GetMessage(&msg,0,0,0) != 0)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
vnclog.Print(LL_INTERR, VNCLOG("end BlackWindow \n"));
SetThreadDesktop(old_desktop);
if (desktop) CloseDesktop(desktop);
return 0;
}