|
-
Jan 6th, 2003, 05:04 PM
#1
Thread Starter
PowerPoster
LoadLibrary + Class??
Hullo.
I've discovered a useful little class in a dll using the dependancy walker; however, I have scant clue how to go about creating an instance of this class. I'm familiar with using LoadLibrary() and GetProcAddress(), but I don't feel like that's going to cut it; here's the nice little chart DW came up with for me:
Code:
[C++]class BNGatewayAccess & BNGatewayAccess::operator=(class BNGatewayAccess const &)
[C++]int BNGatewayAccess::CurGateway(void)
[C++]char * BNGatewayAccess::DNS(int)
[C++]char * BNGatewayAccess::FindKey(char *,char *)
[C++]char * BNGatewayAccess::FindSection(char *,char *)
[C++]int BNGatewayAccess::GMT(int)
[C++]void BNGatewayAccess::GetBattlenetGatewayList(void)
[C++]void BNGatewayAccess::GetBattlenetRealmsList(void)
[C++]void BNGatewayAccess::GetGatewayList(char const *)
[C++]int BNGatewayAccess::GetSystemTimeZone(void)
[C++]void BNGatewayAccess::Load(void)
[C++]char * BNGatewayAccess::Name(int)
[C++]char * BNGatewayAccess::Nth(int)
[C++]int BNGatewayAccess::NumGateways(void)
[C++]void BNGatewayAccess::PickClosestZone(int)
[C++]char * BNGatewayAccess::Realm(int)
[C++]void BNGatewayAccess::SetCurGateway(int)
[C++]char * BNGatewayAccess::SkipEOL(char *,char *)
[C++]char * BNGatewayAccess::SkipToEOL(char *,char *)
[C++]void BNGatewayAccess::Unload(void)
[C++]void BNGatewayAccess::UpdateGatewaysFromIni(char *)
[C++]void BNGatewayAccess::WriteDefaultGatewayList(void)
[C]QueryInterface
Soo....how can I create an instance of aforementioned class? The top prototype looks to be the key, but I'm not sure how to do it.
Thanks in advance.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Jan 6th, 2003, 09:00 PM
#2
Thread Starter
PowerPoster
I've done s'more research on the COM QueryInterface() and I spose that this is the way it should be done, but I can't figure out how to do it...someone? anyone?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Jan 7th, 2003, 11:59 AM
#3
Why do you want to hook into that dll? I know which it is and by whom and to what program it belongs. Why do you want to hook into it?
There is no way to use this as a class. You COULD use GetProcAddress to get all the class' methods, but you wouldn't know what to pass as a this pointer. It would have to be the address of some struct, but you woudn't know how large those structs have to be, neither would you know what secret initiliazing is done by element constructors that might be vital to the workings of the class.
Nothing you can do without at least the original header of the class and maybe the import library too. And you can assume that this company doesn't give it to you.
I also doubt that you'll get anywhere with QueryInterface here.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 8th, 2003, 11:55 AM
#4
Thread Starter
PowerPoster
Don't assume I'm up to no good -- nothing could be further from the truth. I spend a lot of time on battle.net in the open tech support channel and I see lots of questions from people who have modified their registries to use alternate servers. I thought this would be an excellent way to provide a tool that could reset their gateway entries without an update even if the registry format changed. Since it appears from your answer that this isn't possible, I suppose I'll just have to do DNS lookups and hope that the main address for each gateway doesn't change.
Thanks anyway.
/K
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Jan 8th, 2003, 12:24 PM
#5
That's reassuring. I just wanted to make sure you're not some kid that tries to mess with battle.net. It's the best gaming system around.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 8th, 2003, 08:33 PM
#6
Thread Starter
PowerPoster
Probably OT now :-D
I concur. And it's free
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|