Click here to Skip to main content
15,947,612 members

Comments by kaushik_code (Top 22 by date)

kaushik_code 17-Jul-15 9:24am View    
Thanks for the answer , I just discovered the same solution myself. Thanks a lot for posting.
kaushik_code 28-Jan-15 1:53am View    
The above approaches are based on enumerating the sessions of a computer.Which is what we see in the Shared folder\Sessions snap-in in compmgmt.msc.
The problem is in a domain environment when a print client creates a connection with a print object on the print server, the session is not listed there and hence enumerating session does not help.
kaushik_code 27-Jan-15 8:35am View    
Much appreciated. Thanks Richard.
kaushik_code 27-Jan-15 7:08am View    
NetConnectionEnum returns the connections to a particular share on a server. I am trying it on the local server. I have a printer shared on the local server and I have made a connection to that printer from a different machine. When I run my program on the local server , I expect NetConnectionEnum to return a positive value for "entriesread" , which is an out param. But the function returns success but entriesread =0.
Following are the parameters used.

1.servername = NULL
2.qualifier = share name of the printer.
3.level =1
4.bufptr = address of PCONNECTION_INFO_1 pointer.
6.address of a DWORD.
7.address of a DWORD.
8.address of a DWORD.
kaushik_code 27-Jan-15 6:00am View    
This will be way too much information. I have stumbled upon a function called NetConnectionEnum which seems to give what I exactly want. But I am unable to get results out of it. Any ideas?