home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Java++ / VJ / SAMPLES / MICROSOFT / DAOSAMPLE / DAO_DBENGINE.JAVA next >
Encoding:
Java Source  |  1996-12-06  |  812 b   |  36 lines

  1. // Create a DAO DBEngine object with the license
  2.  
  3. import dao350._DBEngine;
  4. import com.ms.com.*;
  5.  
  6. public class dao_dbengine
  7. {
  8.     // The static public method creates the DBEngine object
  9.     static public _DBEngine create()
  10.     {
  11.         // The return value
  12.         _DBEngine result;
  13.  
  14.         // Create the License Manager object
  15.         ILicenseMgr mgr = new LicenseMgr();
  16.  
  17.         // Use the License Manager to create the DBEngine
  18.         result = (_DBEngine) mgr.createWithLic(
  19.  
  20.             // The license key for the DAO DBEngine
  21.             "mbmabptebkjcdlgtjmskjwtsdhjbmkmwtrak",
  22.  
  23.             // The CLSID for the DAO DBEngine
  24.             "{00000010-0000-0010-8000-00AA006D2EA4}",
  25.  
  26.             // The aggregation IUnknown* punkOuter
  27.             null,
  28.  
  29.             // The ctxFlag to create in inproc server
  30.             ComContext.INPROC_SERVER
  31.             );
  32.  
  33.         return result;
  34.     }
  35. }
  36.