home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / JDirectADSI.java < prev    next >
Text File  |  1997-10-25  |  580b  |  27 lines

  1. /**
  2.  * JDirectADSI: Using J/Direct to provide access to ADSI.
  3.  */
  4.  
  5. package IISSample;
  6.  
  7. import com.ms.com.*;
  8.  
  9.  
  10. public class JDirectADSI
  11. {
  12.  
  13.     // Import the ADsGetObject entrypoint through J/Direct
  14.     /** @dll.import("ACTIVEDS", ole) */
  15.     public static native IUnknown ADsGetObject(String path, _Guid iid);
  16.  
  17.  
  18.     // Cover function for simpler use from Java
  19.     public static Object getObject(String path)
  20.     {
  21.         _Guid iidIDispatch = new _Guid("{00020400-0000-0000-C000-000000000046}");
  22.  
  23.         return ADsGetObject(path, iidIDispatch);
  24.     }
  25.  
  26. }
  27.