Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1089 lines
21 KiB

  1. #include <windows.h>
  2. #include <commctrl.h>
  3. #include <setupapi.h>
  4. #include <winspool.h>
  5. #include <winsprlp.h>
  6. #include <shellapi.h>
  7. #include <lm.h>
  8. #include <userenv.h>
  9. #include <userenvp.h>
  10. #define REALLY_USE_UNICODE 1
  11. #include <tapi.h>
  12. #include <shlobj.h>
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <tchar.h>
  16. #include "winfax.h"
  17. #include "resource.h"
  18. #include "faxutil.h"
  19. #include "faxwiz.h"
  20. #include "faxreg.h"
  21. #pragma warning(3:4101) // Unreferenced local variable
  22. #define MAX_PLATFORMS 2
  23. #define PRINTER_DRIVER_DIR 66000
  24. #define PRINTER_CLIENT_DIR 66001
  25. #define COVERPAGE_SERVER_DIR 66002
  26. #define COVERPAGE_CLIENT_DIR 66003
  27. #define OUTLOOK_ECF_DIR 66004
  28. #define FAX_SERVICE_NAME TEXT("Fax")
  29. #define FAX_PRINTER_NAME TEXT("Fax")
  30. #define FAX_SERVICE_DISPLAY_NAME TEXT("Microsoft Fax Service")
  31. #define FAX_SERVICE_IMAGE_NAME TEXT("%systemroot%\\system32\\faxsvc.exe")
  32. #define FAX_SERVICE_DEPENDENCY TEXT("TapiSrv\0RpcSs\0PlugPlay\0\0")
  33. #define EXCHANGE_CLIENT_EXT_NAME "FaxExtension"
  34. #define EXCHANGE_CLIENT_EXT_FILE "%windir%\\system32\\faxext32.dll"
  35. #define EXCHANGE_CONTEXT_MASK "00000100000000"
  36. #define DEFAULT_FAX_STORE_DIR TEXT("%systemroot%\\FaxStore")
  37. #define WM_MY_PROGRESS (WM_USER+100)
  38. #define FAX_DRIVER_NAME TEXT("Windows NT Fax Driver")
  39. #define FAX_MONITOR_NAME TEXT("Windows NT Fax Monitor")
  40. #define UNINSTALL_STRING TEXT("%windir%\\system32\\faxsetup.exe -r")
  41. #define LT_PRINTER_NAME 32
  42. #define LT_FAX_PHONE 64
  43. #define LT_USER_NAME 64
  44. #define LT_AREA_CODE 10
  45. #define LT_PHONE_NUMBER 50
  46. #define LT_ACCOUNT_NAME 64
  47. #define LT_PASSWORD 64
  48. #define SPLREG_UI_SINGLE_STATUS TEXT( "UISingleJobStatusString" )
  49. #define FAXCLIENTS_DIR TEXT("FxClient")
  50. #define FAXCLIENTS_FULL_PATH TEXT("%SystemRoot%\\System32\\Spool\\Drivers\\FxClient")
  51. #define FAXCLIENTS_COMMENT TEXT("Fax Client Installations")
  52. #define COVERPAGE_DIR TEXT("CoverPg")
  53. #define OLD_COVERPAGE_DIR TEXT("CoverPage")
  54. #define OUTLOOKCONFIG_DIR TEXT("addins")
  55. #define COVERPAGE_EDITOR TEXT("%systemroot%\\system32\\faxcover.exe")
  56. #define DEFAULT_COVERPAGE_DIR TEXT("%systemroot%\\CoverPg")
  57. #define DEFAULT_FAX_PROFILE TEXT("")
  58. #define FAXAB_SERVICE_NAME TEXT("MSFAX AB")
  59. #define FAXXP_SERVICE_NAME TEXT("MSFAX XP")
  60. #define LVIS_GCNOCHECK 0x1000
  61. #define LVIS_GCCHECK 0x2000
  62. #define PLATFORM_NONE 0
  63. #define PLATFORM_USE_PRINTER 1
  64. #define PLATFORM_USE_MACHINE 2
  65. #define SETUP_ACTION_NONE 0
  66. #define SETUP_ACTION_COPY 1
  67. #define SETUP_ACTION_DELETE 2
  68. #define COVERPAGE_EXTENSION TEXT(".cov")
  69. #define COVERPAGE_ASSOC_NAME TEXT("Coverpage")
  70. #define COVERPAGE_ASSOC_DESC TEXT("Fax Coverpage File")
  71. #define COVERPAGE_OPEN_COMMAND TEXT("%SystemRoot%\\system32\\faxcover.exe %1")
  72. #define FAXVIEW_EXTENSION TEXT(".tif")
  73. #define FAXVIEW_EXTENSION2 TEXT(".tiff")
  74. #define FAXVIEW_ASSOC_NAME TEXT("Fax Document")
  75. #define FAXVIEW_ASSOC_DESC TEXT("Fax Document")
  76. #define WANGIMAGE_ASSOC_NAME TEXT("TIFImage.Document")
  77. #define FAXVIEW_OPEN_COMMAND TEXT("%SystemRoot%\\system32\\FaxView.exe \"%1\"")
  78. #define FAXVIEW_PRINT_COMMAND TEXT("%SystemRoot%\\system32\\FaxView.exe -p \"%1\"")
  79. #define FAXVIEW_PRINTTO_COMMAND TEXT("%SystemRoot%\\system32\\FaxView.exe -pt \"%1\" \"%2\" \"%3\" \"%4\"")
  80. #define FAXVIEW_FILE_NAME TEXT("%SystemRoot%\\system32\\FaxView.exe")
  81. #define FAXVIEW_ICON_INDEX 0
  82. #define SETUP_TYPE_INVALID 0
  83. #define SETUP_TYPE_WORKSTATION 1
  84. #define SETUP_TYPE_SERVER 2
  85. #define SETUP_TYPE_CLIENT 3
  86. #define SETUP_TYPE_POINT_PRINT 4
  87. #define SETUP_TYPE_REMOTE_ADMIN 5
  88. #define WRONG_PLATFORM 10
  89. typedef HPROPSHEETPAGE *LPHPROPSHEETPAGE;
  90. typedef struct _WIZPAGE {
  91. UINT ButtonState;
  92. UINT HelpContextId;
  93. LPTSTR Title;
  94. DWORD PageId;
  95. DLGPROC DlgProc;
  96. PROPSHEETPAGE Page;
  97. } WIZPAGE, *PWIZPAGE;
  98. #define REGKEY_WORDPAD TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OptionalComponents\\WordPad")
  99. #define REGVAL_WP_INSTALLED TEXT("Installed")
  100. #define REGVAL_WP_INF TEXT("INF")
  101. #define REGVAL_WP_SECTION TEXT("Section")
  102. #define RUNDLL32_INF_INSTALL_CMD TEXT("rundll32.exe setupapi,InstallHinfSection %s 132 %s")
  103. #define FAX_MONITOR_CMD TEXT("faxstat.exe")
  104. #define WORDPAD_OPEN_CMD TEXT("\"%SystemDrive%\\Program Files\\Windows NT\\Accessories\\WORDPAD.EXE\" \"%1\"")
  105. #define WORDPAD_PRINT_CMD TEXT("\"%SystemDrive%\\Program Files\\Windows NT\\Accessories\\WORDPAD.EXE\" /p \"%1\"")
  106. #define WORDPAD_PRINTTO_CMD TEXT("\"%SystemDrive%\\Program Files\\Windows NT\\Accessories\\WORDPAD.EXE\" /pt \"%1\" \"%2\" \"%3\" \"%4\"")
  107. typedef struct _PLATFORM_INFO {
  108. LPTSTR PrintPlatform;
  109. LPTSTR OsPlatform;
  110. BOOL Selected;
  111. DWORD Mask;
  112. LPTSTR DriverDir;
  113. BOOL ThisPlatform;
  114. } PLATFORM_INFO, *PPLATFORM_INFO;
  115. typedef struct _FILE_QUEUE_INFO {
  116. LPTSTR SectionName;
  117. LPTSTR DestDir;
  118. DWORD InfDirId;
  119. DWORD DestDirId;
  120. DWORD PlatformsFlag;
  121. DWORD CopyFlags;
  122. } FILE_QUEUE_INFO, *PFILE_QUEUE_INFO;
  123. typedef struct _FILE_QUEUE_CONTEXT {
  124. HWND hwnd;
  125. PVOID QueueContext;
  126. } FILE_QUEUE_CONTEXT, *PFILE_QUEUE_CONTEXT;
  127. typedef struct _LINE_INFO {
  128. DWORD PermanentLineID;
  129. BOOL Selected;
  130. LPTSTR DeviceName;
  131. LPTSTR ProviderName;
  132. DWORD Rings;
  133. DWORD Flags; // device use flags
  134. } LINE_INFO, *PLINE_INFO;
  135. typedef struct _WIZ_DATA {
  136. BOOL RoutePrint;
  137. BOOL UseDefaultPrinter;
  138. BOOL RouteStore;
  139. BOOL RouteMail;
  140. TCHAR PrinterName[LT_PRINTER_NAME+1];
  141. TCHAR UserName[LT_USER_NAME+1];
  142. TCHAR AreaCode[LT_AREA_CODE+1];
  143. TCHAR PhoneNumber[LT_PHONE_NUMBER+1];
  144. TCHAR Csid[LT_FAX_PHONE+1];
  145. TCHAR Tsid[LT_FAX_PHONE+1];
  146. TCHAR RoutePrinterName[128];
  147. TCHAR RouteDir[MAX_PATH];
  148. TCHAR RouteProfile[128];
  149. TCHAR AccountName[64];
  150. TCHAR Password[64];
  151. TCHAR MapiProfile[128];
  152. BOOL UseLocalSystem;
  153. BOOL UseExchange;
  154. } WIZ_DATA, *PWIZ_DATA;
  155. //
  156. // group flags
  157. //
  158. #define USE_COMMON_GROUP 0x00000001 // do not use USE_USER_GROUP and USE_COMMON_GROUP
  159. #define USE_USER_GROUP 0x00000002 // together, they are mutually exclusive
  160. #define USE_APP_PATH 0x00000004 // commandline must contain the subkey name
  161. #define USE_SERVER_NAME 0x00000008 // if we're doing a client install the append the server name to the command line
  162. typedef struct _GROUP_ITEMS {
  163. LPTSTR GroupName;
  164. LPTSTR Description;
  165. LPTSTR CommandLine;
  166. LPTSTR IconPath;
  167. LPTSTR WorkingDirectory;
  168. DWORD Flags;
  169. INT IconIndex;
  170. INT ShowCmd;
  171. WORD HotKey;
  172. } GROUP_ITEMS, *PGROUP_ITEMS;
  173. typedef struct _SECURITY_INFO {
  174. TCHAR AccountName[256];
  175. TCHAR Password[256];
  176. } SECURITY_INFO, *PSECURITY_INFO;
  177. typedef struct _MDM_DEVSPEC {
  178. DWORD Contents; // Set to 1 (indicates containing key)
  179. DWORD KeyOffset; // Offset to key from start of this struct.
  180. // (not from start of LINEDEVCAPS ).
  181. // 8 in our case.
  182. CHAR String[1]; // place containing null-terminated registry key.
  183. } MDM_DEVSPEC, *PMDM_DEVSPEC;
  184. typedef struct {
  185. HANDLE hComm;
  186. CHAR szDeviceName[1];
  187. } DEVICEID, *PDEVICEID;
  188. typedef enum _DATAYPE {
  189. DT_STRING,
  190. DT_LONGINT,
  191. DT_BOOLEAN,
  192. DT_NONE,
  193. } DATATYPE;
  194. TCHAR ThisPlatformName[100];
  195. #define SECTION_NAME L"Fax"
  196. #define KEY_MODE L"Mode"
  197. #define MODE_NEW L"New"
  198. #define MODE_UPGRADE L"Upgrade"
  199. #define MODE_REMOVE L"Remove"
  200. #define MODE_DRIVERS L"Drivers"
  201. #define KEY_FAX_PRINTER_NAME L"FaxPrinterName"
  202. #define KEY_FAX_NUMBER L"FaxNumber"
  203. #define KEY_USE_EXCHANGE L"UseExchange"
  204. #define KEY_PROFILE_NAME L"ProfileName"
  205. #define KEY_ROUTE_MAIL L"RouteMail"
  206. #define KEY_ROUTE_PROFILENAME L"RouteProfileName"
  207. #define KEY_PLATFORMS L"Platforms"
  208. #define KEY_ROUTE_PRINT L"RoutePrint"
  209. #define KEY_ROUTE_PRINTERNAME L"RoutePrintername"
  210. #define KEY_ACCOUNT_NAME L"AccountName"
  211. #define KEY_PASSWORD L"Password"
  212. #define KEY_FAX_PHONE L"FaxPhone"
  213. #define KEY_ROUTE_FOLDER L"RouteFolder"
  214. #define KEY_DEST_DIRPATH L"FolderName"
  215. #define KEY_SERVER_NAME L"ServerName"
  216. #define KEY_SENDER_NAME L"SenderName"
  217. #define KEY_SENDER_FAX_AREA_CODE L"SenderFaxAreaCode"
  218. #define KEY_SENDER_FAX_NUMBER L"SenderFaxNumber"
  219. #define EMPTY_STRING L""
  220. #define UAA_MODE 0
  221. #define UAA_PRINTER_NAME 1
  222. #define UAA_FAX_PHONE 2
  223. #define UAA_USE_EXCHANGE 3
  224. #define UAA_DEST_PROFILENAME 4
  225. #define UAA_ROUTE_MAIL 5
  226. #define UAA_ROUTE_PROFILENAME 6
  227. #define UAA_PLATFORM_LIST 7
  228. #define UAA_ROUTE_PRINT 8
  229. #define UAA_DEST_PRINTERLIST 9
  230. #define UAA_ACCOUNT_NAME 10
  231. #define UAA_PASSWORD 11
  232. #define UAA_DEST_DIRPATH 12
  233. #define UAA_SERVER_NAME 13
  234. #define UAA_SENDER_NAME 14
  235. #define UAA_SENDER_FAX_AREA_CODE 15
  236. #define UAA_SENDER_FAX_NUMBER 16
  237. #define UAA_ROUTE_FOLDER 17
  238. typedef struct _UNATTEND_ANSWER {
  239. DWORD ControlId;
  240. LPWSTR SectionName;
  241. LPWSTR KeyName;
  242. LPWSTR DefaultAnswer;
  243. DATATYPE DataType;
  244. union {
  245. PWSTR String;
  246. LONG Num;
  247. BOOL Bool;
  248. } Answer;
  249. } UNATTEND_ANSWER, *PUNATTEND_ANSWER;
  250. typedef enum {
  251. WizPageDeviceStatus,
  252. WizPageDeviceSelection,
  253. WizPageServerName,
  254. WizPageExchange,
  255. WizPageFileCopy,
  256. WizPageStationId,
  257. WizPageRoutePrint,
  258. WizPageRouteStoreDir,
  259. WizPageRouteInbox,
  260. WizPageRouteSecurity,
  261. WizPagePlatforms,
  262. WizPageLast,
  263. WizPageLastUninstall,
  264. WizPageClientServerName,
  265. WizPageClientUserInfo,
  266. WizPageClientFileCopy,
  267. WizPageClientLast,
  268. WizPageRemoteAdminCopy,
  269. WizPageMaximum
  270. } WizPage;
  271. extern HINSTANCE FaxWizModuleHandle;
  272. extern HWND FaxWizParentWindow;
  273. extern DWORD ServerWizardPages[];
  274. extern DWORD ClientWizardPages[];
  275. extern DWORD PointPrintWizardPages[];
  276. extern WIZ_DATA WizData;
  277. extern PLINE_INFO LineInfo;
  278. extern DWORD FaxDevices;
  279. extern TCHAR SourceDirectory[4096];
  280. extern TCHAR ClientSetupServerName[128];
  281. extern BOOL PointPrintSetup;
  282. extern PLATFORM_INFO Platforms[];
  283. extern WORD EnumPlatforms[4];
  284. extern BOOL OkToCancel;
  285. extern DWORD InstallMode;
  286. extern DWORD CountPlatforms;
  287. extern PLATFORM_INFO Platforms[];
  288. extern DWORD RequestedSetupType;
  289. extern BOOL RebootRequired;
  290. extern BOOL SuppressReboot;
  291. extern DWORD Installed;
  292. extern DWORD InstallType;
  293. extern DWORD InstalledPlatforms;
  294. extern DWORD InstallThreadError;
  295. extern BOOL MapiAvail;
  296. extern DWORD CurrentLocationId;
  297. extern DWORD CurrentCountryId;
  298. extern LPTSTR CurrentAreaCode;
  299. extern UNATTEND_ANSWER UnattendAnswerTable[];
  300. extern BOOL Unattended;
  301. extern BOOL NtGuiMode;
  302. extern DWORD Enabled;
  303. LRESULT
  304. SecurityErrorDlgProc(
  305. HWND hwnd,
  306. UINT message,
  307. WPARAM wParam,
  308. LPARAM lParam
  309. );
  310. LRESULT
  311. CommonDlgProc(
  312. HWND hwnd,
  313. UINT message,
  314. WPARAM wParam,
  315. LPARAM lParam
  316. );
  317. LRESULT
  318. DeviceStatusDlgProc(
  319. HWND hwnd,
  320. UINT message,
  321. WPARAM wParam,
  322. LPARAM lParam
  323. );
  324. LRESULT
  325. PlatformsDlgProc(
  326. HWND hwnd,
  327. UINT message,
  328. WPARAM wParam,
  329. LPARAM lParam
  330. );
  331. LRESULT
  332. FileCopyDlgProc(
  333. HWND hwnd,
  334. UINT message,
  335. WPARAM wParam,
  336. LPARAM lParam
  337. );
  338. LRESULT
  339. LastPageDlgProc(
  340. HWND hwnd,
  341. UINT message,
  342. WPARAM wParam,
  343. LPARAM lParam
  344. );
  345. LRESULT
  346. LastPageUninstallDlgProc(
  347. HWND hwnd,
  348. UINT message,
  349. WPARAM wParam,
  350. LPARAM lParam
  351. );
  352. LRESULT
  353. ServerNameDlgProc(
  354. HWND hwnd,
  355. UINT message,
  356. WPARAM wParam,
  357. LPARAM lParam
  358. );
  359. LRESULT
  360. StationIdDlgProc(
  361. HWND hwnd,
  362. UINT message,
  363. WPARAM wParam,
  364. LPARAM lParam
  365. );
  366. LRESULT
  367. RoutePrintDlgProc(
  368. HWND hwnd,
  369. UINT message,
  370. WPARAM wParam,
  371. LPARAM lParam
  372. );
  373. LRESULT
  374. RouteStoreDlgProc(
  375. HWND hwnd,
  376. UINT message,
  377. WPARAM wParam,
  378. LPARAM lParam
  379. );
  380. LRESULT
  381. RouteMailDlgProc(
  382. HWND hwnd,
  383. UINT message,
  384. WPARAM wParam,
  385. LPARAM lParam
  386. );
  387. LRESULT
  388. RouteSecurityDlgProc(
  389. HWND hwnd,
  390. UINT message,
  391. WPARAM wParam,
  392. LPARAM lParam
  393. );
  394. LRESULT
  395. ClientServerNameDlgProc(
  396. HWND hwnd,
  397. UINT message,
  398. WPARAM wParam,
  399. LPARAM lParam
  400. );
  401. LRESULT
  402. ClientUserInfoDlgProc(
  403. HWND hwnd,
  404. UINT message,
  405. WPARAM wParam,
  406. LPARAM lParam
  407. );
  408. LRESULT
  409. ClientFileCopyDlgProc(
  410. HWND hwnd,
  411. UINT msg,
  412. WPARAM wParam,
  413. LPARAM lParam
  414. );
  415. LRESULT
  416. PrinterNameDlgProc(
  417. HWND hwnd,
  418. UINT message,
  419. WPARAM wParam,
  420. LPARAM lParam
  421. );
  422. LRESULT
  423. RemoteAdminFileCopyDlgProc(
  424. HWND hwnd,
  425. UINT message,
  426. WPARAM wParam,
  427. LPARAM lParam
  428. );
  429. DWORD
  430. ServerFileCopyThread(
  431. HWND hwnd
  432. );
  433. DWORD
  434. RemoteAdminCopyThread(
  435. HWND hwnd
  436. );
  437. DWORD
  438. ClientFileCopyThread(
  439. HWND hwnd
  440. );
  441. PVOID
  442. MyEnumPrinters(
  443. LPTSTR pServerName,
  444. DWORD level,
  445. PDWORD pcPrinters,
  446. DWORD Flags
  447. );
  448. PVOID
  449. MyEnumMonitors(
  450. PDWORD pcMonitors
  451. );
  452. PVOID
  453. MyEnumDrivers(
  454. LPTSTR pEnvironment,
  455. PDWORD pcDrivers
  456. );
  457. BOOL
  458. GetMapiProfiles(
  459. HWND hwnd,
  460. DWORD ResourceId
  461. );
  462. BOOL
  463. CreateServerFaxPrinter(
  464. HWND hwnd,
  465. LPTSTR FaxPrinterName
  466. );
  467. DWORD
  468. CreateClientFaxPrinter(
  469. HWND hwnd,
  470. LPTSTR FaxPrinterName
  471. );
  472. BOOL
  473. WINAPI
  474. AddPortExW(
  475. IN LPWSTR pName, OPTIONAL
  476. IN DWORD Level,
  477. IN LPBYTE lpBuffer,
  478. IN LPWSTR lpMonitorName
  479. );
  480. BOOL
  481. InstallFaxService(
  482. BOOL UseLocalSystem,
  483. BOOL DemandStart,
  484. LPTSTR AccountName,
  485. LPTSTR Password
  486. );
  487. DWORD
  488. StartFaxService(
  489. VOID
  490. );
  491. DWORD
  492. MyStartService(
  493. LPTSTR ServiceName
  494. );
  495. DWORD
  496. DeviceInitThread(
  497. HWND hwnd
  498. );
  499. DWORD
  500. GetModemClass(
  501. HANDLE hFile
  502. );
  503. //------------------------------------------
  504. // private setupapi.dll functions
  505. //------------------------------------------
  506. BOOL
  507. IsUserAdmin(
  508. VOID
  509. );
  510. VOID
  511. OutOfMemory(
  512. IN HWND Owner OPTIONAL
  513. );
  514. //------------------------------------------
  515. VOID
  516. DeleteModemRegistryKey(
  517. VOID
  518. );
  519. BOOL
  520. StopFaxService(
  521. VOID
  522. );
  523. BOOL
  524. DeleteFaxService(
  525. VOID
  526. );
  527. BOOL
  528. StartSpoolerService(
  529. VOID
  530. );
  531. BOOL
  532. StopSpoolerService(
  533. VOID
  534. );
  535. BOOL
  536. SetServerRegistryData(
  537. VOID
  538. );
  539. BOOL
  540. SetClientRegistryData(
  541. VOID
  542. );
  543. BOOL
  544. SetSoundRegistryData(
  545. VOID
  546. );
  547. DWORD
  548. SetServiceSecurity(
  549. LPTSTR AccountName
  550. );
  551. BOOL
  552. IsPrinterFaxPrinter(
  553. LPTSTR PrinterName
  554. );
  555. BOOL
  556. ShareFaxPrinter(
  557. LPHANDLE hPrinter,
  558. LPTSTR FaxPrinterName
  559. );
  560. BOOL
  561. StopTheService(
  562. LPTSTR ServiceName
  563. );
  564. BOOL
  565. SetServiceDependency(
  566. LPTSTR ServiceName,
  567. LPTSTR DependentServiceName
  568. );
  569. BOOL
  570. SetServiceAccount(
  571. LPTSTR ServiceName,
  572. PSECURITY_INFO SecurityInfo
  573. );
  574. DWORD
  575. PointPrintFileCopyThread(
  576. HWND hwnd
  577. );
  578. BOOL
  579. CallModemInstallWizard(
  580. HWND hwnd
  581. );
  582. BOOL
  583. SetInstalledFlag(
  584. BOOL Installed
  585. );
  586. BOOL
  587. SetInstallType(
  588. DWORD InstallType
  589. );
  590. BOOL
  591. SetInstalledPlatforms(
  592. DWORD PlatformsMask
  593. );
  594. BOOL
  595. GetInstallationInfo(
  596. LPDWORD Installed,
  597. LPDWORD InstallType,
  598. LPDWORD InstalledPlatforms,
  599. LPDWORD Enabled
  600. );
  601. BOOL
  602. DeleteFaxRegistryData(
  603. VOID
  604. );
  605. BOOL
  606. MyDeleteService(
  607. LPTSTR ServiceName
  608. );
  609. BOOL
  610. DeleteFaxPrinters(
  611. HWND hwnd
  612. );
  613. //
  614. // util.c
  615. //
  616. LPTSTR
  617. RemoveLastNode(
  618. LPTSTR Path
  619. );
  620. DWORD
  621. ExtraChars(
  622. HWND hwnd,
  623. LPTSTR TextBuffer
  624. );
  625. LPTSTR
  626. CompactFileName(
  627. LPCTSTR FileNameIn,
  628. DWORD CharsToRemove
  629. );
  630. //
  631. // fileq.c
  632. //
  633. BOOL
  634. InitializeFileQueue(
  635. HWND hwnd,
  636. HINF *SetupInf,
  637. HSPFILEQ **FileQueue,
  638. PVOID *QueueContext,
  639. LPTSTR SourceRoot
  640. );
  641. BOOL
  642. ProcessFileQueue(
  643. HINF SetupInf,
  644. HSPFILEQ *FileQueue,
  645. PVOID QueueContext,
  646. LPTSTR SourceRoot,
  647. PFILE_QUEUE_INFO FileQueueInfo,
  648. DWORD CountFileQueueInfo,
  649. PSP_FILE_CALLBACK MyQueueCallback,
  650. DWORD ActionId
  651. );
  652. BOOL
  653. CloseFileQueue(
  654. HSPFILEQ *FileQueue,
  655. PVOID QueueContext
  656. );
  657. //
  658. // groups.c
  659. //
  660. VOID
  661. CreateGroupItems(
  662. BOOL RemoteAdmin,
  663. LPTSTR ServerName
  664. );
  665. VOID
  666. DeleteGroupItems(
  667. VOID
  668. );
  669. //
  670. // uninstal.c
  671. //
  672. DWORD
  673. UninstallThread(
  674. HWND hwnd
  675. );
  676. //
  677. // server.c
  678. //
  679. UINT
  680. InstallQueueCallback(
  681. IN PVOID QueueContext,
  682. IN UINT Notification,
  683. IN UINT Param1,
  684. IN UINT Param2
  685. );
  686. VOID
  687. SetProgress(
  688. HWND hwnd,
  689. DWORD StatusString
  690. );
  691. BOOL
  692. DoBrowseDestDir(
  693. HWND hDlg
  694. );
  695. LRESULT
  696. DeviceSelectionDlgProc(
  697. HWND hwnd,
  698. UINT msg,
  699. WPARAM wParam,
  700. LPARAM lParam
  701. );
  702. BOOL
  703. AddPrinterDrivers(
  704. VOID
  705. );
  706. //
  707. // dlgclast.c
  708. //
  709. LRESULT
  710. LastClientPageDlgProc(
  711. HWND hwnd,
  712. UINT msg,
  713. WPARAM wParam,
  714. LPARAM lParam
  715. );
  716. BOOL
  717. SetUnInstallInfo(
  718. VOID
  719. );
  720. LRESULT
  721. ExchangeDlgProc(
  722. HWND hwnd,
  723. UINT msg,
  724. WPARAM wParam,
  725. LPARAM lParam
  726. );
  727. //
  728. // mapi.c
  729. //
  730. BOOL
  731. DeleteFaxMsgServices(
  732. VOID
  733. );
  734. BOOL
  735. DeleteMessageService(
  736. LPSTR ProfileName
  737. );
  738. BOOL
  739. GetDefaultMapiProfile(
  740. LPWSTR ProfileName
  741. );
  742. BOOL
  743. InitializeMapi(
  744. VOID
  745. );
  746. BOOL
  747. GetExchangeInstallCommand(
  748. LPWSTR InstallCommand
  749. );
  750. BOOL
  751. CreateDefaultMapiProfile(
  752. LPWSTR ProfileName
  753. );
  754. BOOL
  755. IsMapiServiceInstalled(
  756. LPWSTR ProfileNameW,
  757. LPWSTR ServiceNameW
  758. );
  759. BOOL
  760. InstallFaxAddressBook(
  761. HWND hwnd,
  762. LPWSTR ProfileName
  763. );
  764. VOID
  765. AddFaxAbToMapiSvcInf(
  766. VOID
  767. );
  768. VOID
  769. AddFaxXpToMapiSvcInf(
  770. VOID
  771. );
  772. BOOL
  773. InstallFaxTransport(
  774. LPWSTR ProfileNameW
  775. );
  776. VOID
  777. DoExchangeInstall(
  778. HWND hwnd
  779. );
  780. BOOL
  781. DeleteUnInstallInfo(
  782. VOID
  783. );
  784. BOOL
  785. InstallExchangeClientExtension(
  786. LPSTR ExtensionName,
  787. LPSTR FileName,
  788. LPSTR ContextMask
  789. );
  790. DWORD
  791. IsExchangeRunning(
  792. VOID
  793. );
  794. BOOL
  795. InstallHelpFiles(
  796. VOID
  797. );
  798. BOOL
  799. GetUserInformation(
  800. LPTSTR *UserName,
  801. LPTSTR *FaxNumber,
  802. LPTSTR *AreaCode
  803. );
  804. BOOL
  805. CreateFileAssociation(
  806. LPWSTR FileExtension,
  807. LPWSTR FileAssociationName,
  808. LPWSTR FileAssociationDescription,
  809. LPWSTR OpenCommand,
  810. LPWSTR PrintCommand,
  811. LPWSTR PrintToCommand,
  812. LPWSTR FileName,
  813. DWORD IconIndex
  814. );
  815. BOOL
  816. CreateNetworkShare(
  817. LPTSTR Path,
  818. LPTSTR ShareName,
  819. LPTSTR Comment
  820. );
  821. BOOL
  822. DeleteNetworkShare(
  823. LPTSTR ShareName
  824. );
  825. LPTSTR
  826. GetString(
  827. DWORD ResourceId
  828. );
  829. int
  830. PopUpMsg(
  831. HWND hwnd,
  832. DWORD ResourceId,
  833. BOOL Error,
  834. DWORD Type
  835. );
  836. int
  837. PopUpMsgFmt(
  838. HWND hwnd,
  839. DWORD ResourceId,
  840. BOOL Error,
  841. DWORD Type,
  842. ...
  843. );
  844. VOID
  845. SetWizPageTitle(
  846. HWND hWnd
  847. );
  848. LPHPROPSHEETPAGE
  849. CreateWizardPages(
  850. HINSTANCE hInstance,
  851. PWIZPAGE SetupWizardPages,
  852. LPDWORD RequestedPages,
  853. LPDWORD PageCount
  854. );
  855. VOID
  856. InitializeStringTable(
  857. VOID
  858. );
  859. VOID
  860. SetTitlesInStringTable(
  861. VOID
  862. );
  863. LPTSTR
  864. GetProductName(
  865. VOID
  866. );
  867. BOOL
  868. IsWordpadInstalled(
  869. VOID
  870. );
  871. BOOL
  872. InstallWordpad(
  873. VOID
  874. );
  875. BOOL
  876. ChangeTxtFileAssociation(
  877. VOID
  878. );
  879. BOOL
  880. DeleteDirectoryTree(
  881. LPWSTR Root
  882. );
  883. BOOL
  884. MyDeleteFile(
  885. LPWSTR FileName
  886. );
  887. BOOL
  888. UnAttendInitialize(
  889. IN LPWSTR AnswerFile
  890. );
  891. BOOL
  892. UnAttendGetAnswer(
  893. DWORD ControlId,
  894. LPBYTE AnswerBuf,
  895. DWORD AnswerBufSize
  896. );
  897. int
  898. CALLBACK
  899. WizardCallback(
  900. IN HWND hdlg,
  901. IN UINT code,
  902. IN LPARAM lParam
  903. );
  904. BOOL
  905. ResetFileAssociation(
  906. LPWSTR FileExtension,
  907. LPWSTR FileAssociationName
  908. );
  909. BOOL
  910. PlatformOverride(
  911. LPTSTR ThisPlatformName,
  912. LPTSTR Override,
  913. LPTSTR SourceRoot,
  914. LPTSTR Result
  915. );