Re: [INTERNALS-WIN] RE: [PHP-DEV] Differences in VC6 and VC9 Windows builds and MSSQL Driver.

[email protected] ("William A. Rowe, Jr.")
Newsgroups php.internals.win
Message-ID <[email protected]>
Pierre Joye wrote:
> hi!
> 
> On Mon, Jan 5, 2009 at 8:46 PM, Uwe Schindler <[email protected]> wrote:
> 
>> And in windows (which is different to UNIX), it is possible to have more
>> than one CRT in one single process (because linking in windows is *not* only
>> dependent on the symbol name, it uses symbol name *AND* dll name for
>> linking).
> 
> With the risk to repeat myself: mixing CRT is a bad idea. Whether it
> works with SWS or not is not really relevant as all the stack has to
> work (all libs, all deps, etc.). I still think that moving away from
> VC6 is the way to go and I'm happy to see than Sun is considering VC9
> :)

In this case, Une is 100% correct.  If you are not free()ing what had
been malloc()ed for you by the other msvcrt consumer, if you are not
registering clib callbacks with atexit() and family, if you are not
using FILE* or fd's created in one msvcrt within the other, you
*should* be 100% safe.

An example of this is the mod_aspdotnet library which used a much more
modern blend of msvcrXX and ole/coruntime within an older httpd/msvcrt.
Never a flaw due to the discrepancy, because httpd objects are managed
and reclaimed by httpd, while mod_aspdotnet only used httpd's abstractions
in an opaque manner and handled the destruction of it's own resources.

Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.