佚名通过本文主要向大家介绍了
aboutwordinstancememoryleak!等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: about word instance memory leak!
描述:
描述:
I have written the following code to check wether MSWORD is installed in my machine,
everytime when I run this application a new WINWORD.exe is running in the process, this
I have observed by opening task manager, can you please guide me why ReleaseDispatch
is not releasing the memory.
CApplication objWordApp;//= new CApplication;
bool isWordApp = true;
isWordApp = objWordApp.CreateDispatch("Word.Application");
if ( !isWordApp) {
isWordInstalled = false;
AfxMessageBox ( " MS Word is not installed in your machine." ) ;
}
objWordApp.ReleaseDispatch() ;