MIMEAssociationDialogA function (intshcut.h)
Runs the unregistered MIME content type dialog box.
Syntax
INTSHCUTAPI HRESULT MIMEAssociationDialogA(
HWND hwndParent,
DWORD dwInFlags,
PCSTR pcszFile,
PCSTR pcszMIMEContentType,
[out] PSTR pszAppBuf,
UINT ucAppBufLen
);
Parameters
hwndParent
Type: HWND
A handle to the parent window of any posted child windows.
dwInFlags
Type: DWORD
A bit flag value that specifies if an association is to be registered. The bit flag is the value MIMEASSOCDLG_FL_REGISTER_ASSOC (0x0001). If this bit is set, the selected application is registered as the handler for the given MIME type. If this bit is clear, no association is registered.
An application is registered only if this flag is set and the user indicates that a persistent association is to be made.
Registration is impossible if the string at pcszFile does not contain an extension.
pcszFile
Type: PCTSTR
The address of a null-terminated string that contains the name of the target file. This file must conform to the content type described by the pcszMIMEContentType parameter.
pcszMIMEContentType
Type: PCTSTR
The address of a null-terminated string that contains the unregistered content type.
[out] pszAppBuf
Type: PTSTR
A pointer to a buffer that, when this function returns successfully, receives the path of the application specified by the user.
ucAppBufLen
Type: UINT
Size of pszAppBuf, in characters.
Return value
Type: HRESULT
Return code | Description |
---|---|
|
The user canceled the operation. |
|
The flag combination passed in dwInFlags is invalid. |
|
There was insufficient memory available to complete the operation. |
|
One of the input pointers is invalid. |
Remarks
This function does not validate the syntax of the input content type string at pcszMIMEContentType. A successful return value does not indicate that the specified MIME content type is valid.
Note
The intshcut.h header defines MIMEAssociationDialog as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | intshcut.h |
DLL | Url.dll |