Advertisement

01.12.2006 at 06:00PM PST, ID: 21694910
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Kill a session

Asked by dominica526 in Microsoft Visual C++.Net

Tags: ,

Hello Experts,

I have what I believe is a working application; well according to my return codes of zero it is working. Even if I play with the inputs by giving it the wrong client name or wrong username I get the correct error codes. Problem is my code will not kill the session. Can anyone help me fix my VB code?

Private Declare Function NetSessionDelNT Lib "netapi32.dll" Alias "NetSessionDel" (ServerName As Any, UncClientName As Any, UserName As Any) As Long

Enum WindowsNetworkingErrors
nerrSuccess = 0
nerrNetNotStarted = 2102
nerrRemoteOnly = 2106
nerrServerNotStarted = 2114
nerrWkstaNotStarted = 2138
nerrBadTransactConfig = 2141
nerrClientNameNotFound = 2312
nerrInvalidComputer = 2351
nerrNoSuchServer = 2460
nerrNoSuchSession = 2461
End Enum

Function NetSessionDel(Optional ServerName As String, Optional ClientName As String, Optional UserName As String) As Long
Dim SP As Long, CP As Long, UP As Long
Dim SB() As Byte, CB() As Byte, UB() As Byte

If Len(ServerName) Then
SB = ServerName & vbNullChar
SP = VarPtr(SB(0))
End If
If Len(ClientName) Then
CB = ClientName & vbNullChar
CP = VarPtr(CB(0))
End If
If Len(UserName) Then
UB = UserName & vbNullChar
UP = VarPtr(UB(0))
End If

NetSessionDel = NetSessionDelNT(ByVal SP, ByVal CP, ByVal UP)
End Function

Private Sub Command1_Click()
NetSessionDel "\\Server", "\\client", "user"
End Sub
Start Free Trial
[+][-]01.12.2006 at 06:23PM PST, ID: 15688207

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 07:06PM PST, ID: 15688414

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 02:40AM PST, ID: 15690265

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 05:22AM PST, ID: 15691019

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 12:28PM PST, ID: 15695317

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 12:46PM PST, ID: 15695484

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.14.2006 at 06:12PM PST, ID: 15703082

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.15.2006 at 05:16AM PST, ID: 15704287

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.15.2006 at 04:05PM PST, ID: 15707188

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.16.2006 at 08:18AM PST, ID: 15711836

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.16.2006 at 05:56PM PST, ID: 15716345

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.17.2006 at 05:37AM PST, ID: 15719112

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.17.2006 at 09:56PM PST, ID: 15726274

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.18.2006 at 05:41AM PST, ID: 15728593

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C++.Net
Tags: kill, session
Sign Up Now!
Solution Provided By: lakshman_ce
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.18.2006 at 08:33PM PST, ID: 15736191

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.26.2006 at 07:22PM PST, ID: 15801967

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32