home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Src / Win32Api / PRINTER_INFO_2.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  2.5 KB  |  67 lines

  1. // Copyright (C) 1997 Microsoft Corporation  All Rights Reserved
  2.  
  3. // These classes provide direct, low-overhead access to commonly used
  4. // Windows api. These classes use the new J/Direct feature.
  5. //
  6. // Information on how to use J/Direct to write your own declarations
  7. // can be found in the Microsoft SDK for Java 2.0.
  8.  
  9. package com.ms.win32;
  10.  
  11. public class PRINTER_INFO_2 extends PRINTER_INFO
  12. {
  13.     public String     pServerName;
  14.     public String     pPrinterName;
  15.     public String     pShareName;
  16.     public String     pPortName;
  17.     public String     pDriverName;
  18.     public String     pComment;
  19.     public String     pLocation;
  20.     public int        pDevMode;
  21.     public String     pSepFile;
  22.     public String     pPrintProcessor;
  23.     public String     pDatatype;
  24.     public String     pParameters;
  25.     public int        pSecurityDescriptor;
  26.     public int        Attributes;
  27.     public int        Priority;
  28.     public int        DefaultPriority;
  29.     public int        StartTime;
  30.     public int        UntilTime;
  31.     public int        Status;
  32.     public int        cJobs;
  33.     public int        AveragePPM;
  34.  
  35.  
  36.     void copyFromNative(int[] pnative, int ofs)
  37.     {
  38.         pServerName     = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  39.         pPrinterName    = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  40.         pShareName      = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  41.         pPortName       = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  42.         pDriverName     = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  43.         pComment        = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  44.         pLocation       = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  45.         pDevMode        = pnative[ofs++];
  46.         pSepFile        = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  47.         pPrintProcessor = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  48.         pDatatype       = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  49.         pParameters     = com.ms.dll.DllLib.ptrToString(pnative[ofs++]);
  50.         pSecurityDescriptor = pnative[ofs++];
  51.         Attributes      = pnative[ofs++];
  52.         Priority        = pnative[ofs++];
  53.         DefaultPriority = pnative[ofs++];
  54.         StartTime       = pnative[ofs++];
  55.         UntilTime       = pnative[ofs++];
  56.         Status          = pnative[ofs++];
  57.         cJobs           = pnative[ofs++];
  58.         AveragePPM      = pnative[ofs++];
  59.     }
  60.  
  61.     int numSlots()
  62.     {
  63.         return 84/4;
  64.     }
  65. }
  66.  
  67.