/// <summary>
        /// Generic progress callback implementation (used for install/uninstall/etc...)
        /// </summary>
        void HandleProgressCallback(string OuterFunction, TypedPtr <CFDictionary> SourceDict)
        {
            Dictionary <string, object> Dict = MobileDevice.ConvertCFDictionaryToDictionaryStringy(SourceDict);

            // Expecting:
            // string,string -> "Status",PhaseOfInstaller
            // string,number -> "PercentComplete",%Done
            try
            {
                string Phase       = Dict["Status"] as string;
                int    PercentDone = (int)((Double)(Dict["PercentComplete"]));

                if (OnGenericProgress != null)
                {
                    string Msg = String.Format("{0} is {1}% complete at phase '{2}'", OuterFunction, PercentDone, Phase);
                    OnGenericProgress(Msg, PercentDone);
                }
                else
                {
                    Console.WriteLine(" ... {0} {1}% complete (phase '{2}')", OuterFunction, PercentDone, Phase);
                }
            }
            catch (System.Exception)
            {
            }
        }
            public static int LookupApplications(TypedPtr <AppleMobileDeviceConnection> device, IntPtr options, out Dictionary <string, object> AppBundles)
            {
                IntPtr UntypedDict = IntPtr.Zero;
                int    Result      = AMDeviceLookupApplications((IntPtr)device, options, ref UntypedDict);

                AppBundles = MobileDevice.ConvertCFDictionaryToDictionaryStringy(new TypedPtr <CFDictionary>(UntypedDict));

                return(Result);
            }