From the C API Reference guide:
****** Before you write C API programs, you must verify system requirements and install the API package, which includes the following components: Microsoft Visual Studio .NET 2003 or later, or built with Microsoft Visual C++ version 7.0 (for Windows) Code generation: Multithreaded DLL Structure member alignment: 8 bytes (default) Set code generation to Multithreaded DLL, not Debug Multithreaded DLL. Where other included libraries cause conflicts, add /nodefaultlib:"MSVCRTD" to the project options to avoid using the Debug C runtime library. If your program references this library at runtime, memory management errors will occur when memory pointers are referenced by both the Debug and Release C runtime libraries. ******* They state .NET 2003 "or later", but that is not what I experienced. If possible try the same in VS.NET 2003, and test with a release build. The 7.01 API is linked against MSVCR71.DLL, while 2005 is using MSVCR80.DLL. Hugo On 5/29/07, Beketov Danila <[EMAIL PROTECTED]> wrote:
** I use MS Visual Studio .NET 2005 (8.0), lib–files I get from Remedy 7.01and I have problem with FreeAR…() ------------------------------ *From:* Action Request System discussion list(ARSList) [mailto: [EMAIL PROTECTED] *On Behalf Of *Hugo Visser *Sent:* Tuesday, May 29, 2007 12:19 PM *To:* [email protected] *Subject:* Re: Problem with function FreeARQualifierStruct ** Most likely you are compiling against a different msvcrt version then the Remedy API is compiled against. I've run in to this when writing plugins, aparently it's also an issue with "normal" API's. What happens is that somewhere along the line the Remedy API allocates some memory. But since the API is compiled against a different msvcrt, the memory is allocated from a different heap. When you try to free the pointer to the allocated memory in your program, the memory region cannot be free'd because it wasn't allocated on your own heap. When coding plugins, the server will pass in a struct and you should allocate memory that the server attempts to free. At this point the same problems will occur. If you provide your own FreeAR* equivalents you should be fine, since you are managing your own heap again. Unfortunately the versions of msvcrt are tied to the versions of Visual Studio. VS 6 will use msvcrt.dll, VS.NET will use msvcrt7.dll (or something like that) etc. The C API guide has a comment about the versions of Visual Studio you should use for a particular version of the API, to prevent heap allocation problems. I'm not sure if this is also a problem on unix platforms, but I don't think so as the libc is a system component on unix, so every api that links to libc uses the same heap, if linked dynamically. Hugo __20060125_______________________This posting was submitted with HTML in it___
_______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"

