Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SymGetSymFromAddr

0 views
Skip to first unread message

Anders And

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to
Hi!

I want to get the pointer that can be put into SymGetSymFromAddr() so I can
get to the name of my function.
I was thinking something like:

void testFunc()
{
SymGetSymFromAddr(GetCurrentProcess(), (DWORD)&testFunc,
&symDisplacement, pSymbol);
}

But obviously, &testFunc just isn't good enough. How do I find the correct
pointer?

Thanks.

Damian Driscoll

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to

"Anders And" <A...@andeby.com> wrote in message
news:8smsn4$qj6$1...@news.inet.tele.dk...

Shouldn't it just be testFunc?

(i.e.
SymGetSymFromAddr(
GetCurrentProcess(),
(DWORD)testFunc,
symDisplacement,
pSymbol);
)

Damian


Anders And

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Tried that. Doesn't work either.

"Damian Driscoll" <dam...@dialsolutions.nospam.co.uk> wrote in message
news:971965564.27547.0...@news.demon.co.uk...

Damian Driscoll

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
> Tried that. Doesn't work either.

Well, I still reckon it's right.

Try doing the reverse by using SymGetSymFromName and looking at its address.

It's also possible that your other parameter values are incorrect which
would cause it to fail regardless of whether your address is correct. Try
looking up the value returned from GetLastError() after calling
SymGetSymFromAddr() to see where the problem lies.

Damian

0 new messages