By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,572 Members | 1,516 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,572 IT Pros & Developers. It's quick & easy.

Retrieving the callstack

P: n/a
Nak
Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as a
security measure. Thanks in advance.

Nick.
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Nick,
Is it possible to retrieve the callstack at runtime in a VB.NET
application? Have you looked at the System.Diagnostics.StackTrace &
System.Diagnostics.StackFrame classes?

They provide a callstack at runtime.

I wish the verify that specific methods have been called as a
security measure. I would consider incorporating or extending the .NET security before
attempting to role my own.

http://msdn.microsoft.com/library/de...pplication.asp

Hope this helps
Jay

"Nak" <a@a.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl... Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as a security measure. Thanks in advance.

Nick.

Nov 21 '05 #2

P: n/a
You might want to look at the StackTrace class.
http://msdn.microsoft.com/library/de...classtopic.asp

hope this helps..
Imran.

"Nak" <a@a.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as a security measure. Thanks in advance.

Nick.

Nov 21 '05 #3

P: n/a
Hi,
Check out Environment.StackTrace

"Nak" <a@a.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as a
security measure. Thanks in advance.

Nick.

Nov 21 '05 #4

P: n/a
Nak
Cheers :-)

"Shiva" <sh******@online.excite.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
Check out Environment.StackTrace

"Nak" <a@a.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as
a
security measure. Thanks in advance.

Nick.

Nov 21 '05 #5

P: n/a
Nak
Cheers :-)

"Imran Koradia" <no****@microsoft.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
You might want to look at the StackTrace class.
http://msdn.microsoft.com/library/de...classtopic.asp

hope this helps..
Imran.

"Nak" <a@a.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Hi there,

Is it possible to retrieve the callstack at runtime in a VB.NET
application? I wish the verify that specific methods have been called as

a
security measure. Thanks in advance.

Nick.


Nov 21 '05 #6

P: n/a
Nak
Hi Jay,
Have you looked at the System.Diagnostics.StackTrace &
System.Diagnostics.StackFrame classes?

They provide a callstack at runtime.


Cool. I shall check them out.
I wish the verify that specific methods have been called as a
security measure.

I would consider incorporating or extending the .NET security before
attempting to role my own.


Indeed I have, my application has a strong name key and requires a
signed XML license file in order to run. Technically, the only way to crack
my application now is by decompiling it, rather than creating a simple patch
for it. But just incase it is possible to make an application skip certain
lines of code without modifying the executable I would like to make a
mechanism that checks the callstack to insure that a valid license has been
acquired, that way I can add this throughout my application at key points,
*technically* making it harder to crack.

I know it's never going to be crack proof but I'm happy with this
concept.

Cheers again :-)

Nick.
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.