Click here to Skip to main content
16,008,954 members
Home / Discussions / COM
   

COM

 
GeneralMultiple import Pin
Sunny_leung16-Mar-02 9:07
Sunny_leung16-Mar-02 9:07 
GeneralRe: Multiple import Pin
Joao Vaz18-Mar-02 0:51
Joao Vaz18-Mar-02 0:51 
GeneralActiveX Pin
Leesen16-Mar-02 3:43
Leesen16-Mar-02 3:43 
GeneralRe: ActiveX Pin
Mazdak16-Mar-02 4:10
Mazdak16-Mar-02 4:10 
Generalerror C2501: 'MIDL_INTERFACE' Pin
drewtenn15-Mar-02 19:05
drewtenn15-Mar-02 19:05 
GeneralRe: error C2501: 'MIDL_INTERFACE' Pin
Joao Vaz18-Mar-02 1:28
Joao Vaz18-Mar-02 1:28 
GeneralRe: error C2501: 'MIDL_INTERFACE' Pin
18-Mar-02 5:59
suss18-Mar-02 5:59 
Generalone problem about vbscript.dll Pin
Davidlou15-Mar-02 16:07
Davidlou15-Mar-02 16:07 
Who has used the regexp object in system32\vbscipt.dll to parse the text string. I have tried it and make it work!
But i don't know why i can get only one match(that is the matches.GetCount()==1), even there are many exist. The next is my code:


void CInetSessionDlg::ParsePage(CString szPattern, CString szContent){ //m_regExp's declaration is on other place link this: IRegExp m_regExp; //The class IMatchCollection and IMatch are both got from the tlb //m_regExp = regExp; try{ if(m_regExp.CreateDispatch(__uuidof(RegExp)) == FALSE) { AfxMessageBox("CreateDispatch Failed!"); return; } //IMatchCollection2 * temp; m_regExp.SetIgnoreCase(TRUE); m_regExp.SetPattern(LPCTSTR(szPattern)); if(m_regExp.Test(LPCSTR(szContent))) { //IMatchCollection2 matches=m_regExp.Execute(szContent); ISubMatches matches = m_regExp.Execute(szContent); for(long i = 0; i < matches.GetCount(); i++) { IMatch2 match = matches.GetItem(i); //IMatch2 match = temp->GetItem(i); CString strLink = match.GetValue(); m_cbHref.AddString(strLink); } } } catch(_com_error& e) { AfxMessageBox("Com Error occurred!" + e.Description()); return; }}

in this implementation file's header file:
i defined the RegExp(copied from the file RegExp.tlh got from vbscript.dll)


struct __declspec(uuid("3f4daca4-160d-11d2-a8e9-00104b365c9f"))RegExp; // [ default ] interface IRegExp2

Why? Who can tell me how to use vbscript.dll in VC++ 6.0

thanks a lot!



Sincerely, Davidlou
davidlou68@hotmail.com
GeneralTrouble with MSXML 4 Pin
MightyM15-Mar-02 10:26
MightyM15-Mar-02 10:26 
GeneralRe: Trouble with MSXML 4 Pin
pba_15-Mar-02 11:29
pba_15-Mar-02 11:29 
GeneralRe: Trouble with MSXML 4 Pin
MightyM15-Mar-02 11:34
MightyM15-Mar-02 11:34 
GeneralRe: Trouble with MSXML 4 Pin
pba_15-Mar-02 11:55
pba_15-Mar-02 11:55 
GeneralRe: Trouble with MSXML 4 Pin
15-Mar-02 12:22
suss15-Mar-02 12:22 
GeneralRe: Trouble with MSXML 4 Pin
MightyM18-Mar-02 5:19
MightyM18-Mar-02 5:19 
GeneralActiveX control doesn't paint at design-time Pin
15-Mar-02 10:27
suss15-Mar-02 10:27 
GeneralDCOM with Visual C++ Pin
15-Mar-02 8:24
suss15-Mar-02 8:24 
GeneralRe: DCOM with Visual C++ Pin
Anand Amirineni15-Mar-02 9:14
Anand Amirineni15-Mar-02 9:14 
Generalreceiving a Boolean type in VB Pin
Jerome Conus15-Mar-02 5:28
Jerome Conus15-Mar-02 5:28 
GeneralRe: receiving a Boolean type in VB Pin
pba_15-Mar-02 8:14
pba_15-Mar-02 8:14 
GeneralRe: receiving a Boolean type in VB Pin
Anand Amirineni15-Mar-02 9:54
Anand Amirineni15-Mar-02 9:54 
GeneralImplement onIdle Pin
dejan.n15-Mar-02 3:12
dejan.n15-Mar-02 3:12 
GeneralRe: Implement onIdle Pin
Prem Kumar15-Mar-02 8:13
Prem Kumar15-Mar-02 8:13 
GeneralPassing a BSTR to VB Pin
Jerome Conus14-Mar-02 21:37
Jerome Conus14-Mar-02 21:37 
GeneralRe: Passing a BSTR to VB Pin
Mazdak14-Mar-02 22:04
Mazdak14-Mar-02 22:04 
GeneralRe: Passing a BSTR to VB Pin
Joao Vaz14-Mar-02 23:45
Joao Vaz14-Mar-02 23:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.