annotate ext/libpng-1.2.29/projects/cbuilder5/libpng.cpp @ 130:b49714fff478

* Workaround for Segfault_in_cxa_allocate_exception: http://wiki.fifengine.de/Segfault_in_cxa_allocate_exception * Full credit goes to Yonibear from OpenAnno who tracked down the issue
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 18 Aug 2008 23:11:32 +0000
parents fa33cda75471
children
rev   line source
89
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 //---------------------------------------------------------------------------
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 #include <windows.h>
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 //---------------------------------------------------------------------------
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
4 // Important note about DLL memory management when your DLL uses the
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
5 // static version of the RunTime Library:
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
6 //
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
7 // If your DLL exports any functions that pass String objects (or structs/
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
8 // classes containing nested Strings) as parameter or function results,
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
9 // you will need to add the library MEMMGR.LIB to both the DLL project and
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10 // any other projects that use the DLL. You will also need to use MEMMGR.LIB
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
11 // if any other projects which use the DLL will be performing new or delete
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 // operations on any non-TObject-derived classes which are exported from the
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
13 // DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
14 // EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 // the file BORLNDMM.DLL should be deployed along with your DLL.
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
16 //
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
17 // To avoid using BORLNDMM.DLL, pass string information using "char *" or
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 // ShortString parameters.
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
19 //
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 // If your DLL uses the dynamic version of the RTL, you do not need to
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21 // explicitly add MEMMGR.LIB as this will be done implicitly for you
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 //---------------------------------------------------------------------------
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24 int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 {
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26 return 1;
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 }
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
28 //---------------------------------------------------------------------------
fa33cda75471 * Reverting back to 2543 as requested by sleek
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29