Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralRe: COMException "Requested resource in use" Pin
Stephane Rodriguez.7-May-03 22:07
Stephane Rodriguez.7-May-03 22:07 
GeneralRe: COMException "Requested resource in use" Pin
GriffonRL12-May-03 0:42
GriffonRL12-May-03 0:42 
GeneralDataComponents in Visual C# Pin
flyingv6-May-03 23:41
flyingv6-May-03 23:41 
GeneralRe: DataComponents in Visual C# Pin
Andres Manggini7-May-03 20:09
Andres Manggini7-May-03 20:09 
GeneralRe: DataComponents in Visual C# Pin
Anonymous9-May-03 2:01
Anonymous9-May-03 2:01 
GeneralRe: DataComponents in Visual C# Pin
Andres Manggini9-May-03 13:00
Andres Manggini9-May-03 13:00 
QuestionHow to write WebControl Pin
KETUINHA6-May-03 21:21
KETUINHA6-May-03 21:21 
QuestionHow to extract links from a webpage using mshtml Pin
benzite6-May-03 20:20
benzite6-May-03 20:20 
I'm trying to extract links frome a webpage by mshtml.Now I'm eager for help.

The following code can be reffered: (most from .S.Rod)
[ComImport, Guid("7FD52380-4E07-101B-AE2D-08002B2EC713"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IPersistStreamInit
{
IntPtr GetClassID();
void IsDirty();
void Load(IntPtr pStream);
void Save(IntPtr pStream, bool fClearDirty);
long GetSizeMax();
void InitNew();
}
private void LinkExtractor()
{
mshtml.HTMLDocumentClass docCls=new mshtml.HTMLDocumentClass();
IPersistStreamInit pS = (IPersistStreamInit) docCls;
pS.InitNew();
docCls.createElement("<a href='http://www.codeproject.com'>link</a>");

//the following code is to get bodyElement,but failed
int i=0;
for(i=0;i<5;i++)
{

object oIndex=(object)i;
if(i==3)
{
System.Type type=docCls.all.item(oIndex,oIndex).GetType();
mshtml.HTMLBodyClass bodyCls=(mshtml.HTMLBodyClass)docCls.all.item(oIndex,oIndex);
}
}
}
Now I wonder how can I get the bodyElement,by which can easily extract all links of a webpage.
AnswerRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.6-May-03 22:19
Stephane Rodriguez.6-May-03 22:19 
GeneralRe: How to extract links from a webpage using mshtml Pin
benzite7-May-03 17:30
benzite7-May-03 17:30 
GeneralRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.7-May-03 20:37
Stephane Rodriguez.7-May-03 20:37 
GeneralRe: How to extract links from a webpage using mshtml Pin
benzite7-May-03 21:41
benzite7-May-03 21:41 
GeneralRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.7-May-03 21:58
Stephane Rodriguez.7-May-03 21:58 
GeneralRe: How to extract links from a webpage using mshtml Pin
benzite7-May-03 22:25
benzite7-May-03 22:25 
AnswerRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.6-May-03 22:36
Stephane Rodriguez.6-May-03 22:36 
General<mailto> in C# Pin
eggie56-May-03 15:02
eggie56-May-03 15:02 
GeneralRe: in C# Pin
J. Dunlap6-May-03 15:35
J. Dunlap6-May-03 15:35 
GeneralAll in Code Behind. . . . Pin
drewpecunia6-May-03 13:38
drewpecunia6-May-03 13:38 
GeneralWebRequest is not working Pin
IsaacB6-May-03 12:48
IsaacB6-May-03 12:48 
GeneralRe: WebRequest is not working Pin
leppie7-May-03 7:01
leppie7-May-03 7:01 
GeneralNetworkStream: To buffer, or not to buffer... Pin
Katalyst6-May-03 12:14
Katalyst6-May-03 12:14 
QuestionIHTMLEditHost sample for C#? Pin
J. Dunlap6-May-03 10:22
J. Dunlap6-May-03 10:22 
AnswerRe: IHTMLEditHost sample for C#? Pin
Stephane Rodriguez.6-May-03 11:30
Stephane Rodriguez.6-May-03 11:30 
GeneralRe: IHTMLEditHost sample for C#? Pin
J. Dunlap6-May-03 13:01
J. Dunlap6-May-03 13:01 
QuestionHow to get the IP Number of the server on which my app is running Pin
Ranjan Banerji6-May-03 9:20
Ranjan Banerji6-May-03 9:20 

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.