About the error access violation and too many consecutive exceptions workaround

Source: Internet
Author: User

About the error access violation and too many consecutive exceptions workaround

"If the DLL uses the Delphi string type, the DLL and the main program need to add Sharemem". DLL project plus sharemem This I know, but also in the main program to add? This I do not understand, why did not add the time before this problem? Add to add it, sure enough to add the latter point of the problem is not. Alas, I really do not understand. Finally, in the new DLL project, Delphi has a comment to give me the answer.

Library MyDll;

{Important Note about DLL memory Management:sharemem must is the
First unit in your library ' s USES clause and your project ' s (select
Project-view Source) USES clause If your DLL exports any procedures or
Functions that pass strings as parameters or function results. This
Applies to all strings passed to and from your dll--even those
is nested in records and classes. SHAREMEM is the interface unit to
The BORLNDMM. DLL shared Memory manager, which must be deployed along
With your DLL. To avoid using BORLNDMM. DLL, pass string information
Using PChar or shortstring parameters. }

Uses
Sharemem,
Sysutils,
Controls,
Forms;

{$R *.res}

Begin

End.

Http://blog.csdn.net/hhf383530895/archive/2009/11/24/4861309.aspx

About the error access violation and too many consecutive exceptions workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.