Leaked source code of windows server 2003
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.

85 lines
2.1 KiB

  1. /* File: D:\WACKER\tdll\cnctstub.c (Created: 18-Jan-1994)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 2 $
  7. * $Date: 5/09/01 4:42p $
  8. */
  9. #include <windows.h>
  10. #pragma hdrstop
  11. #include <time.h>
  12. #include "stdtyp.h"
  13. #include "session.h"
  14. #include "cnct.h"
  15. #include "cnct.hh"
  16. #include "htchar.h"
  17. static int WINAPI cnctstub(const HDRIVER hDriver);
  18. static int WINAPI cnctstubQueryStatus(const HDRIVER hDriver);
  19. static int WINAPI cnctstubConnect(const HDRIVER hDriver, const unsigned int uCnctFlags);
  20. static int WINAPI cnctstubGetComSettingsString(const HDRIVER hDriver, LPTSTR pachStr, const size_t cb);
  21. static int WINAPI cnctstubComEvent(const HDRIVER hDriver, const enum COM_EVENTS event);
  22. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23. * FUNCTION:
  24. * cnctStubAll
  25. *
  26. * DESCRIPTION:
  27. * Stubs all function pointers in a connection handle to a stub
  28. * procedure so that the connection handle can function without
  29. * a driver.
  30. *
  31. * ARGUMENTS:
  32. * hhCnct - private connection handle
  33. *
  34. * RETURNS:
  35. * void
  36. *
  37. */
  38. void cnctStubAll(const HHCNCT hhCnct)
  39. {
  40. hhCnct->pfDestroy = cnctstub;
  41. hhCnct->pfQueryStatus = cnctstubQueryStatus;
  42. hhCnct->pfConnect = cnctstubConnect;
  43. hhCnct->pfDisconnect = cnctstubConnect;
  44. hhCnct->pfComEvent = cnctstubComEvent;
  45. hhCnct->pfInit = cnctstub;
  46. hhCnct->pfLoad = cnctstub;
  47. hhCnct->pfSave = cnctstub;
  48. hhCnct->pfGetComSettingsString = cnctstubGetComSettingsString;
  49. return;
  50. }
  51. /* --- Stub Functions --- */
  52. static int WINAPI cnctstub(const HDRIVER hDriver)
  53. {
  54. return CNCT_NOT_SUPPORTED;
  55. }
  56. static int WINAPI cnctstubQueryStatus(const HDRIVER hDriver)
  57. {
  58. return CNCT_NOT_SUPPORTED;
  59. }
  60. static int WINAPI cnctstubConnect(const HDRIVER hDriver,
  61. const unsigned int uCnctFlags)
  62. {
  63. return CNCT_NOT_SUPPORTED;
  64. }
  65. static int WINAPI cnctstubGetComSettingsString(const HDRIVER hDriver,
  66. LPTSTR pachStr, const size_t cb)
  67. {
  68. return CNCT_NOT_SUPPORTED;
  69. }
  70. static int WINAPI cnctstubComEvent(const HDRIVER hDriver,
  71. const enum COM_EVENTS event)
  72. {
  73. return CNCT_NOT_SUPPORTED;
  74. }