I would like to know if this is safe. Has anyone does this before? If it
is not safe, is there an alternative to sscanf that can work with Win DLLs?
I am calling the DLL from Visual Basic (if that is important).
BTW: One reason why I am not rewriting the routine or finding another
alternative is because the routine is already written and tested.
Rajan
--
Rajan Ranga
ra...@cco.caltech.edu
I am developing a DLL using MSVC++. The DLL (Windows) is written in C.
For par of my routines, I need to use sscanf to read in a line and extract
some data. The problem is that according to the documentation, sscanf is
not supported in Windoes DLLs. I am assuming that the reason is because
you can not use stdin and stdout in a DLL. I decided to try it out anyway.
What I did is include the C libraries in the DLL and compiled it without a
problem. When I use the DLL, there is not problem either.
I would like to know if this is safe. Has anyone does this before? If it
is not safe, is there an alternative to sscanf that can work with Win DLLs?
I am calling the DLL from Visual Basic (if that is important).
Hmm, I usually avoid functions that aren't DLL compatible. The first thing
I would do is *really* stress out your code. If you can't make it fail,
what the hell. An alternative is to look at the BSD library source. I
think the license agreement would let you copy the sscanf source, but
I could be wrong.
--
Eddie McCreary e...@twisto.compaq.com
Graphics Development "Do or do not, there is no 'try'."
In the event of my capture, Compaq will disavow any and all knowledge
of my operations. Of course I don't speak for them.