Environment - Windows10(x64), PostgreSQL 9.5(x64)
I installed GDAL, PROJ.4 and GEOS (via OSGeo4W )
Then I installed postGIS via Stack App Builder (I have tried both versions - x32 and x64). In both cases I have the same error - Error: couldn't load library C:/Program Files/PostgreSQL/9.5/lib/postgis-2.2.dll: %1 is not a valid Win32 application
I went to ../lib/ and postgis-2.2.dll is present there.
But when I am entering in psql shell - CREATE EXTENSION postgis; - I get this error.