SysReAllocStringLen exception when using ApplicationVerifier

SysReAllocStringLen exception when using ApplicationVerifier

Post by Qm9nZGFuIF » Sun, 14 Mar 2010 07:55:01


The following code generates an exception when using Application Verifier:

BSTR strTest = SysAllocString(L" NewMsgFilter1");
SysReAllocStringLen(&strTest, strTest + 1, 2);

Am I misunderstanding the usage of SysReAllocStringLen or there is a problem
within Application Verifier?

Thank you,
Bogdan Vasilescu

1. ::SysReAllocStringLen() bugs on all OS-es

2. exception handling using SQLClient - is this the only exception that is caught???

Hi all,

I want to catch a duplicate key exception. I do not want to provide that
verbose message from the MSSQL server - I would put a user friendly message
out, like

"The item you have added already exists in the database. Please change
the description and try to save again."

instead of
System.Data.SqlClient.SqlException: Cannot insert duplicate key row in
object 'Tree' with unique index 'KeySiteParentTreeNodename'.
The statement has been terminated.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ClaPub.DataAccess.ExecuteCommand(String SQL, DataElements&
DataElements, BinaryDataElements& BinaryDataElements) in C:ClaPubClassesData
Access ClassesDataAccess.vb:line 129

How do I do this? because the only error captured by .net is the general
System.Data.SqlClient.SqlException. I have tried using
System.Data.DuplicateNameException but that is not caught.

m_ReturnValue = SqlCmdObj.ExecuteNonQuery()
Catch e As System.Data.SqlClient.SqlException 'THIS IS CAUGHT
Catch e As System.Data.DuplicateNameException 'THIS IS NEVER
Catch e As System.Data.NoNullAllowedException 'THIS IS NEVER
End Try

3. Getting exception while using Exception Management block

4. exception/Exception clash using mixed dll in VB.NET

5. Alternatives to using Exceptions and throwing Exceptions.

6. Mechwarrior - when's the next one?

7. So when's the new Atari 800 Win 4.0 release?

8. next month Handspring Treo 600 - when's it coming out?

9. So..when's the next version of IE due?

10. When's the next release of SQL?

11. Sample program: Try / Catch exceptions user defined exceptions derived from System.Exception

12. Publish exception to Email in Exception Handling Exception Block

13. When's Gnuplot 4.1 Coming?

14. When's the next Solaris version coming?

15. When's The Printer Done?