www.icetips.com  Icetips Utilities Documentation 11/30/2010    

Network Class - Debugging

Previous  Top  Next  


The methods in the ITNetwork class have debug code in them that uses OutputDebugString api call to send the information to an external tool.  In order to view the debug information you need a tool such as DebugView from www.sysinternals.comDebugView is a free tool and can be used on multiple computers so you can have the debug information show up on a second computer and view it as your program runs on another computer.

 

In order to turn the debug logging on in your application, simply run your program with /ITNETWORK command line parameter:

 

MyProgram.exe /ITNetwork

 

The command line parameter is not case sensitive.  /ITNetwork, /ITNETWORK or /itnetwork will all give the same effect. 

 

Below is an example output from a call to GetLocalNetworkFileName on a computer called COMPAQ3200 with a local share of C:\ called PRES_200.  Notice that all lines coming from the ITNetworkClass are prefixed with "ITNetwork:"  You can use this as a filter in

 

1   3.12749410   [2908] ITNetwork: Construct, Hide DebugView = False    

2   12.32415581  [2908] ITNetwork: GetLocalNetworkFileName Begins       

3   12.32423476  [2908] ITNetwork: GetNetworkFilename, WNetGetUniversalName = 2250      

4   12.32429489  [2908] ITNetwork: pFile   = C:\Installations\aawsepersonal.exe 

5   12.32433433  [2908] ITNetwork: UncName = C:\Installations\aawsepersonal.exe 

6   12.32437811  [2908] ITNetwork: Filename: C:\Installations\aawsepersonal.exe 

7   12.32441549  [2908] ITNetwork: Need to find local share name

8   12.32457083  [2908] ITNetwork: Before GetComputerName       

9   12.32460993  [2908] ITNetwork: GetComputerName = ABCOMPAQ3200       

10   12.32464809  [2908] ITNetwork: After GetComputerName

11   12.32465735  [2908] ITNetwork: Computer Name: ABCOMPAQ3200  

12   12.32479729  [2908] ITNetwork:      

13   12.32483673  [2908] ITNetwork: -----------------------------------------------------

14   12.32490315  [2908] ITNetwork:  Enumerated Local Shares     

15   12.32494094  [2908] ITNetwork: CCSFlags:    538976288       

16   12.32497734  [2908] ITNetwork: MaxUses:     -1      

17   12.32501403  [2908] ITNetwork: Name:        PRES_C200       

18   12.32505090  [2908] ITNetwork: Path:        C:\     

19   12.32508669  [2908] ITNetwork: Permissions: 0       

20   12.32512336  [2908] ITNetwork: Type:        0       

21   12.32516002  [2908] ITNetwork: -------------------- 

22   12.32519856  [2908] ITNetwork: -----------------------------------------------------

23   12.32524488  [2908] ITNetwork: EnumLocalShares, Before Return, KeyIndex = 1 

24   12.32528265  [2908] ITNetwork: After EnumLocalShares

25   12.32532021  [2908] ITNetwork: 1 local shares found 

26   12.32535735  [2908] ITNetwork: Path = C:\   

27   12.32540102  [2908] ITNetwork: Name = PRES_C200     

28   12.32544396  [2908] ITNetwork: Share found: PRES_C200       

29   12.32545328  [2908] ITNetwork: Share found: \\ABCOMPAQ3200\PRES_C200\Installations\aawsepersonal.exe

30   12.32549089  [2908] ITNetwork: UNCName = \\ABCOMPAQ3200\PRES_C200\Installations\aawsepersonal.exe   

31   12.32552804  [2908] ITNetwork: GetLocalNetworkFileName Ends 

32   12.44182026  [2908] ITNetwork: Construct, Hide DebugView = False    

 

See also:

  PTD

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/network_debugging.htm