|
-
Nov 22nd, 2005, 10:04 AM
#1
Thread Starter
New Member
Need help with passing socket to dos application
hi 
I need help to pass socket to a dos application ..
here is my problem:
For the moment I use a telnet server, called telsrv. I use this to launch my bbs program (pcboard) its a dos application. with telsrv I can a fossil driver before pcboard because pcboard using serial comport to communicate, so the fossil driver (netfoss) emulate this and all is working fine at this point. telsrv call netfoss when it etablished connection by passing it the handle and the node number.
Then, I've decided to make my own telnet server with vb6.
So, I try to make something like telsrv basic, I listening port 23 and when connection is etablished, after connect() is accepted I call the batch file to launch netfoss like that:
shell("c:\nf.bat" /n1 /h" & winsock.sockethandle, vbnormal)
/n is to pass node number to netfoss and /h is to pass the handle it is called exactly like that with telsrv. the command line in telsrv is: c:\nf.bat /n*N /h*H
where *N is the macro string telsrv use to pass the node number and *H is the macro string to pass the handle
But the problem is netfoss return an error: Nagel disable failed
The doc of netfoss doesnt report this kind of error, but the creator itself of netfoss told me telsrv duplicating his socket handle before passing it and netfoss could return this error because he doesnt find the handle, or can't access it.
So I miss something in my code, but what ? if someone can give me example of code to duplicate the handle or have any idea how to fix that it will be very appreciated
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|