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.

87 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. async.c
  5. Abstract:
  6. Functions for asynch send wizard actions
  7. Environment:
  8. Windows NT fax driver user interface
  9. Revision History:
  10. 02/05/96 -davidx-
  11. Created it.
  12. mm/dd/yy -author-
  13. description
  14. --*/
  15. #include "faxui.h"
  16. #include "tapiutil.h"
  17. DWORD
  18. AsyncWizardThread(
  19. PBYTE param
  20. )
  21. /*++
  22. Routine Description:
  23. Do some agonizingly slow tasks asynchronously so the wizard seems faster to the user.
  24. Arguments:
  25. none.
  26. Return Value:
  27. not used.
  28. --*/
  29. {
  30. PUSERMEM pUserMem = (PUSERMEM) param;
  31. #ifdef FAX_SCAN_ENABLED
  32. WCHAR TempPath[MAX_PATH];
  33. #endif
  34. //
  35. // initialize tapi so that we can get tapi country codes, etc.
  36. //
  37. InitTapiService();
  38. SetEvent(pUserMem->hTapiEvent);
  39. //
  40. // use server coverpages (may startup fax service, which is slow)
  41. //
  42. pUserMem->ServerCPOnly = UseServerCp(pUserMem->hPrinter);
  43. SetEvent(pUserMem->hFaxSvcEvent);
  44. #ifdef FAX_SCAN_ENABLED
  45. //
  46. // look for twain stuff
  47. //
  48. if (GetEnvironmentVariable( L"NTFaxSendNote",
  49. TempPath,
  50. sizeof(TempPath)) == 0 || TempPath[0] != L'1') {
  51. pUserMem->TwainAvail = FALSE;
  52. } else {
  53. pUserMem->TwainAvail = InitializeTwain(pUserMem);
  54. }
  55. SetEvent(pUserMem->hTwainEvent);
  56. #endif
  57. return 0;
  58. }