wstring printer_get_default(void) { static wchar dp[99]; unsigned long len = sizeof dp; if (GetDefaultPrinterW(dp, &len)) return dp; else return L""; }
wstring printer_get_default(void) { static wchar dp[99]; DWORD len = sizeof dp; if (GetDefaultPrinterW(dp, &len)) return dp; else return W(""); }
void CNetWatcherTask::DisconnectZone(cNetZone * pZona) { if(pZona->m_nSettings & cNetZone::fSavDefPrinter) { PR_TRACE((g_root, prtIMPORTANT, TR "CNetWatcherTask:: Get default printer\n")); const DWORD size_str1=200; WCHAR str1[size_str1]; if(GetDefaultPrinterW(str1,(LPDWORD) &size_str1)) { pZona->m_nSettings|=cNetZone::fDefPrinter; pZona->m_sDefPrinter=str1; } } PR_TRACE((g_root, prtIMPORTANT, TR "CNetWatcherTask:: leave zone %S\n",pZona->m_sFrendlyName)); }