Artifact 3dec7c6df065235c0d8a08affd492fda0c0d46d5:
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0a 2a 20 20 20 20 20 ********\.*
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 20 20 20 20 20 20 20 20 20 69 6e 74 73 68 63 intshc
0070: 75 74 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 ut.d
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0090: 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 *.*
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 *.*
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00f0: 20 20 20 20 20 20 57 69 6e 64 6f 77 73 20 41 50 Windows AP
0100: 49 20 68 65 61 64 65 72 20 6d 6f 64 75 6c 65 20 I header module
0110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 *.*
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0170: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 *.*
0180: 20 20 20 20 54 72 61 6e 73 6c 61 74 65 64 20 66 Translated f
0190: 72 6f 6d 20 4d 69 6e 47 57 20 57 69 6e 64 6f 77 rom MinGW Window
01a0: 73 20 68 65 61 64 65 72 73 20 20 20 20 20 20 20 s headers
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 20 20 *.*
01c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01d0: 20 20 20 20 20 20 20 20 62 79 20 53 74 65 77 61 by Stewa
01e0: 72 74 20 47 6f 72 64 6f 6e 20 20 20 20 20 20 20 rt Gordon
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0200: 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 *.*
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a *.
0250: 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 *
0260: 20 20 20 20 20 20 20 20 50 6c 61 63 65 64 20 69 Placed i
0270: 6e 74 6f 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 nto public domai
0280: 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 n
0290: 20 20 20 20 20 20 20 20 2a 0a 5c 2a 2a 2a 2a 2a *.\*****
02a0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02b0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02c0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02e0: 2a 2a 2f 0a 6d 6f 64 75 6c 65 20 77 69 6e 33 32 **/.module win32
02f0: 2e 69 6e 74 73 68 63 75 74 3b 0a 0a 70 72 69 76 .intshcut;..priv
0300: 61 74 65 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 ate import win32
0310: 2e 75 6e 6b 6e 77 6e 2c 20 77 69 6e 33 32 2e 77 .unknwn, win32.w
0320: 69 6e 64 65 66 3b 0a 0a 65 6e 75 6d 20 3a 20 53 indef;..enum : S
0330: 43 4f 44 45 20 7b 0a 09 45 5f 46 4c 41 47 53 20 CODE {..E_FLAGS
0340: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0350: 20 20 20 20 3d 20 30 78 38 30 30 34 31 30 30 30 = 0x80041000
0360: 2c 0a 09 20 20 2f 2f 20 3d 20 4d 41 4b 45 5f 53 ,.. // = MAKE_S
0370: 43 4f 44 45 28 53 45 56 45 52 49 54 59 5f 45 52 CODE(SEVERITY_ER
0380: 52 4f 52 2c 20 46 41 43 49 4c 49 54 59 5f 49 54 ROR, FACILITY_IT
0390: 46 2c 20 30 78 31 30 30 30 29 0a 09 55 52 4c 5f F, 0x1000)..URL_
03a0: 45 5f 49 4e 56 41 4c 49 44 5f 53 59 4e 54 41 58 E_INVALID_SYNTAX
03b0: 20 20 20 20 20 20 20 20 3d 20 30 78 38 30 30 34 = 0x8004
03c0: 31 30 30 31 2c 0a 09 20 20 2f 2f 20 3d 20 4d 41 1001,.. // = MA
03d0: 4b 45 5f 53 43 4f 44 45 28 53 45 56 45 52 49 54 KE_SCODE(SEVERIT
03e0: 59 5f 45 52 52 4f 52 2c 20 46 41 43 49 4c 49 54 Y_ERROR, FACILIT
03f0: 59 5f 49 54 46 2c 20 30 78 31 30 30 31 29 0a 09 Y_ITF, 0x1001)..
0400: 55 52 4c 5f 45 5f 55 4e 52 45 47 49 53 54 45 52 URL_E_UNREGISTER
0410: 45 44 5f 50 52 4f 54 4f 43 4f 4c 20 3d 20 30 78 ED_PROTOCOL = 0x
0420: 38 30 30 34 31 30 30 32 2c 20 2f 2f 20 65 74 63 80041002, // etc
0430: 2e 0a 09 49 53 5f 45 5f 45 58 45 43 5f 46 41 49 ...IS_E_EXEC_FAI
0440: 4c 45 44 20 20 20 20 20 20 20 20 20 20 20 20 3d LED =
0450: 20 30 78 38 30 30 34 32 30 30 32 0a 7d 0a 0a 65 0x80042002.}..e
0460: 6e 75 6d 20 49 55 52 4c 5f 53 45 54 55 52 4c 5f num IURL_SETURL_
0470: 46 4c 41 47 53 20 7b 0a 09 49 55 52 4c 5f 53 45 FLAGS {..IURL_SE
0480: 54 55 52 4c 5f 46 4c 5f 47 55 45 53 53 5f 50 52 TURL_FL_GUESS_PR
0490: 4f 54 4f 43 4f 4c 20 3d 20 31 2c 0a 09 49 55 52 OTOCOL = 1,..IUR
04a0: 4c 5f 53 45 54 55 52 4c 5f 46 4c 5f 55 53 45 5f L_SETURL_FL_USE_
04b0: 44 45 46 41 55 4c 54 5f 50 52 4f 54 4f 43 4f 4c DEFAULT_PROTOCOL
04c0: 2c 0a 09 41 4c 4c 5f 49 55 52 4c 5f 53 45 54 55 ,..ALL_IURL_SETU
04d0: 52 4c 5f 46 4c 41 47 53 0a 7d 0a 0a 65 6e 75 6d RL_FLAGS.}..enum
04e0: 20 49 55 52 4c 5f 49 4e 56 4f 4b 45 43 4f 4d 4d IURL_INVOKECOMM
04f0: 41 4e 44 5f 46 4c 41 47 53 20 7b 0a 09 49 55 52 AND_FLAGS {..IUR
0500: 4c 5f 49 4e 56 4f 4b 45 43 4f 4d 4d 41 4e 44 5f L_INVOKECOMMAND_
0510: 46 4c 5f 41 4c 4c 4f 57 5f 55 49 20 3d 20 31 2c FL_ALLOW_UI = 1,
0520: 0a 09 49 55 52 4c 5f 49 4e 56 4f 4b 45 43 4f 4d ..IURL_INVOKECOM
0530: 4d 41 4e 44 5f 46 4c 5f 55 53 45 5f 44 45 46 41 MAND_FL_USE_DEFA
0540: 55 4c 54 5f 56 45 52 42 2c 0a 09 41 4c 4c 5f 49 ULT_VERB,..ALL_I
0550: 55 52 4c 5f 49 4e 56 4f 4b 45 43 4f 4d 4d 41 4e URL_INVOKECOMMAN
0560: 44 5f 46 4c 41 47 53 0a 7d 0a 0a 65 6e 75 6d 20 D_FLAGS.}..enum
0570: 54 52 41 4e 53 4c 41 54 45 55 52 4c 5f 49 4e 5f TRANSLATEURL_IN_
0580: 46 4c 41 47 53 20 7b 0a 09 54 52 41 4e 53 4c 41 FLAGS {..TRANSLA
0590: 54 45 55 52 4c 5f 46 4c 5f 47 55 45 53 53 5f 50 TEURL_FL_GUESS_P
05a0: 52 4f 54 4f 43 4f 4c 20 3d 20 31 2c 0a 09 54 52 ROTOCOL = 1,..TR
05b0: 41 4e 53 4c 41 54 45 55 52 4c 5f 46 4c 5f 55 53 ANSLATEURL_FL_US
05c0: 45 5f 44 45 46 41 55 4c 54 5f 50 52 4f 54 4f 43 E_DEFAULT_PROTOC
05d0: 4f 4c 2c 0a 09 41 4c 4c 5f 54 52 41 4e 53 4c 41 OL,..ALL_TRANSLA
05e0: 54 45 55 52 4c 5f 46 4c 41 47 53 0a 7d 0a 0a 65 TEURL_FLAGS.}..e
05f0: 6e 75 6d 20 55 52 4c 41 53 53 4f 43 49 41 54 49 num URLASSOCIATI
0600: 4f 4e 44 49 41 4c 4f 47 5f 49 4e 5f 46 4c 41 47 ONDIALOG_IN_FLAG
0610: 53 20 7b 0a 09 55 52 4c 41 53 53 4f 43 44 4c 47 S {..URLASSOCDLG
0620: 5f 46 4c 5f 55 53 45 5f 44 45 46 41 55 4c 54 5f _FL_USE_DEFAULT_
0630: 4e 41 4d 45 20 3d 20 31 2c 0a 09 55 52 4c 41 53 NAME = 1,..URLAS
0640: 53 4f 43 44 4c 47 5f 46 4c 5f 52 45 47 49 53 54 SOCDLG_FL_REGIST
0650: 45 52 5f 41 53 53 4f 43 2c 0a 09 41 4c 4c 5f 55 ER_ASSOC,..ALL_U
0660: 52 4c 41 53 53 4f 43 44 4c 47 5f 46 4c 41 47 53 RLASSOCDLG_FLAGS
0670: 0a 7d 0a 0a 65 6e 75 6d 20 4d 49 4d 45 41 53 53 .}..enum MIMEASS
0680: 4f 43 49 41 54 49 4f 4e 44 49 41 4c 4f 47 5f 49 OCIATIONDIALOG_I
0690: 4e 5f 46 4c 41 47 53 20 7b 0a 09 4d 49 4d 45 41 N_FLAGS {..MIMEA
06a0: 53 53 4f 43 44 4c 47 5f 46 4c 5f 52 45 47 49 53 SSOCDLG_FL_REGIS
06b0: 54 45 52 5f 41 53 53 4f 43 20 3d 20 31 2c 0a 09 TER_ASSOC = 1,..
06c0: 41 4c 4c 5f 4d 49 4d 45 41 53 53 4f 43 44 4c 47 ALL_MIMEASSOCDLG
06d0: 5f 46 4c 41 47 53 20 20 20 20 20 20 20 20 20 3d _FLAGS =
06e0: 20 4d 49 4d 45 41 53 53 4f 43 44 4c 47 5f 46 4c MIMEASSOCDLG_FL
06f0: 5f 52 45 47 49 53 54 45 52 5f 41 53 53 4f 43 0a _REGISTER_ASSOC.
0700: 7d 0a 0a 73 74 72 75 63 74 20 55 52 4c 49 4e 56 }..struct URLINV
0710: 4f 4b 45 43 4f 4d 4d 41 4e 44 49 4e 46 4f 20 7b OKECOMMANDINFO {
0720: 0a 09 44 57 4f 52 44 20 64 77 63 62 53 69 7a 65 ..DWORD dwcbSize
0730: 20 3d 20 55 52 4c 49 4e 56 4f 4b 45 43 4f 4d 4d = URLINVOKECOMM
0740: 41 4e 44 49 4e 46 4f 2e 73 69 7a 65 6f 66 3b 0a ANDINFO.sizeof;.
0750: 09 44 57 4f 52 44 20 64 77 46 6c 61 67 73 3b 0a .DWORD dwFlags;.
0760: 09 48 57 4e 44 20 20 68 77 6e 64 50 61 72 65 6e .HWND hwndParen
0770: 74 3b 0a 09 50 43 53 54 52 20 70 63 73 7a 56 65 t;..PCSTR pcszVe
0780: 72 62 3b 0a 7d 0a 61 6c 69 61 73 20 55 52 4c 49 rb;.}.alias URLI
0790: 4e 56 4f 4b 45 43 4f 4d 4d 41 4e 44 49 4e 46 4f NVOKECOMMANDINFO
07a0: 20 43 55 52 4c 49 4e 56 4f 4b 45 43 4f 4d 4d 41 CURLINVOKECOMMA
07b0: 4e 44 49 4e 46 4f 3b 0a 61 6c 69 61 73 20 55 52 NDINFO;.alias UR
07c0: 4c 49 4e 56 4f 4b 45 43 4f 4d 4d 41 4e 44 49 4e LINVOKECOMMANDIN
07d0: 46 4f 2a 20 50 55 52 4c 49 4e 56 4f 4b 45 43 4f FO* PURLINVOKECO
07e0: 4d 4d 41 4e 44 49 4e 46 4f 2c 20 50 43 55 52 4c MMANDINFO, PCURL
07f0: 49 4e 56 4f 4b 45 43 4f 4d 4d 41 4e 44 49 4e 46 INVOKECOMMANDINF
0800: 4f 3b 0a 0a 69 6e 74 65 72 66 61 63 65 20 49 55 O;..interface IU
0810: 6e 69 66 6f 72 6d 52 65 73 6f 75 72 63 65 4c 6f niformResourceLo
0820: 63 61 74 6f 72 20 3a 20 49 55 6e 6b 6e 6f 77 6e cator : IUnknown
0830: 20 7b 0a 09 48 52 45 53 55 4c 54 20 53 65 74 55 {..HRESULT SetU
0840: 52 4c 28 50 43 53 54 52 2c 20 44 57 4f 52 44 29 RL(PCSTR, DWORD)
0850: 3b 0a 09 48 52 45 53 55 4c 54 20 47 65 74 55 52 ;..HRESULT GetUR
0860: 4c 28 50 53 54 52 2a 29 3b 0a 09 48 52 45 53 55 L(PSTR*);..HRESU
0870: 4c 54 20 49 6e 76 6f 6b 65 43 6f 6d 6d 61 6e 64 LT InvokeCommand
0880: 28 50 55 52 4c 49 4e 56 4f 4b 45 43 4f 4d 4d 41 (PURLINVOKECOMMA
0890: 4e 44 49 4e 46 4f 29 3b 0a 7d 0a 61 6c 69 61 73 NDINFO);.}.alias
08a0: 20 49 55 6e 69 66 6f 72 6d 52 65 73 6f 75 72 63 IUniformResourc
08b0: 65 4c 6f 63 61 74 6f 72 20 43 49 55 6e 69 66 6f eLocator CIUnifo
08c0: 72 6d 52 65 73 6f 75 72 63 65 4c 6f 63 61 74 6f rmResourceLocato
08d0: 72 3b 0a 61 6c 69 61 73 20 49 55 6e 69 66 6f 72 r;.alias IUnifor
08e0: 6d 52 65 73 6f 75 72 63 65 4c 6f 63 61 74 6f 72 mResourceLocator
08f0: 2a 20 50 49 55 6e 69 66 6f 72 6d 52 65 73 6f 75 * PIUniformResou
0900: 72 63 65 4c 6f 63 61 74 6f 72 2c 0a 20 20 50 43 rceLocator,. PC
0910: 49 55 6e 69 66 6f 72 6d 52 65 73 6f 75 72 63 65 IUniformResource
0920: 4c 6f 63 61 74 6f 72 3b 0a 0a 65 78 74 65 72 6e Locator;..extern
0930: 20 28 57 69 6e 64 6f 77 73 29 20 7b 0a 09 42 4f (Windows) {..BO
0940: 4f 4c 20 49 6e 65 74 49 73 4f 66 66 6c 69 6e 65 OL InetIsOffline
0950: 28 44 57 4f 52 44 29 3b 0a 09 48 52 45 53 55 4c (DWORD);..HRESUL
0960: 54 20 4d 49 4d 45 41 73 73 6f 63 69 61 74 69 6f T MIMEAssociatio
0970: 6e 44 69 61 6c 6f 67 41 28 48 57 4e 44 2c 20 44 nDialogA(HWND, D
0980: 57 4f 52 44 2c 20 50 43 53 54 52 2c 20 50 43 53 WORD, PCSTR, PCS
0990: 54 52 2c 20 50 53 54 52 2c 20 55 49 4e 54 29 3b TR, PSTR, UINT);
09a0: 0a 09 48 52 45 53 55 4c 54 20 4d 49 4d 45 41 73 ..HRESULT MIMEAs
09b0: 73 6f 63 69 61 74 69 6f 6e 44 69 61 6c 6f 67 57 sociationDialogW
09c0: 28 48 57 4e 44 2c 20 44 57 4f 52 44 2c 20 50 43 (HWND, DWORD, PC
09d0: 57 53 54 52 2c 20 50 43 57 53 54 52 2c 20 50 57 WSTR, PCWSTR, PW
09e0: 53 54 52 2c 20 55 49 4e 54 29 3b 0a 09 48 52 45 STR, UINT);..HRE
09f0: 53 55 4c 54 20 54 72 61 6e 73 6c 61 74 65 55 52 SULT TranslateUR
0a00: 4c 41 28 50 43 53 54 52 2c 20 44 57 4f 52 44 2c LA(PCSTR, DWORD,
0a10: 20 50 53 54 52 2a 29 3b 0a 09 48 52 45 53 55 4c PSTR*);..HRESUL
0a20: 54 20 54 72 61 6e 73 6c 61 74 65 55 52 4c 57 28 T TranslateURLW(
0a30: 50 43 57 53 54 52 2c 20 44 57 4f 52 44 2c 20 50 PCWSTR, DWORD, P
0a40: 57 53 54 52 2a 29 3b 0a 09 48 52 45 53 55 4c 54 WSTR*);..HRESULT
0a50: 20 55 52 4c 41 73 73 6f 63 69 61 74 69 6f 6e 44 URLAssociationD
0a60: 69 61 6c 6f 67 41 28 48 57 4e 44 2c 20 44 57 4f ialogA(HWND, DWO
0a70: 52 44 2c 20 50 43 53 54 52 2c 20 50 43 53 54 52 RD, PCSTR, PCSTR
0a80: 2c 20 50 53 54 52 2c 20 55 49 4e 54 29 3b 0a 09 , PSTR, UINT);..
0a90: 48 52 45 53 55 4c 54 20 55 52 4c 41 73 73 6f 63 HRESULT URLAssoc
0aa0: 69 61 74 69 6f 6e 44 69 61 6c 6f 67 57 28 48 57 iationDialogW(HW
0ab0: 4e 44 2c 20 44 57 4f 52 44 2c 20 50 43 57 53 54 ND, DWORD, PCWST
0ac0: 52 2c 20 50 43 57 53 54 52 2c 20 50 57 53 54 52 R, PCWSTR, PWSTR
0ad0: 2c 20 55 49 4e 54 29 3b 0a 7d 0a 0a 76 65 72 73 , UINT);.}..vers
0ae0: 69 6f 6e 20 28 55 6e 69 63 6f 64 65 29 20 7b 0a ion (Unicode) {.
0af0: 09 61 6c 69 61 73 20 54 72 61 6e 73 6c 61 74 65 .alias Translate
0b00: 55 52 4c 57 20 54 72 61 6e 73 6c 61 74 65 55 52 URLW TranslateUR
0b10: 4c 3b 0a 09 61 6c 69 61 73 20 4d 49 4d 45 41 73 L;..alias MIMEAs
0b20: 73 6f 63 69 61 74 69 6f 6e 44 69 61 6c 6f 67 57 sociationDialogW
0b30: 20 4d 49 4d 45 41 73 73 6f 63 69 61 74 69 6f 6e MIMEAssociation
0b40: 44 69 61 6c 6f 67 3b 0a 09 61 6c 69 61 73 20 55 Dialog;..alias U
0b50: 52 4c 41 73 73 6f 63 69 61 74 69 6f 6e 44 69 61 RLAssociationDia
0b60: 6c 6f 67 57 20 55 52 4c 41 73 73 6f 63 69 61 74 logW URLAssociat
0b70: 69 6f 6e 44 69 61 6c 6f 67 3b 0a 7d 20 65 6c 73 ionDialog;.} els
0b80: 65 20 7b 0a 09 61 6c 69 61 73 20 54 72 61 6e 73 e {..alias Trans
0b90: 6c 61 74 65 55 52 4c 41 20 54 72 61 6e 73 6c 61 lateURLA Transla
0ba0: 74 65 55 52 4c 3b 0a 09 61 6c 69 61 73 20 4d 49 teURL;..alias MI
0bb0: 4d 45 41 73 73 6f 63 69 61 74 69 6f 6e 44 69 61 MEAssociationDia
0bc0: 6c 6f 67 41 20 4d 49 4d 45 41 73 73 6f 63 69 61 logA MIMEAssocia
0bd0: 74 69 6f 6e 44 69 61 6c 6f 67 3b 0a 09 61 6c 69 tionDialog;..ali
0be0: 61 73 20 55 52 4c 41 73 73 6f 63 69 61 74 69 6f as URLAssociatio
0bf0: 6e 44 69 61 6c 6f 67 41 20 55 52 4c 41 73 73 6f nDialogA URLAsso
0c00: 63 69 61 74 69 6f 6e 44 69 61 6c 6f 67 3b 0a 7d ciationDialog;.}
0c10: 0a .