Hi,
I tried a search, but it seems, that the problem has not yet been discussed here...
I'm currently writing a protocol-DLL for my projects; sometimes I find this very useful. It's just a simple one-class DLL with one function "WriteLine" that openes my protocolfile, writes the line of text I want and closes the file again. (I know that this is slow, but in bigger projects it helps very much if you can't find an error...)
At the moment, I'm passing the calling functions name and class as parameters to the function "WriteLine"... this is ok, but if I for what reason ever change a function name or move a function to another class, I always have to change all protocol-lines too.
Now I'm wondering, if there is a possibility to get the calling functions name and class just inside my WriteLine-function... this would be much easier. For example:
Does anyone have an idea, how to do this or if this is possible?
Thanks, Fazzyer
I tried a search, but it seems, that the problem has not yet been discussed here...
I'm currently writing a protocol-DLL for my projects; sometimes I find this very useful. It's just a simple one-class DLL with one function "WriteLine" that openes my protocolfile, writes the line of text I want and closes the file again. (I know that this is slow, but in bigger projects it helps very much if you can't find an error...)
At the moment, I'm passing the calling functions name and class as parameters to the function "WriteLine"... this is ok, but if I for what reason ever change a function name or move a function to another class, I always have to change all protocol-lines too.
Now I'm wondering, if there is a possibility to get the calling functions name and class just inside my WriteLine-function... this would be much easier. For example:
VB.NET:
' protocol-DLL, class Cprotocol
Private Sub WriteLine(ByVal Text As String)
' open file
Stream.WriteLine(CALLINGFUNCTION & " from " & CALLINGCLASS & ": " & Text)
' close file
End Sub
Does anyone have an idea, how to do this or if this is possible?
Thanks, Fazzyer