S
Sreekanth Murthy
Hi there,
There was an error in Find::Execute() API call which is present in one of
our function. The code for the above Find::Execute() API call is as below:
if(m_pWordApp == NULL)
return PILogError("MS Word is not running.", E_FAIL);
// Get the selection object.
MSWORD::SelectionPtr pSelection = m_pWordApp->Selection;
if(pSelection == NULL)
return PILogError("Unable to get the selection object from MS
Word.", E_FAIL);
// Get the find object.
MSWORD::FindPtr pFind = pSelection->Find;
if(pFind == NULL)
return PILogError("Unable to get the find object from the
selection object.", E_FAIL);
// Replace the text.
CComVariant varFind(keyFilter);
CComVariant varWrap(MSWORD::wdFindContinue);
CComVariant varReplaceType(MSWORD::wdReplaceNone);
// Loop through and find all the keys.
while(pFind->Execute( &varFind, //FindText
&vtFalse,
//MatchCase
&vtFalse,
//MatchWholeWord
&vtTrue,
//MatchWildcards
&vtFalse,
//MatchSoundsLike
&vtFalse,
//MatchAllWordForms
&vtTrue,
//Forward
&varWrap,
//Wrap
&vtFalse,
//Format
&vtMissing, //ReplaceWith
&varReplaceType, //Replace
&vtFalse,
//MatchKashida
&vtFalse,
//MatchDiacritics
&vtFalse,
//MatchAlefHamza
&vtFalse
//MatchControl
) == VARIANT_TRUE)
{
....
}
The error message shown in the Messagebox contains:
---------------------------------------------------------------------------------------------
The value of ESP was not properly saved across a function call. This
ususally a result of calling function declared with one calling convention
with a function pointer declared with a different calling convention.
---------------------------------------------------------------------------------------------
With Abort, Retry and Igonre buttons.
I appreciate your help in resolve this issue.
Thanks,
Sreekanth Murthy
There was an error in Find::Execute() API call which is present in one of
our function. The code for the above Find::Execute() API call is as below:
if(m_pWordApp == NULL)
return PILogError("MS Word is not running.", E_FAIL);
// Get the selection object.
MSWORD::SelectionPtr pSelection = m_pWordApp->Selection;
if(pSelection == NULL)
return PILogError("Unable to get the selection object from MS
Word.", E_FAIL);
// Get the find object.
MSWORD::FindPtr pFind = pSelection->Find;
if(pFind == NULL)
return PILogError("Unable to get the find object from the
selection object.", E_FAIL);
// Replace the text.
CComVariant varFind(keyFilter);
CComVariant varWrap(MSWORD::wdFindContinue);
CComVariant varReplaceType(MSWORD::wdReplaceNone);
// Loop through and find all the keys.
while(pFind->Execute( &varFind, //FindText
&vtFalse,
//MatchCase
&vtFalse,
//MatchWholeWord
&vtTrue,
//MatchWildcards
&vtFalse,
//MatchSoundsLike
&vtFalse,
//MatchAllWordForms
&vtTrue,
//Forward
&varWrap,
//Wrap
&vtFalse,
//Format
&vtMissing, //ReplaceWith
&varReplaceType, //Replace
&vtFalse,
//MatchKashida
&vtFalse,
//MatchDiacritics
&vtFalse,
//MatchAlefHamza
&vtFalse
//MatchControl
) == VARIANT_TRUE)
{
....
}
The error message shown in the Messagebox contains:
---------------------------------------------------------------------------------------------
The value of ESP was not properly saved across a function call. This
ususally a result of calling function declared with one calling convention
with a function pointer declared with a different calling convention.
---------------------------------------------------------------------------------------------
With Abort, Retry and Igonre buttons.
I appreciate your help in resolve this issue.
Thanks,
Sreekanth Murthy