Exemple #1
0
        /// <summary>
        /// Initializes Application API instance
        /// </summary>
        /// <returns></returns>
        public static bool Initialize()
        {
            uint retval = 0;

            try
            {
                retval = Microsoft.Phone.InteropServices.ComBridge.RegisterComDll("InteropLib" + AppShortName + ".dll", new Guid("070E61BC-473F-4215-8A31-02206D9D15F2"));
            }
            catch (Exception ex)
            {
                instance = null;
                return(false);
            }
            instance = (IInteropClass) new CInteropClass();
            return((instance != null) ? true : false);
        }
Exemple #2
0
 public static bool Initialize()
 {
     if (_instance == null)
     {
         try
         {
             uint retval = Microsoft.Phone.InteropServices.ComBridge.RegisterComDll("InteropLibOMkt.dll", new Guid("070E61BC-473F-4215-8A31-02206D9D15F2"));
         }
         catch (Exception ex)
         {
             return(false);
         }
         _instance = (IInteropClass) new CInteropClass();
         return((_instance != null) ? true : false);
     }
     return(true);
 }