473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Retrieving the callstack

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
6 6778
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Zeng | last post by:
Hello, In my code, when I run into an error, I would like to dump the callstack into error log, how do I do that w/o throwing an exception then catching it just to get the callstack? Exception...
2
by: asanford | last post by:
We use StackWalk(StackWalk64) from dbghelp.dll to walk our callstacksas needed, using the various Sym* methods (SymGetSymFromAddr, SymGetLineFromAddr) to resolve source file, function name, and...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
2
by: Sakke | last post by:
Hello! We have written a GCryptoSvr.dll COM server in C++. Inside that resides WebClient COM component. WebClient CLSID is {8DC27D48-F94C-434B-A509-C3E1A3E75B9E}. When we are using that...
11
by: seannakasone | last post by:
Is there a way to get the callstack level in c++? for example, take the following code: void call3() { //callstack level would be 3 } void call2() { //callstack level would be 2 call3();
3
by: phocis | last post by:
I wrote a pair of functions to enable scoped or referenced setTimeout calls. I did this because I have an object factory that creates multiple objects and those objects need to delay a few calls on...
3
by: Rainer Queck | last post by:
Hi NG, currently I am working on a add-in which shell read the callstack and write it to a file. The question is, how can I read the current callstack of a debugged application with a add-in?...
5
by: Agrona | last post by:
I found this thread: http://www.thescripts.com/forum/thread233505.html only marginally helpful. It seems that going through the callstack is the only way to determine which function may have...
4
by: shirleylouis | last post by:
Hi Ppl, Could anyone help me out with retrieving URL from Clipboard using C#??
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.