Solved

16- vs 32-bit Winsocks

Posted on 1997-06-12
3
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 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