Exemplo n.º 1
0
        static void InitializeCoreFoundation()
        {
            IntPtr CoreFoundation = RequiredWinAPI.GetModuleHandle("CoreFoundation.dll");

            kCFAllocatorDefault             = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFAllocatorDefault");
            kCFTypeDictionaryKeyCallBacks   = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFTypeDictionaryKeyCallBacks");
            kCFTypeDictionaryValueCallBacks = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFTypeDictionaryValueCallBacks");

            kCFBooleanTrue  = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFBooleanTrue");
            kCFBooleanFalse = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFBooleanFalse");
        }
Exemplo n.º 2
0
        static void InitializeCoreFoundation()
        {
            if (Environment.OSVersion.Platform == PlatformID.MacOSX || Environment.OSVersion.Platform == PlatformID.Unix)
            {
                CoreImpl = new CoreFoundationOSX();
            }
            else
            {
                CoreImpl = new CoreFoundationWin();

                IntPtr CoreFoundation = RequiredWinAPI.GetModuleHandle("CoreFoundation.dll");

                kCFAllocatorDefault             = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFAllocatorDefault");
                kCFTypeDictionaryKeyCallBacks   = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFTypeDictionaryKeyCallBacks");
                kCFTypeDictionaryValueCallBacks = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFTypeDictionaryValueCallBacks");

                kCFBooleanTrue  = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFBooleanTrue");
                kCFBooleanFalse = RequiredWinAPI.GetProcAddress(CoreFoundation, "kCFBooleanFalse");
            }
        }