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.

133 lines
4.8 KiB

  1. /* ==================================
  2. * COMPUTER GENERATED -- DO NOT EDIT
  3. * ==================================
  4. *
  5. * This file contains the definitions for all proxy functions this DLL supports.
  6. *
  7. * The proxies are very simple functions that should be optimizied into a
  8. * single JMP instruction without editing the stack at all.
  9. *
  10. * NOTE: While this works, this is a somewhat hackish approach that is based on how
  11. * the compiler optimizes the code. That said, the proxy will not work on Debug build currently
  12. * (that can be fixed by changing the appropriate compile flag that I am yet to locate).
  13. */
  14. #pragma warning( disable : 4244 )
  15. #include <windows.h>
  16. #define ADD_ORIGINAL(i, name) originalFunctions[i] = GetProcAddress(dll, #name)
  17. #define PROXY(i, name) \
  18. __declspec(dllexport) ULONG __stdcall name() \
  19. { \
  20. return originalFunctions[i](); \
  21. }
  22. FARPROC originalFunctions[50] = {0};
  23. void loadFunctions(HMODULE dll)
  24. {
  25. ADD_ORIGINAL(0, WinHttpAddRequestHeaders);
  26. ADD_ORIGINAL(1, WinHttpAutoProxySvcMain);
  27. ADD_ORIGINAL(2, WinHttpCheckPlatform);
  28. ADD_ORIGINAL(3, WinHttpCloseHandle);
  29. ADD_ORIGINAL(4, WinHttpConnect);
  30. ADD_ORIGINAL(5, WinHttpConnectionDeleteProxyInfo);
  31. ADD_ORIGINAL(6, WinHttpConnectionFreeNameList);
  32. ADD_ORIGINAL(7, WinHttpConnectionFreeProxyInfo);
  33. ADD_ORIGINAL(8, WinHttpConnectionFreeProxyList);
  34. ADD_ORIGINAL(9, WinHttpConnectionGetNameList);
  35. ADD_ORIGINAL(10, WinHttpConnectionGetProxyInfo);
  36. ADD_ORIGINAL(11, WinHttpConnectionGetProxyList);
  37. ADD_ORIGINAL(12, WinHttpConnectionSetProxyInfo);
  38. ADD_ORIGINAL(13, WinHttpCrackUrl);
  39. ADD_ORIGINAL(14, WinHttpCreateProxyResolver);
  40. ADD_ORIGINAL(15, WinHttpCreateUrl);
  41. ADD_ORIGINAL(16, WinHttpDetectAutoProxyConfigUrl);
  42. ADD_ORIGINAL(17, WinHttpFreeProxyResult);
  43. ADD_ORIGINAL(18, WinHttpGetDefaultProxyConfiguration);
  44. ADD_ORIGINAL(19, WinHttpGetIEProxyConfigForCurrentUser);
  45. ADD_ORIGINAL(20, WinHttpGetProxyForUrl);
  46. ADD_ORIGINAL(21, WinHttpGetProxyForUrlEx);
  47. ADD_ORIGINAL(22, WinHttpGetProxyResult);
  48. ADD_ORIGINAL(23, WinHttpGetTunnelSocket);
  49. ADD_ORIGINAL(24, WinHttpOpen);
  50. ADD_ORIGINAL(25, WinHttpOpenRequest);
  51. ADD_ORIGINAL(26, WinHttpProbeConnectivity);
  52. ADD_ORIGINAL(27, WinHttpQueryAuthSchemes);
  53. ADD_ORIGINAL(28, WinHttpQueryDataAvailable);
  54. ADD_ORIGINAL(29, WinHttpQueryHeaders);
  55. ADD_ORIGINAL(30, WinHttpQueryOption);
  56. ADD_ORIGINAL(31, WinHttpReadData);
  57. ADD_ORIGINAL(32, WinHttpReceiveResponse);
  58. ADD_ORIGINAL(33, WinHttpResetAutoProxy);
  59. ADD_ORIGINAL(34, WinHttpSaveProxyCredentials);
  60. ADD_ORIGINAL(35, WinHttpSendRequest);
  61. ADD_ORIGINAL(36, WinHttpSetCredentials);
  62. ADD_ORIGINAL(37, WinHttpSetDefaultProxyConfiguration);
  63. ADD_ORIGINAL(38, WinHttpSetOption);
  64. ADD_ORIGINAL(39, WinHttpSetStatusCallback);
  65. ADD_ORIGINAL(40, WinHttpSetTimeouts);
  66. ADD_ORIGINAL(41, WinHttpTimeFromSystemTime);
  67. ADD_ORIGINAL(42, WinHttpTimeToSystemTime);
  68. ADD_ORIGINAL(43, WinHttpWebSocketClose);
  69. ADD_ORIGINAL(44, WinHttpWebSocketCompleteUpgrade);
  70. ADD_ORIGINAL(45, WinHttpWebSocketQueryCloseStatus);
  71. ADD_ORIGINAL(46, WinHttpWebSocketReceive);
  72. ADD_ORIGINAL(47, WinHttpWebSocketSend);
  73. ADD_ORIGINAL(48, WinHttpWebSocketShutdown);
  74. ADD_ORIGINAL(49, WinHttpWriteData);
  75. }
  76. PROXY(0, WinHttpAddRequestHeaders);
  77. PROXY(1, WinHttpAutoProxySvcMain);
  78. PROXY(2, WinHttpCheckPlatform);
  79. PROXY(3, WinHttpCloseHandle);
  80. PROXY(4, WinHttpConnect);
  81. PROXY(5, WinHttpConnectionDeleteProxyInfo);
  82. PROXY(6, WinHttpConnectionFreeNameList);
  83. PROXY(7, WinHttpConnectionFreeProxyInfo);
  84. PROXY(8, WinHttpConnectionFreeProxyList);
  85. PROXY(9, WinHttpConnectionGetNameList);
  86. PROXY(10, WinHttpConnectionGetProxyInfo);
  87. PROXY(11, WinHttpConnectionGetProxyList);
  88. PROXY(12, WinHttpConnectionSetProxyInfo);
  89. PROXY(13, WinHttpCrackUrl);
  90. PROXY(14, WinHttpCreateProxyResolver);
  91. PROXY(15, WinHttpCreateUrl);
  92. PROXY(16, WinHttpDetectAutoProxyConfigUrl);
  93. PROXY(17, WinHttpFreeProxyResult);
  94. PROXY(18, WinHttpGetDefaultProxyConfiguration);
  95. PROXY(19, WinHttpGetIEProxyConfigForCurrentUser);
  96. PROXY(20, WinHttpGetProxyForUrl);
  97. PROXY(21, WinHttpGetProxyForUrlEx);
  98. PROXY(22, WinHttpGetProxyResult);
  99. PROXY(23, WinHttpGetTunnelSocket);
  100. PROXY(24, WinHttpOpen);
  101. PROXY(25, WinHttpOpenRequest);
  102. PROXY(26, WinHttpProbeConnectivity);
  103. PROXY(27, WinHttpQueryAuthSchemes);
  104. PROXY(28, WinHttpQueryDataAvailable);
  105. PROXY(29, WinHttpQueryHeaders);
  106. PROXY(30, WinHttpQueryOption);
  107. PROXY(31, WinHttpReadData);
  108. PROXY(32, WinHttpReceiveResponse);
  109. PROXY(33, WinHttpResetAutoProxy);
  110. PROXY(34, WinHttpSaveProxyCredentials);
  111. PROXY(35, WinHttpSendRequest);
  112. PROXY(36, WinHttpSetCredentials);
  113. PROXY(37, WinHttpSetDefaultProxyConfiguration);
  114. PROXY(38, WinHttpSetOption);
  115. PROXY(39, WinHttpSetStatusCallback);
  116. PROXY(40, WinHttpSetTimeouts);
  117. PROXY(41, WinHttpTimeFromSystemTime);
  118. PROXY(42, WinHttpTimeToSystemTime);
  119. PROXY(43, WinHttpWebSocketClose);
  120. PROXY(44, WinHttpWebSocketCompleteUpgrade);
  121. PROXY(45, WinHttpWebSocketQueryCloseStatus);
  122. PROXY(46, WinHttpWebSocketReceive);
  123. PROXY(47, WinHttpWebSocketSend);
  124. PROXY(48, WinHttpWebSocketShutdown);
  125. PROXY(49, WinHttpWriteData);