|
Ok, now that we got the legality issue out of the way, do you have any idea of how to do it?
|
|
|
|
|
Since the information online is likely to change frequently.
Decide on a report format that your program would like and
then put the parsing code on your web site. Make your program
download the parsing code (probably a small dll, or (my
preference) a perl script.) each session (hey, you're online
anyhow right?) and use that to parse the fetched web pages.
All you are doing then is acting on behalf of the user
legitimately. I mean, what's the big difference between
grabbing html and presenting it one way (most browsers)
and grabbing html and presenting it another (your program's
format)? Your web site would never see the web pages-- your
app is just a variation of browser. I don't think there
would be any legal issues in this case, but then that's
just a reasonable opinion.
|
|
|
|
|
So basically what you think is going on is that people who have done this just wrote a routing to search through the html code, parse it, extract the details and just present it. Would an HTML session through Wininet suffice?
|
|
|
|
|
Yeah. I think that route is more robust. You can try to arrange
a method between yourself and the web site owners, but if you do
that you put yourself at the mercy of their support for that
interface.
I prefer to use perl in these cases, cause it is very good at
just this kind of work. There are tons of freely available
modules to make parsing html a snap. You can either pass on
the data to your web site for parsing or hand down the parsing
code to your app. (I don't recommend that your web site ever
try to contact the source site directly 'cause that could get
blocked.)
HTML through WININET is perfect.
|
|
|
|
|
Thanks for the info, maybe you can help me out a little more. Am I correct in thinking that an HTTP session through WININET is basically getting the contents of the HTML file the same way as if you were to "View Source" from Internet Explorer? (Meaning in that format). You also mentioned that Perl is perfect for this kind of stuff. Where can I get some online tutorials on Perl? Thanks again.
|
|
|
|
|
Yes, exactly. You also get the headers which don't show up in the "view source" option of IE.
Check out Perl.com [^]for Perl documentation.
The information you will want may require redirection and loading other
pages. So make your parser conversational.. i.e. hand it the first page,
let it parse and request further pages, hand it those pages and so forth
until it says done.
|
|
|
|
|
Thanks again for all your help. Merry Christmas to all. If you need a movie collection organizer try mine at www.movietrack.0catch.com.
|
|
|
|
|
Hey I have a linking problem that i can't seem to get rid of. I have a base class say:
class Base {
public:
void draw();
private:
....
}; Then I have a class from that..
class Something : public Base {
public:
void draw();
private:
....
}; I then have a std::list<Base> which I add objects to of type Something. i then go through the list and call each draw method.
std::list<Base>::iterator item;
for ( item = objects.begin(); item != objects.end(); item++) {
Base obj = *item;
obj.draw();
} But I get this error
error LNK2019: unresolved external symbol "public: void __thiscall Base::draw(void)" (?draw@Base@@QAEXXZ) referenced in function "public: bool __thiscall Sence::update(void)" (?update@Sence@@QAE_NXZ)
The std::list and the iteration of the list is done in another class. Reading the MSDN description of the error I can not firgure out whats wrong. commenting out the obj.draw(); line fixing it.
Any ideas? thanks.
Luke.
|
|
|
|
|
You haven't missed a keyword you think? Like virtual . :->
|
|
|
|
|
Thanks Mike, I should've got that one. oh well, thanks again
Luke.
|
|
|
|
|
The error says your code is calling Base::draw() but you did not provide a definition of that function. Adding virtual does no good in your case because that still doesn't provide the function definition, and anyway you are not calling draw() through a Base* variable.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hey thanks Mike, sorry, I'm not sure what you mean by "and anyway you are not calling draw() through a Base* variable."
I have the definition but my problem is now I add some class that extends from Base into the std::list but using
std::list<GlObject>::iterator item;
for ( item = objects.begin(); item != objects.end(); item++) {
item->draw();
}
it always executes the code in Base::draw() and not SomeOtherClass::draw() , any ideas? or more a good reference on the net that could help me out. thanks
Luke.
|
|
|
|
|
Your list is of Base objects, not pointers, so there is
no polymorphism here.
Create a list of Base pointers, and point them at some
of those other objects, or a mix or what-have-you.
|
|
|
|
|
Hi all
Can i know anywhere or anyone have visual c++ setup for me to download them..
Thanks
|
|
|
|
|
Sure, microsoft.com. The MSDN member download section.
Mind you it's probably >2GB.
|
|
|
|
|
Mike Nordell wrote:
Mind you it's probably >2GB.
And will probably cost quiet a bit!
Regards,
Brian Dela
"There should be an amendment to the constitution, that every president must be examined for paranoia before moving into office." - peterchen
|
|
|
|
|
Thanks for your help, i will be more greatful if you give me the links to the direct page of the site where i can download the software..
|
|
|
|
|
|
If you email piracy@microsoft.com, they'd love to hear from you. Be sure to tell them all the other Microsoft software you have stolen, so they take your request seriously.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I want to use this function.I add Advapi32.lib to my project setting,and my project is MFC project so I don't need to add windows.h to it,but I got an error that this function does not exist.The editor of VC show me this function,but I don't know why it say it's undeclared identifier. Any idea?
p.s:I use windows xp pro.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Since this function is only supported in Windows 2000 and later, you need to make sure that the WINVER #define value is set to 0x500 or greater before you include windows.h .
Software Zen: delete this;
|
|
|
|
|
|
Hi folks, I'm trying to associated the desktop window with LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam;
this is what I did:
hWnd= GetDesktopWindow();
WNDCLASS desktopClass;
char className[200];
GetClassName(hWnd,className,200);
BOOL res=GetClassInfo(hInstance,className,&desktopClass);
desktopClass.lpfnWndProc=WindowProcedure;
RegisterClass(&desktopClass);
MessageBox(hWnd,className,"",MB_OK);
however the WindowProcedure was not called. why?
thanks!!
|
|
|
|
|
By calling RegisterClass you are changing that class for all subsequent calls to CreateWindow for that class.
If you want to change the wndproc for a class of a window that has already been created you will need to call ::SetClassLong and set the GCL_WNDPROC index.
Optionally if you just want to subclass one specific window you should use ::SetWindowLong and replace the wndproc for that one window with GWL_WNDPROC.
I am not sure that you will be able to do what you are trying to do unless you can get your code loaded into the same process that created the desktop window (probably explorer.exe). Because the address that you set for the wndproc will be in a different address space and will not be accessible unless it is in the same process.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
you are right that I can't set GWL_WNDPROC attribute if the windowdoes not belong to the same process. This is what msdn doc says:
GWL_WNDPROC
Sets a new address for the window procedure.
Windows NT/2000/XP: You cannot change this attribute if the window does not belong to the same process as the calling thread.
so does this mean there's no way I can listen to the msg that's been send to the desktop window and respond to those msgs?
thanks a million
|
|
|
|