home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / COM / CustomMarshal / point / PointMarshaler.java < prev   
Encoding:
Java Source  |  2000-05-04  |  1.4 KB  |  47 lines

  1. // (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  2. //=====================================================================
  3. //
  4. //
  5. //    3. Examine each commented method and field, and decide if this method
  6. //       is needed for your datatype. If so, uncomment.
  7. //
  8. //    4. For each method you uncomment in the hook class, you must provide
  9. //       an implementation for it in PointMarshaler.cpp.
  10. // 
  11. //=====================================================================
  12.  
  13. import com.ms.com.CustomLib;
  14. import java.awt.Point;
  15.  
  16. public class PointMarshaler {
  17.  
  18.  
  19.     public static int cbByValSize = 8;  //sizeof(POINT)
  20.  
  21.  
  22.     // TODO: This field can normally be set to zero.
  23.     public static int CustomFlags = 0;
  24.  
  25.  
  26.     public static native Point toJava(int ppPOINT, int flags);
  27.  
  28.     public static native void copyToExternal(Point javaval,
  29.                                              int   ppPOINT,
  30.                                              int   flags);
  31.  
  32.  
  33.  
  34.  
  35.     public static native void copyToJava(int ppPOINT,
  36.                                          Point javaval,
  37.                                          int flags);
  38.     public static native Point toUninitJava(int ppPOINT, int flags);
  39.  
  40.     private static native void classInit();
  41.  
  42.     static {
  43.         System.loadLibrary("PointMarshaler");
  44.         classInit();
  45.     }
  46. }
  47.