Solved

16- vs 32-bit Winsocks

Posted on 1997-06-12
3
232 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now