1. RE: Wrapping C -- errno's?
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Oct 14, 2002
- 335 views
> From: Andy Serpa [mailto:renegade at earthling.net] > Are basic error numbers (like EINVAL or EEXISTS) returned from C > functions the same from compiler to compiler? Is there a standard or > are they all different? Many are standard errors, and many are library/application specific. Find the header file that defines them. The first place you might look is in winerror.h. I usually do a search in Explorer for text in files using "#define ERRORNAME". Matt Lewis PS Didn't check my email this weekend, but looks like you solved your callback problem, right?
2. RE: Wrapping C -- errno's?
- Posted by Andy Serpa <ac at onehorseshy.com> Oct 14, 2002
- 345 views
Matthew Lewis wrote: > > > From: Andy Serpa [mailto:renegade at earthling.net] > > > Are basic error numbers (like EINVAL or EEXISTS) returned from C > > functions the same from compiler to compiler? Is there a standard or > > are they all different? > > Many are standard errors, and many are library/application specific. > Find > the header file that defines them. The first place you might look is in > winerror.h. I usually do a search in Explorer for text in files using > "#define ERRORNAME". > > Matt Lewis > > PS Didn't check my email this weekend, but looks like you solved your > callback problem, right? > Yeah, I got the errno.h file from the compiler that made the .dll I'm working with. As far as callbacks, I solved it using the method described a few messages ago (Re:Callback problem), but you might want to take a look at your func_asm in fptr.e -- seems to call the function ok but not always exit properly, but I'm not qualified to comment. (If I call those same functions that were crashing myself via call_cdecl_func they don't crash, by the way, just when they are called from the .dll.) I am still using your library for the rest of the calls as they are all object methods (& cdecl) and there is no other way to call them than by reference, so big thanks to you for that...
3. RE: Wrapping C -- errno's?
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Oct 14, 2002
- 337 views
> -----Original Message----- > From: Andy Serpa [mailto:ac at onehorseshy.com] > > Matthew Lewis wrote: > As far as callbacks, I solved it using the method described a few > messages ago (Re:Callback problem), but you might want to > take a look at > your func_asm in fptr.e -- seems to call the function ok but > not always > exit properly, but I'm not qualified to comment. (If I call > those same > functions that were crashing myself via call_cdecl_func they don't > crash, by the way, just when they are called from the .dll.) Do you know what compiler compiled the dll? As I recall, I only really tested using MSVC6. I wonder if the compiler is using some sort of fastcall convention (passing arguments via register). > I am still using your library for the rest of the calls as > they are all > object methods (& cdecl) and there is no other way to call > them than by > reference, so big thanks to you for that... Glad someone else has a use for it. :) Matt Lewis
4. RE: Wrapping C -- errno's?
- Posted by Andy Serpa <ac at onehorseshy.com> Oct 14, 2002
- 343 views
Matthew Lewis wrote: > > > -----Original Message----- > > From: Andy Serpa [mailto:ac at onehorseshy.com] > > > > > Matthew Lewis wrote: > > > As far as callbacks, I solved it using the method described a few > > messages ago (Re:Callback problem), but you might want to > > take a look at > > your func_asm in fptr.e -- seems to call the function ok but > > not always > > exit properly, but I'm not qualified to comment. (If I call > > those same > > functions that were crashing myself via call_cdecl_func they don't > > crash, by the way, just when they are called from the .dll.) > > Do you know what compiler compiled the dll? As I recall, I only really > tested using MSVC6. I wonder if the compiler is using some sort of > fastcall > convention (passing arguments via register). > Visual C++ 6.0 (big thanks to Evan Marshall for compiling it!) I can send you the .dll and show you the calls that aren't working if you like. Or just wait a few days until I release the wrapper and you can just change the callbacks to your method and play around with it... > > I am still using your library for the rest of the calls as > > they are all > > object methods (& cdecl) and there is no other way to call > > them than by > > reference, so big thanks to you for that... > > Glad someone else has a use for it. :) > It makes the otherwise impossible possible, so it is a great help for using all those existing C libraries out there...
5. RE: Wrapping C -- errno's?
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Oct 14, 2002
- 331 views
> -----Original Message----- > From: Andy Serpa [mailto:ac at onehorseshy.com] > Visual C++ 6.0 (big thanks to Evan Marshall for compiling it!) > > I can send you the .dll and show you the calls that aren't working if > you like. Or just wait a few days until I release the > wrapper and you > can just change the callbacks to your method and play around > with it... Thanks, I'll just wait for the release. I'm going out of town in a few days, so I'm pretty busy right now. Matt Lewis