多线程开发上的问题:怎么能在线程里读取office文档的内容(ole方法)
我在程序里面创建一个线程来打开和读取office文档的内容。创建线程我是用AfxBeginThread。
代码:m_hOffice = AfxBeginThread(thStartCheck,NULL);
在thStartCheck里面对各个office进行内容读取。
if(stricmp(cFileType,".txt")==0){//txt OfficeSelf.TxtCheck(m_sFileName);}else if(stricmp(cFileType,".doc")==0 || stricmp(cFileType,"docx")==0){//WORD OfficeSelf.WordCheck(m_sFileName);}else if(stricmp(cFileType,".xls")==0 || stricmp(cFileType,"xlsx")==0){//EXCEL OfficeSelf.ExcelCheck(m_sFileName);}else if(stricmp(cFileType,".ppt")==0 || stricmp(cFileType,"pptx")==0){//txt OfficeSelf.PPTCheck(m_sFileName);}