;------------------------------------------------------------------------------------------------------------------------------------------
If ItemLocate("udfurlisopaquea",IntControl(77,103,0,0,0),@TAB) Then Goto skip_udfurlisopaquea
#DefineFunction udfUrlIsOpaqueA (sUrl)
Return (DllCall(StrCat(DirWindows(1),"SHLWAPI.DLL"),long:"UrlIsOpaqueA",lpstr:StrSub(sUrl,1,2083)))
;..........................................................................................................................................
; This function "udfUrlIsOpaqueA" returns a boolean value which indicates if the given URL is opaque or not.
; @TRUE resp. 1 ... is opaque.
; @FALSE resp. 0 ... is not opaque.
;
; Parameters
; sURL ... String of maximum length INTERNET_MAX_URL_LENGTH that contains the URL.
;
; Remarks
; A URL that has a scheme that is not followed by two slashes (//) is opaque.
; For example, mailto:xyz@somecompany.com is an opaque URL.
; Opaque URLs cannot be separated into the standard URL hierarchy.
;
; Requires minimum Version 5.00 of SHLWAPI.DLL
;
; Syntax
; BOOL UrlIsOpaque(
; LPCTSTR pszURL
; );
;
; INTERNET_MAX_PATH_LENGTH = 2048
; INTERNET_MAX_SCHEME_LENGTH = 32 ; longest protocol name length
; INTERNET_MAX_URL_LENGTH = 2083 ; (INTERNET_MAX_SCHEME_LENGTH + StrLen("://") + INTERNET_MAX_PATH_LENGTH)
;
;..........................................................................................................................................
; Detlev Dalitz.20020826
;..........................................................................................................................................
#EndFunction
:skip_udfurlisopaquea
;------------------------------------------------------------------------------------------------------------------------------------------
;--- test ---
sUrl1 = "mailto:xyz@somecompany.com" ; ... is an opaque URL.
sUrl2 = "http://somecompany.com" ; ... is not an opaque URL.
sMsgTitel = "Demo udfUrlIsOpaqueA (sUrl)"
sMsgText = ""
sMsgText = StrCat(sMsgText,sUrl1,@LF,udfUrlIsOpaqueA(sUrl1),@LF,@LF)
sMsgText = StrCat(sMsgText,sUrl2,@LF,udfUrlIsOpaqueA(sUrl2),@LF,@LF)
Message(sMsgTitel,sMsgText)
Exit
;------------------------------------------------------------------------------------------------------------------------------------------
;*EOF*