Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Some fixes in InVector.hpp and Vcont.cpp
Re: Some fixes in InVector.hpp and Vcont.cpp [message #43725 is a reply to message #43717] Sat, 27 September 2014 06:35 Go to previous messageGo to previous message
kasome is currently offline  kasome
Messages: 78
Registered: July 2008
Location: Taiwan
Member
Hi Mirek,

Thanks for the reply, I already upload the entire UppDLL project in the following download link, which can be compiled by using VS2012

http://www.mediafire.com/download/05ejdu5dm0uoddc/TestUppDLL .rar

Just use VS2012 to open the following two solutioin file and run on Windows 7

TestUppDLL\WithModification\UppLib_WithModification.sln ------> no crash

TestUppDLL\WithoutModification\UppLib_WithoutModification.sl n ------> crash

The only difference between "UppLib_WithModification" and "UppLib_WithoutModification" is the modification of InVector.hpp and Vcont.cpp as mentioned.

Notice:
Do not use or test the compiled U++ dll on the Windows XP or before Windows Vista, the reason is the follwoing:

Rules and Limitations for TLS
PRB:Calling LoadLibrary() to Load a DLL That Has Static TLS
Quote:
On Windows operating systems before Windows Vista, __declspec( thread ) has some limitations. If a DLL declares any data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded. After the DLL is loaded with LoadLibrary, it causes system failure whenever the code references the __declspec( thread ) data. Because the global variable space for a thread is allocated at run time, the size of this space is based on a calculation of the requirements of the application plus the requirements of all the DLLs that are statically linked. When you use LoadLibrary, you cannot extend this space to allow for the thread local variables declared with __declspec( thread ). Use the TLS APIs, such as TlsAlloc, in your DLL to allocate TLS if the DLL might be loaded with LoadLibrary.

[Updated on: Sat, 27 September 2014 06:39]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved] Bug in CParser
Next Topic: The method to directly work with GUI?
Goto Forum:
  


Current Time: Mon Aug 25 19:00:28 CEST 2025

Total time taken to generate the page: 0.05459 seconds