and i always get the Error: ERROR_INVALID_DLL := 1154 (0x482)
which indicates that: One of the library files needed to run this application is damaged.
But that's most likely not the case:
DllExportViewer can read the dll just fine.
And i downloaded some other versions of httpapi.dll, the Error is always the same.
I have no clue what could be wrong.
Any insights would be welcome.
And could someone test this script, to see if it's just on my system or everywhere:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; load the httpapi.dll
hModule := DllCall("LoadLibrary", "Str", "httpapi.dll", "Ptr")
ListVars
MsgBox % hModule
; The HttpInitialize function initializes the HTTP Server API driver,
; starts it, if it has not already been started, and allocates data structures
; for the calling application to support response-queue creation and other operations.
; Call this function before calling any other functions in the HTTP Server API.
;dwRes := DllCall("HttpInitialize", "UInt", Version, "UInt", Flags, "UInt", &pReserved)
; Version [in]
; HTTP version. This parameter is an HTTPAPI_VERSION structure.
; For the current version, declare an instance of the structure and set it to
; the pre-defined value HTTPAPI_VERSION_1 before passing it to HttpInitialize.
; Flags [in]
; Initialization options, which can include one or both of the following values.
; HTTP_INITIALIZE_CONFIG : Perform initialization for applications that use the HTTP configuration functions, HttpSetServiceConfiguration, HttpQueryServiceConfiguration and HttpDeleteServiceConfiguration.
; HTTP_INITIALIZE_SERVER : Perform initialization for applications that use the HTTP Server API.
; pReserved [in, out]
; This parameter is reserved and must be NULL.
;"#define HTTPAPI_VERSION_1 {1, 0}"
HTTPAPI_VERSION_HttpApiMajorVersion := 1
HTTPAPI_VERSION_HttpApiMinorVersion := 0
; typedef struct _HTTPAPI_VERSION {
VarSetCapacity(HTTPAPI_VERSION, 4, 0)
NumPut(HTTPAPI_VERSION_HttpApiMajorVersion, HTTPAPI_VERSION, 0, "UShort")
NumPut(HTTPAPI_VERSION_HttpApiMinorVersion, HTTPAPI_VERSION, 2, "UShort")
; }
HTTP_INITIALIZE_SERVER := 0x00000001
HTTP_INITIALIZE_CONFIG := 0x00000002
pReserved := 0
dwRes := DllCall("httpapi.dll\HttpInitialize", "UInt", HTTPAPI_VERSION, "UInt", HTTP_INITIALIZE_SERVER, "UInt", &pReserved)
;Transform Error-Message to match SKAN's diction. see Error values below
VarSetCapacity(swapRes, 4, 0)
NumPut(dwRes, swapRes, 0, "Int")
gdwRes := NumGet(swapRes,,"UInt")
SetFormat, IntegerFast, hex
gdwRes += 0
gdwRes .= "" ; Necessary due to the "fast" mode.
SetFormat, IntegerFast, d
ListVars
MsgBox % gdwRes . " - " . ErrorLevel
; ERROR_INVALID_DLL := 1154 (0x482)
; One of the library files needed to run this application is damaged.