Log all events/function calls fired in vb6 without coding in each 
Author Message
 Log all events/function calls fired in vb6 without coding in each

Hi,

     Is there any way of logging events/functions fired even any
function/event does not generate any error and without writing in each
function/event i.e., errorhandler.

--
Praveen Kumar Ch.



Sat, 10 Mar 2012 22:12:01 GMT  
 Log all events/function calls fired in vb6 without coding in each

Quote:
> Hi,

>     Is there any way of logging events/functions fired even any
> function/event does not generate any error and without writing in each
> function/event i.e., errorhandler.

Search the web for "vb6 code profiler"


Sat, 10 Mar 2012 22:15:25 GMT  
 Log all events/function calls fired in vb6 without coding in each


Wed, 18 Jun 1902 08:00:00 GMT  
 Log all events/function calls fired in vb6 without coding in each
vb6 code profilers ask for .vbp projects to add to profilers but i want to do
it for exe. So, I want to implement it in my code and see the report with
minimal changes to the code.
--
Praveen Kumar Ch.
Quote:



> > Hi,

> >     Is there any way of logging events/functions fired even any
> > function/event does not generate any error and without writing in each
> > function/event i.e., errorhandler.

> Search the web for "vb6 code profiler"



Sat, 10 Mar 2012 22:29:01 GMT  
 Log all events/function calls fired in vb6 without coding in each

Quote:
> vb6 code profilers ask for .vbp projects to add to profilers but i want to
> do
> it for exe. So, I want to implement it in my code and see the report with
> minimal changes to the code.

Some debug or profile the EXE too. If you want Debug.Print equivalent, you
can use OutputDebugString(), which prints a string to an external debug
viewer, but this requires adding code to where you want.

To view OutputDebugString output, use this free software, which doesn't
require installation:

DebugView:
http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

Declaration:

Public Declare Sub OutputDebugString Lib "kernel32" Alias _
    "OutputDebugStringA" (ByVal lpOutputString As String)

Usage:

OutputDebugString "ABC"

Wrapper sub:

Public Sub DebugPrint(ByRef s As String)
    OutputDebugString s
End Sub



Sat, 10 Mar 2012 22:39:35 GMT  
 Log all events/function calls fired in vb6 without coding in each


Wed, 18 Jun 1902 08:00:00 GMT  
 Log all events/function calls fired in vb6 without coding in each


Quote:
>      Is there any way of logging events/functions fired even any
> function/event does not generate any error and without writing in each
> function/event i.e., errorhandler.

The obvious answer is to get 'someone else' to write in every function/event
to do the logging.

I'd be surprized if there was any means to hook into the VB runtime to
do such a task.  Failing that, you'd have to design the means to hook into
your own program.  One idea comes to mind where you build a jump table
to every function/event so that every call goes through one routine and jumps
out to execute.  (Ex; one big Select Case routine).

Not a very pretty prospect, I'd have to admit.
LFS



Sat, 10 Mar 2012 22:46:44 GMT  
 Log all events/function calls fired in vb6 without coding in each
Google suggests this (I haven't tried it). Minimal source changes:
just build with symbolic symbols (i.e. create a PDB) and add a couple
of lines of code (to start and stop profiling).

http://www.holmea.demon.co.uk/Profiler/Install.htm#EXE



Sat, 10 Mar 2012 23:39:13 GMT  
 Log all events/function calls fired in vb6 without coding in each

| I'd be surprized if there was any means to hook into the VB runtime to
| do such a task.  Failing that, you'd have to design the means to hook into
| your own program.  One idea comes to mind where you build a jump table
| to every function/event so that every call goes through one routine and
jumps
| out to execute.  (Ex; one big Select Case routine).

Actually, there is a way to inject code into the vb runtime to react to
calls made there.  I'm not sure which call would faciliate the kind of
logging desired.



Sun, 11 Mar 2012 00:31:50 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Remove a function call without source code

2. Event Log Backup API call fails for Security Events

3. Setting Property without Event Firing

4. Changing value of Checkbox or OptionButton without firing Click Event

5. Clearing radio buttons without firing click event

6. Logging events to NT Event Log from VB5

7. Making an Event Log Message File in VB (NOT WRITING TO THE EVENT LOG)

8. Event Log: Writing to the NT Event Log

9. Invoke/Call/Fire the Events Read/WriteProperties

10. OLEDragDrop events not firing after calling APEX myGrid.LoadLayout

11. Help about firing event inside a Module Function

12. VB6:Firing Control Events

 

 
Powered by phpBB® Forum Software