b***@de.thalesgroup.com
2007-02-28 13:45:30 UTC
Hello,
I found a bug in Visual Basic used with Visual Studio Macros
(Microsoft Visual C++ 2005+ SP1).
Description:
If I apply the simple Visual Basic statement
ActiveDocument.Selection.Text = "//" +
ActiveDocument.Selection.Text
contained in a macro, to the C++ source line
m_nodes.SetSize(10, 5);
the following error message is always produced:
"Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler
zurückgegeben"
If found that the reason for the failure is the comma character (,).
If I replace the character with, for example, a semicolon every thing
works fine.
With a ',' the result looks like this
"// m_nodes.SetSize(10,"
and an error message box is displayed.
However a statement like
Sel.Text = "xxxx" + Sel.Text
works fine.
With Visual Studio 2003 and Visual Studio 2005 without SP1 it works
fine.
But with installed service pack it fails.
If the following macro is applied to the line
m_nodes.SetSize(10, 5);
it produces the error message..
Public Sub StringBug()
Dim Sel As TextSelection = ActiveDocument.Selection
Sel.SelectLine()
Sel.Text = "//" + Sel.Text
End Sub
My configuration:
Microsoft Visual C++ 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Microsoft Visual Studio 2005 Professional Edition - DEU Service
Pack 1 (KB926606)
I hope someone can give me a hint how to circumvent this bug.
Bernhard
I found a bug in Visual Basic used with Visual Studio Macros
(Microsoft Visual C++ 2005+ SP1).
Description:
If I apply the simple Visual Basic statement
ActiveDocument.Selection.Text = "//" +
ActiveDocument.Selection.Text
contained in a macro, to the C++ source line
m_nodes.SetSize(10, 5);
the following error message is always produced:
"Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler
zurückgegeben"
If found that the reason for the failure is the comma character (,).
If I replace the character with, for example, a semicolon every thing
works fine.
With a ',' the result looks like this
"// m_nodes.SetSize(10,"
and an error message box is displayed.
However a statement like
Sel.Text = "xxxx" + Sel.Text
works fine.
With Visual Studio 2003 and Visual Studio 2005 without SP1 it works
fine.
But with installed service pack it fails.
If the following macro is applied to the line
m_nodes.SetSize(10, 5);
it produces the error message..
Public Sub StringBug()
Dim Sel As TextSelection = ActiveDocument.Selection
Sel.SelectLine()
Sel.Text = "//" + Sel.Text
End Sub
My configuration:
Microsoft Visual C++ 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Microsoft Visual Studio 2005 Professional Edition - DEU Service
Pack 1 (KB926606)
I hope someone can give me a hint how to circumvent this bug.
Bernhard