Click here to Skip to main content
15,798,508 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
We are using Delphi DLL in our c# application like:
public static extern Int32 PSpeak(string Text);

And we are calling this method through delegate Asyncronous then the following error occured:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Updated 3-Nov-11 3:35am
André Kraak 3-Nov-11 8:35am    
Edited question:
Added pre tags

Rebuild DLL and try again. It may work.
Share this answer
Member 3827009 3-Nov-11 8:52am    
I already did but no success.
Actually in Delphi Pascal coding below give the error:
TTSCentral.TextData(CHARSET_TEXT, 1, SData, Pointer(TTSBufNotifySink), IID_ITTSBufNotifySink);
For the benefit of others, this question was also asked in the C# Corner web site and in the MSDN forums.
Share this answer
Member 3827009 4-Nov-11 1:06am    
I have already posted the same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900