Previous Up Index Next

Internet Shortcut Global Functions


This section contains information about the following Internet Shortcut global functions:

InetIsOffline

BOOL InetIsOffline (
    DWORD dwFlags
);

Determines whether the system is connected to the Internet.

dwFlags
Input flags for the function. This must be set to zero.

MIMEAssociationDialog

HRESULT WINAPI MIMEAssociationDialog (
    HWND    hwndParent,
    DWORD   dwInFlags,
    LPCSTR  pcszFile,
    LPCSTR  pcszMIMEContentType,
    LPSTR   pszAppBuf,
    UINT    ucAppBufLen
);

Runs the unregistered MIME content type dialog box.

hwndParent
Handle to the parent window of any posted child windows.
dwInFlags
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
Pointer to 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
Pointer to a null-terminated string that contains the unregistered content type.
pszAppBuf
Pointer to a buffer that receives the path of the application specified by the user.
ucAppBufLen
Size of pszAppBuf, in characters.

Note: 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.

TranslateURL

HRESULT WINAPI TranslateURL(
    LPCSTR pcszURL,
    DWORD dwInFlags,
    LPSTR *ppszTranslatedURL
);

Applies common translations to a given URL string, creating a new URL string.

pcszURL
Pointer to the URL string to be translated.
dwInFlags
Bit flags that specify how the URL string is to be translated. This value can be a combination of the following:
TRANSLATEURL_FL_GUESS_PROTOCOL
If the protocol scheme is not specified in the pcszURL parameter to TranslateURL, the system automatically chooses a scheme and adds it to the URL.
TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL
If the protocol scheme is not specified in the pcszURL parameter to TranslateURL, the system adds the default protocol to the URL.
ppszTranslatedURL
Pointer variable that receives the pointer to the newly created, translated URL string, if any. *ppszTranslatedURL is valid only if the function returns S_OK.

This function does not validate the input URL string. A successful return value does not indicate that the URL strings are valid URLs.

URLAssociationDialog

HRESULT WINAPI URLAssociationDialog(
    HWND hwndParent,
    DWORD dwInFlags,
    LPCSTR pcszFile,
    LPCSTR pcszURL,
    LPSTR pszAppBuf,
    UINT ucAppBufLen
);

Invokes the unregistered URL protocol dialog box. This dialog box allows the user to select an application to associate with a previously unknown protocol.

hwndParent
Handle to the parent window.
dwInFlags
Bit flags that specify the behavior of the function. This value can be a combination of the following:
URLASSOCDLG_FL_USE_DEFAULT_NAME
Use the default file name (that is, "Internet Shortcut").
URLASSOCDLG_FL_REGISTER_ASSOC
Register the selected application as the handler for the protocol specified in pcszURL. The application is registered only if this flag is set and the user indicates that a persistent association is desired.
pcszFile
Pointer to a const zero-terminated string that contains the file name to associate with the URL's protocol.
pcszURL
Pointer to a const zero-terminated string that contains the URL with an unknown protocol.
pszAppBuf
Pointer to a buffer that receives the path of the application specified by the user.
ucAppBufLen
The size of pszAppBuf, in characters.
Previous Up Index Next

© 1996 Microsoft Corporation