|
Re: Wrapping __declspec(dllimport) and __stdcall: msg#00180programming.swig
Gary Nissen wrote: I have an external Windows DLL that I have to wrap that has declarations asNumber 2) will work. SWIG doesn't need to know about calling conventions, whether or not the function is in a DLL and other stuff like that. Most people do something like this: // importexport.h #define DLLIMPORT __declspec(dllimport) // sample.h file #include "importexport.h" DLLIMPORT void __stdcall foo(char *); This allows you to change DLLIMPORT for import or export the function. Also it is very handy for SWIG (which doesn't support this non-ISO feature) as you can #define it away: %{ #include "sample.h" %} #define DLLIMPORT #define __stdcall %include "sample.h" William _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Smartpointer and references: 00180, Josh Cherry |
|---|---|
| Next by Date: | SWIG+Perl+C free() error and zero pointer on very simple script Bug # 1035817: 00180, Bryga 66 |
| Previous by Thread: | Wrapping __declspec(dllimport) and __stdcalli: 00180, Gary Nissen |
| Next by Thread: | SWIG runtime libs/Python distutils combo on Mac: 00180, Bill Spotz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |