Retrieving the callstack

  • Thread starter Thread starter Nak
  • Start date Start date
N

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.
 
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/d...cpguide/html/cpconsecuringyourapplication.asp

Hope this helps
Jay
 
Hi,
Check out Environment.StackTrace

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.
 
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 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top