CreateString() public static méthode

public static CreateString ( string s ) : IntPtr
s string
Résultat System.IntPtr
Exemple #1
0
        public static void SetMenuTitle(IntPtr menuRef, string title)
        {
            IntPtr           str    = CoreFoundation.CreateString(title);
            CarbonMenuStatus result = SetMenuTitleWithCFString(menuRef, str);

            CoreFoundation.Release(str);
            CheckResult(result);
        }
Exemple #2
0
        public static ushort InsertMenuItem(IntPtr parentRef, string title, ushort afterItemIndex, MenuItemAttributes attributes, uint commandId)
        {
            ushort           index;
            IntPtr           str    = CoreFoundation.CreateString(title);
            CarbonMenuStatus result = InsertMenuItemTextWithCFString(parentRef, str, afterItemIndex, attributes, commandId, out index);

            CoreFoundation.Release(str);
            CheckResult(result);
            return(index);
        }