Solved

16- vs 32-bit Winsocks

Posted on 1997-06-12
3
259 Views
Last Modified: 2013-12-04
I'm writing an Internet card game (16-bit in C) that can also be played "standalone," so I'm using LoadLibrary to load Winsock.dll.  To be sure I load the correct Winsock, I use GetModuleHandle and GetModuleFileName.  However, when I connect to the Internet using America Online for Win95 (32-bit), my app cannot find the Winsock.

Can my 16-bit app connect via a 32-bit Winsock?  If so, how do I find and hook into it?  (Or is this just an AOL thing?)  If not, what will I need to do to hook into the user's Winsock (besides doing a 32-bit build of my app)?

In short, how can I be certain to always find and connect through any user's Winsock, yet maintain the game's ability to be played by non-internet users?

Thanks!

Terry
0
Comment
Question by:sixstring
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1398226
Generic Thunks allow a 16-bit Windows-based application to load and call a Win32-based DLL on Windows NT and Windows 95. See MSDN or Visual C++ 32-bit Version documentations for more information.

The following generic thunking functions can be called by 16-bit Windows-based applications.
CallProc32W
CallProcEx32W
FreeLibrary32W
GetProcAddress32W
GetVDMPointer32W
LoadLibraryEx32W

0
 

Author Comment

by:sixstring
ID: 1398227
Chensu,

But how do I determine if they even have a Winsock loaded and which one it is?  

For example, I have multiple ISPs, plus AOL (16 and 32 bit) and Compuserve.  When I load a 16-bit Winsock, it shows up in the process list.  AOL32's does not.  How do I determine that AOL (or Dial-up Networking) is loaded and where its Winsock resides (since AOL's Winsock is not in the PATH, and GetModuleHandle can't find it)?

Thanks.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1398228
You can use Remote Access Service function RasEnumConnections to determine if Dial-up Networking is loaded. But for AOL or Compuserve, I am not sure if there is a standard way to do so. You have to search the directories for AOL's Winsock probably.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question