External Prog to access dc++

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

External Prog to access dc++

Post by Twink » 2003-07-23 19:59

Hi, I'm [playing round with writing a program that can get information/stats from dc++. I can get the Hub Windows, PMs, File list windows easily by using FindWindow or EnumChildWindows Easily enough, however my problem is when it comes to CListCtrls (User Lists, and current uploads/downloads)

I find the HWND of the List and cast it using
CListCtrl *list = (CListCtrl*)CListCtrl::FromHandle(hWnd);
which works fine, I can get the size of the list correctly from it, however if I try to loop through and get each list item dc++ sometimes crashes. I'm guessing its because these lists are continously adding and removing items, so I may be asking for a item that no longer exists (although I am using the getNext() command). As I said it's dc++ that crashes and not my program, so I'm obviously asking it something wrong. Any ideas of what I could do instead to get the lists?.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-07-24 10:14

Have you run DC++ under a debugger to figure out why it's crashing? Not having done anything like that before, I'd guess that you'd get some useful information about your technique when you know what causes the crash...

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2003-07-24 23:00

good idea, yeah I'll try that. I was hoping to avoid working out how to compile dc++ again, but should be worth it.

Locked