0

from the microsoft documentation WinHttp is supported in services but WinInet isn't but I tried both and both crashed the service when calling WinHttpOpen/InternetOpenA

this is the call stack from windbg :

WINHTTP!WinHttpOpen+0x303
WINHTTP!GlobalDataInitialize+0x9f
WINHTTP!WinHttpInitializeEtw+0x26
KERNELBASE!InitOnceExecuteOnce+0xa
ntdll!RtlRunOnceExecuteOnce+0x65
WINHTTP!WinHttpEtwInitOnceCallback+0x72
ntdll!EtwEventRegister+0x20
ntdll!EtwNotificationRegister+0x4c
ntdll!EtwpAllocateRegistration+0x7d
ntdll!RtlAllocateHeap+0xe2
ntdll!RtlpLowFragHeapAllocFromContext+0x7b956
ntdll!RtlpLogHeapFailure+0xa4
ntdll!RtlpHeapHandleError+0x12
ntdll!RtlReportCriticalFailure+0x4b

is there any initialization required before using WinHttp ?

trincot
  • 317,000
  • 35
  • 244
  • 286
dev65
  • 1,440
  • 10
  • 25
  • `WinHttpOpen()` is the initialization. And a call stack is useless without seeing the code that produced it. So please show your actual code. – Remy Lebeau Jun 29 '18 at 03:58
  • the problem was solved , the solution is here : https://stackoverflow.com/questions/51086754/libcurl-crashes-in-a-windows-service – dev65 Jun 30 '18 at 13:02

0 Answers0