• Welcome to Valhalla Legends Archive.
 

[VB.NET] Last Procedure

Started by Imperceptus, July 03, 2007, 05:42 PM

Previous topic - Next topic

Imperceptus

Not even sure if I title this correctly, so forgive me. 

Is it possible to check what part of my code is calling a procedure?  Example
Sub A1 makes a call to Function C1
Sub B1 makes a call to Function C1

Can i determine in C1 what called it?
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

l2k-Shadow

probably not in the language itself, why not just set like a bool in C1 to be true if A1 called it and false if B1 called it?
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

K

Yes, using System.Diagnostics.StackTrace,  or you can get the calling assembly with the Assembly class.

http://msdn2.microsoft.com/en-us/library/system.diagnostics.stacktrace(VS.71).aspx

Imperceptus

#3
that is exactly what I needed. Thank you so much K.

Shadow, That would mean I would have to do that in every procedure that I would check against. and while I guess it would work. I can't vouch that my memory is good enough to do that every time and not make a mess down the road.
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.