< prev index next >

src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp

Print this page

        

*** 186,209 **** } JNIEXPORT jlong JNICALL Java_sun_print_PrintServiceLookupProvider_notifyFirstPrinterChange(JNIEnv *env, ! jobject peer, ! jstring printer) { HANDLE hPrinter; ! ! LPTSTR printerName = NULL; ! if (printer != NULL) { ! printerName = (LPTSTR)JNU_GetStringPlatformChars(env, ! printer, ! NULL); ! JNU_ReleaseStringPlatformChars(env, printer, printerName); ! } ! ! // printerName - "Win NT/2K/XP: If NULL, it indicates the local printer ! // server" - MSDN. Win9x : OpenPrinter returns 0. BOOL ret = OpenPrinter(printerName, &hPrinter, NULL); if (!ret) { return (jlong)-1; } --- 186,198 ---- } JNIEXPORT jlong JNICALL Java_sun_print_PrintServiceLookupProvider_notifyFirstPrinterChange(JNIEnv *env, ! jobject peer) { HANDLE hPrinter; ! LPTSTR printerName = NULL; // NULL indicates the local printer server BOOL ret = OpenPrinter(printerName, &hPrinter, NULL); if (!ret) { return (jlong)-1; }
< prev index next >