Re: An old C function problem revisited
- Posted by Jason Gade <jaygade at yahoo.com> Feb 24, 2006
- 503 views
Jonas Temple wrote: > > Jason Gade wrote: > > > > To use cdecl, make your define_c_func like this: > > }}} <eucode>xcwbUN_DisplayCommandPrompter = define_c_func(cwbunapi, > > "+_cwbUN_DisplayCommandPrompter@20", > > {C_UINT, C_UINT, C_POINTER, C_POINTER, C_POINTER},C_UINT)</eucode> {{{ > > > > Note the "+" leading on the function name. But I still think you shouldn't > > need > > it. > > There's no function that starts with a "+" exported from the dll. > > > > > Look for the #define CWBAPI and find out what that means. > > > > From looking through the C include files I believe it's defined as: > > __declspec( dllimport ) > or > __declspec( dllexport ) > > Jonas Temple > <a href="http://www.yhti.net/~jktemple">http://www.yhti.net/~jktemple</a> I think I'm all out of suggestions! I'm not sure about the __declspec bit, I've seen it but I don't really understand it. It might be telling the linker that this is a dll routine rather than one that is statically linked. I still think that it has something to do with the return value and stack cleanup. I found your old thread here: http://www.listfilter.com/cgi-bin/esearch.exu?thread=1&fromMonth=5&fromYear=8&toMonth=7&toYear=8&keywords=%22[OT]+-+Help+with+routine+name+in+.dll%22 -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel "Premature optimization is the root of all evil in programming." --C.A.R. Hoare j.