RE: Find default application for file of particular extension
RE: Find default application for file of particular extension
- Subject: RE: Find default application for file of particular extension
- From: Nikhil Khandelwal <email@hidden>
- Date: Thu, 4 Jun 2009 15:37:19 +0530
- Acceptlanguage: en-US, en-IN
- Thread-topic: Find default application for file of particular extension
It was really of great help to find the default application.
I am having one issue with setting the default application.
I tried these two function
OSStatus LSSetHandlerOptionsForContentType (
CFStringRef inContentType,
LSHandlerOptions inOptions
);
Or
OSStatus LSSetDefaultRoleHandlerForContentType (
CFStringRef inContentType,
LSRolesMask inRole,
CFStringRef inHandlerBundleID
);
But in both first argument is CFStringRef inContentType and I am not able to figure out what will be the value of this for my application.
Can you help me on how to find it or to set it.
Thanks,
Nikhil
-----Original Message-----
From: Filip van der Meeren [mailto:email@hidden]
Sent: Thursday, May 28, 2009 8:32 PM
To: Nikhil Khandelwal
Cc: email@hidden
Subject: Re: Find default application for file of particular extension
On 28 May 2009, at 16:36, Nikhil Khandelwal wrote:
> Hi all,
>
> I want to find out which application is the default one for .x
> extension file in my application and to make my application the
> default one for that extension.
For finding out who is "owning" an extention you should use the Launch
Services (http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#/
/apple_ref/c/func/LSGetApplicationForInfo). And to make your
application the default for that extention, it is the same service...
but another method (http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#/
/apple_ref/c/func/LSSetHandlerOptionsForContentType)
>
> Its an urgent project requirement, so please reply as soon as
> possible.
>
> Thanks,
> NIKHIL
>
Filip van der Meeren
email@hidden
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information
> which is the property of Persistent Systems Ltd. It is intended only
> for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read,
> retain, copy, print, distribute or use this message. If you have
> received this communication in error, please notify the sender and
> delete all copies of this message. Persistent Systems Ltd. does not
> accept any liability for virus infected mails.
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden