Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a DLL to perform simple telnet

Status
Not open for further replies.

MrMango

Programmer
Feb 3, 2000
7
US
I am using a VB-like tool and I need to be able to do some basic telnet functions (connect, send and receive text, and close).&nbsp;&nbsp;There is no way to do this in the language I'm using, but it allows for the importation of procedures via DLLs.&nbsp;&nbsp;So, I'm wanting to write these in VC++ 6.0 and then import them into the program I'm using.&nbsp;&nbsp;Problem is, I haven't really written any C++ since v1.5 something, and even then I wasn't that good at it.&nbsp;&nbsp;So, does anyone have any suggestions on references I could that would be helpful or any recommendations on how to go about tackling this project?<br><br>Any help would be appreciated.<br><br>Thanks,<br>David
 
&gt; basic telnet functions (connect, send and receive text, and close).&nbsp;&nbsp;<br><br>Since no further criteria, specifications, limitations are mentioned I can only generalize about existing API's and Library routines/classes.<br><br>Here is a link to the Overview page of the Windows Socket 2 API<br><br><A HREF=" TARGET="_new"> in MFC there are the CAsynSocket and CSocket classes that encapsulate much of the Winsock API<br><br>Hope this helps<br>-pete
 
Here's a few more details...

I come from a UNIX (tcl/tk and perl) background. If I ever wanted to telnet to some equipment, those languages could do that. I could just open a socket and then read/write to them easily. Now, I'm needing to do that same thing from a Windows machine. I'm not using C/C++, though, I'm using a language called &quot;ATEasy&quot; developed for a company called &quot;Geotest&quot;. It only has the most basic winsock support and won't do what I want it to. So, my only viable option (that I can see) is to write the code to implement the telnet functions I need and compile them into a DLL and then import them into ATEasy. I have used C extensively (but not for networking) and have used C++ some... I'm have a dickens of a time trying to figure out how to create a DLL with MS VC++ 6.0.

Pete's link to the MSDN page on Windows Socket 2 was informative but not really what I needed. I haven't found very many resources explaining how to create DLLs with C++ and I just don't have enough experience with it to figure it out on my own.

Any more help would be appreciated.

Thanks,
David
 
Dear David,

> I'm have a dickens of a time trying to figure out how to create a DLL with MS VC++ 6.0.

Not sure if this is what you mean but select 'File' then 'New' from the VC menu. Now select the 'Projects' tab from the dialog. Now select 'MFC AppWizard (dll)' OR 'Win32 Dynamic-Link Library' from the list of available Project Types. Follow the wizard steps to complete the new project. The result is a fully functional DLL project.

Now you need to add the functions to the DLL. Do you know how to do that?

-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top