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

  1. //=====================================================================
  2. // Sample Java/COM Marshaling Hook Class.
  3. //
  4. // Java Type:  String
  5. // Com  Type:  VARIANT (BSTR type).
  6. // 
  7. // (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  8. //=====================================================================
  9.  
  10.  
  11. import com.ms.com.CustomLib;
  12.  
  13. public class VarStrMarshaler {
  14.  
  15.  
  16.     // Standard hook member.
  17.     public static int cbByValSize = 16;  //sizeof(VARIANT)
  18.  
  19.  
  20.     // Standard hook member.
  21.     public static int CustomFlags = 0;
  22.  
  23.  
  24.     // Standard hook member.
  25.     public static native String toJava(int ppETYPE, int flags);
  26.  
  27.     // Standard hook member.
  28.     public static native void copyToExternal(String javaval,
  29.                                              int   ppETYPE,
  30.                                              int   flags);
  31.  
  32.  
  33.  
  34.     // Standard hook member.
  35.     public static native void releaseByValExternal(int ppETYPE, int flags);
  36.  
  37.  
  38.     static {
  39.        // Loads the C code which implements the methods of this class.
  40.          System.loadLibrary("VarStrMarshaler");
  41.     }
  42. }
  43.