Someone knows how Windows XP close all the active network connections when a user log off? I' like to call programmatically the same functions because I can't do it using the command line NET USE or the WinApi (WNetEnumResource and WNetCancelConnection2). I have to close all previous connections before login as new user to some folder on a Server with Samba. Sometime when I try to close all the active connections some "hidden" connections are still open (I can't detect them with NET USE or WNetEnumResource); the only solution is to log off and then login again. Thanks, Lauro
It uses closesocket. Make a test with SoftIce, make breakpoint : bpm closesocket and then make logoff. -- Vladimir "Lauro" wrote in message news:licmn15hr0c52npui9bo2h4m46v0k69vkl@4ax.com... > Someone knows how Windows XP close all the active network connections > when a user log off? > > I' like to call programmatically the same functions because I can't do > it using the command line NET USE or the WinApi (WNetEnumResource and > WNetCancelConnection2). > > I have to close all previous connections before login as new user to > some folder on a Server with Samba. > Sometime when I try to close all the active connections some "hidden" > connections are still open (I can't detect them with NET USE or > WNetEnumResource); the only solution is to log off and then login > again. > > Thanks, Lauro
Sorry misprint, I ment bpx closesocket. -- Vladimir "Scherbina Vladimir" wrote in message news:OqzUTZACGHA.2704@TK2MSFTNGP15.phx.gbl... > It uses closesocket. > > Make a test with SoftIce, make breakpoint : > > bpm closesocket > > and then make logoff. > > -- > Vladimir > > "Lauro" wrote in message > news:licmn15hr0c52npui9bo2h4m46v0k69vkl@4ax.com... >> Someone knows how Windows XP close all the active network connections >> when a user log off? >> >> I' like to call programmatically the same functions because I can't do >> it using the command line NET USE or the WinApi (WNetEnumResource and >> WNetCancelConnection2). >> >> I have to close all previous connections before login as new user to >> some folder on a Server with Samba. >> Sometime when I try to close all the active connections some "hidden" >> connections are still open (I can't detect them with NET USE or >> WNetEnumResource); the only solution is to log off and then login >> again. >> >> Thanks, Lauro > >
The problem here is IMHO not what operation used but "how" to do it from Lauro's process. Different sockets opened by different services ( processes ) and only system have access to them. Arkady "Scherbina Vladimir" wrote in message news:eiPCAbACGHA.3936@TK2MSFTNGP12.phx.gbl... > Sorry misprint, I ment bpx closesocket. > > -- > Vladimir > > "Scherbina Vladimir" wrote in message > news:OqzUTZACGHA.2704@TK2MSFTNGP15.phx.gbl... >> It uses closesocket. >> >> Make a test with SoftIce, make breakpoint : >> >> bpm closesocket >> >> and then make logoff. >> >> -- >> Vladimir >> >> "Lauro" wrote in message >> news:licmn15hr0c52npui9bo2h4m46v0k69vkl@4ax.com... >>> Someone knows how Windows XP close all the active network connections >>> when a user log off? >>> >>> I' like to call programmatically the same functions because I can't do >>> it using the command line NET USE or the WinApi (WNetEnumResource and >>> WNetCancelConnection2). >>> >>> I have to close all previous connections before login as new user to >>> some folder on a Server with Samba. >>> Sometime when I try to close all the active connections some "hidden" >>> connections are still open (I can't detect them with NET USE or >>> WNetEnumResource); the only solution is to log off and then login >>> again. >>> >>> Thanks, Lauro >> >> > >
what is IMHO ? and how do you fix it? so when people logon to samba , they can logofff? thank you
wrote in message news:1135453832.232416.142110@g49g2000cwa.googlegroups.com... > what is IMHO ? and how do you fix it? so when people logon to samba , http://www.learnthenet.com/english/glossary/imho.htm > they can logofff? > thank you > -- Vladimir
Lauro wrote: > Someone knows how Windows XP close all the active network connections > when a user log off? It's an OS so it can do anything. There is AFAIK no API exposed to user code that allows it to do that. > I' like to call programmatically the same functions because I can't do > it using the command line NET USE or the WinApi (WNetEnumResource and > WNetCancelConnection2). > > I have to close all previous connections before login as new user to > some folder on a Server with Samba. I am missing something. Windows already closes the connections for you. Why do you need to do it manually before next logon? > Sometime when I try to close all the active connections some "hidden" > connections are still open (I can't detect them with NET USE or > WNetEnumResource); the only solution is to log off and then login > again. How do you know there are such connections? -- Eugene http://www.gershnik.com