home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / visualj / msdev / samples / microsoft / daosample / dao_dbengine.java next >
Encoding:
Java Source  |  1996-08-27  |  822 b   |  36 lines

  1. // Create a DAO DBEngine object with the license
  2.  
  3. import dao3032._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.             "mjgcqcejfchcijecpdhckcdjqigdejfccjri",
  22.  
  23.             // The CLSID for the DAO DBEngine
  24.             "{00025E15-0000-0000-C000-000000000046}",
  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.