Hoffimh / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

__cdecl on windows #346

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile with VS 2008
2. Run example.py
3. Exception: ValueError: Procedure called with not enough arguments (12 bytes 
missing) or wrong calling convention

In makefile I see this line:
    CL= cl /MD /TC /nologo $(DBG) /Gz /W3 /DNO_SSL_DL
It has a /Gz flag that specifies __stdcall calling convention, and in 
mongoose.py the dll is imported with ctypes.CDLL so, I just removed the flag 
and default __cdecl worked as expected. 

Please, add _mongoose.dll in downloads list and remove /Gz flag. Thank you!

Original issue reported on code.google.com by sen...@gmail.com on 19 Apr 2012 at 12:12

GoogleCodeExporter commented 8 years ago
There was an issue http://code.google.com/p/mongoose/issues/detail?id=81
Apparently, stdcall library is a better choice than cdecl one.
Maybe python code should use windll instead?

Original comment by valenok on 6 Jun 2012 at 5:58

GoogleCodeExporter commented 8 years ago
Submitted 
http://code.google.com/p/mongoose/source/detail?r=499d15673a0571d47abf6ccde5c846
4c98e804d9
Please verify, and reopen if the fix doesn't work.

Original comment by valenok on 7 Jun 2012 at 9:07