"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
Go Back  Xtreme Visual Basic Talk > > > "the descriptor is not a socket" Run-time error 10038


Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2002, 08:45 AM
dta dta is offline
Junior Contributor
 
Join Date: Jul 2002
Posts: 263
Default "the descriptor is not a socket" Run-time error 10038


http://www.winsockvb.com/advanced/dll/dll1.html

according to this tutorial and the file that it has at the end of the third page to download we can do something like this...

Private Sub m_Socket_ConnectionRequest(ByVal RequestID As Long)

RaiseEvent FindSocket(RequestID)

End Sub

i have an event that goes to the standard exe and checks if a socket is open so that i can accept there the requestID...

Private Sub socketListening_FindSocket(ByVal RequestID As Long)

If mySocket1.State = sckClosed Then
mySocket1.LocalPort = 3331

mySocket1.Listen
mySocket1.Accept RequestID

ElseIf mySocket2.State = sckClosed Then
mySocket2.LocalPort = 3332

mySocket2.Listen
mySocket2.Accept RequestID

ElseIf mySocket3.State = sckClosed Then
mySocket3.LocalPort = 3333
mySocket3.Listen
mySocket3.Accept RequestID
End If

End Sub

according to the above code the mysocket1.state is closed so it will go inside the "if" and open the socket for listening and then accept the RequestID that comes from the event socket that is always listening called "socketListening"...but when it goes to the accept function inside the activex exe...this one

Private Sub pAccept(ByVal RequestID As Long)

m_Socket.Close
m_Socket.Accept RequestID

Do
DoEvents
Loop Until m_Socket.State = sckConnected
RaiseEvent Connection(m_Socket.RemoteHostIP)
RaiseEvent Connected
End Sub

i opens an error here "m_socket.accept requestID" saying that "the descriptor is not a socket" Run-time error 10038...well my question is how i can solve this problem? is there a way to make it work like that? i mean call an event from the activex exe and then accept the request i another socket...it should have been working according to the code...but it's not...help
Reply With Quote
  #2  
Old 08-09-2002, 09:54 AM
ChiefRedBull's Avatar
ChiefRedBull"the descriptor is not a socket" Run-time error 10038 ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

An odd one this.. so you're raising an event from the A-EXE to the S-EXE, then passing it out to another A-EXE.

The only thing I can think of is that the RequestID is timing out somewhere.. or that there are thread issues to deal with. Maybe the RequestID is local to each thread, so passing it across thread boundaries nullifies it somehow..

From MSDN -
Quote:
WSAENOTSOCK (10038)
Socket operation on nonsocket.
An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.
Somewhere along the line the RequestID is losing it's value - put debug.print statements all over the place to check it.
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #3  
Old 08-09-2002, 10:01 AM
dta dta is offline
Junior Contributor
 
Join Date: Jul 2002
Posts: 263
Default

the value is not missed i checked it is in the accept...so it's not the value itself... but the value misses its descreptor i guess...so the question is there any way to pass the value with the descriptor in the standard exe without missing it an then back to another thread(AX_E) of another socket?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038 "the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
 
"the descriptor is not a socket" Run-time error 10038
"the descriptor is not a socket" Run-time error 10038
 
-->