Click here to Skip to main content
15,901,283 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,
We are using Delphi DLL in our c# application like:
C#
[DllImport("SAPIDLL.DLL")]
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.
Posted
Updated 3-Nov-11 2:35am
v2
Comments
André Kraak 3-Nov-11 8:35am    
Edited question:
Added pre tags

For the benefit of others, this question was also asked in the C# Corner web site and in the MSDN forums.
 
Share this answer
 
Comments
Member 3827009 4-Nov-11 1:06am    
I have already posted the same.
Rebuild DLL and try again. It may work.
 
Share this answer
 
Comments
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);

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