ie8 fix

Windows 95/98 forum: Getting Thumped trying to Thunk

by: dbaechtel April 9, 2008 5:14 PM PDT

Like this

0 people like this thread

Staff pick

Getting Thumped trying to Thunk

by dbaechtel - 4/9/08 5:14 PM

:confused: Getting Thumped trying to Thunk.

I have a Legacy 16-bit application that generates Lessons for Education. The Lessons generated need to run on school computers from Windows 98 through Windows XP. These Lessons also need to exchange information with remote servers using XMLHTTP. I have 32-bit DLLs that can do the data exchange using XMLHTTP tested out OK. I need to be able to exchange integer values, strings and status between the 16-bit Lessons and the 32-bit DLLs. The Legacy 16-bit Lessons can link with 16-bit DLLs. I have tested this and it works OK. But the 16-bit Lessons are not able to link to 32-bit DLLs directly.

The plan is to build 16-bit DLLs that link with the 16-bit Lessons and then use flat thunks between the 16-bit DLLs and 32-bit DLLs to get the communication functions that are needed. I am using the methods described in KB154093 "How To Call 32-bit Code from 16-bit Code Under Windows 95, Windows 98, or Windows Millennium Edition" in building the 16-bit DLLs, thunking script and 32-bit DLLs.

Quite a bit of information is missing. There does not seem to be any documentation on thunk.exe, the thunking compiler. There does not seem to be any documentation on the thunking script language. The formats for the integer and other variable types changed between the 16-bit and 32-bit DLLs. I am not sure what data format the thunk script is using in its declarations.

I am using VC++ 1.52 to build the 16-bit DLLs. I am using VC++ 6.0 to build the 32-bit DLLs. I am using thunk.exe, rc.exe and ml.exe found in the Win98 DDK to build the flat thunk as instructed. I have scraped up enough information on the web to build the DLLs and the flat thunk. It compiles and links OK but any information received by the 16 bit DLL from the 32 bit DLL appears to be corrupted by the flat thunk. I can not send constants as int, WORD, DWORD, LONG or LPSTR from the 32 bit DLL to the 16 bit DLL. ALL values from the 32 bit DLL seem to be corrupted no matter the data type. I am not yet able to test data from the 16-bit DLL to the 32-bit DLL until I can get the correct data returned. I am trying very simple and straight forward tests.

I am building and running these components on a Windows XP Professional system for testing.

Does anyone know why this method described in the KB article does not work?
Does anyone know how to exchange data between 16-bit DLLs and 32 Bit DLLs that will work on Win98 through WinXP systems?
Does flat thunks as described not work on WinXP systems?
Does anyone know where I can find documentation on the thunk.exe and thunking script?

I greatly appreciate any assistance.

Forum Icon Legend

  • UnreadUnread
  • ReadRead
  • Locked threadLocked thread
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  • ModeratorModerator
  • CNET StaffCNET Staff
  • Samsung StaffSamsung Staff
  • Norton Authorized Support TeamNorton Authorized Support Team
  • AVG StaffAVG Staff
  • avast! Staffavast! Staff
  • Webroot Support TeamWebroot Support Team
  • Acer Customer Experience TeamAcer Customer Experience Team
  • Windows Outreach TeamWindows Outreach Team
  • DISH staffDISH staff
  • Dell StaffDell Staff
  • Intel StaffIntel Staff
  • QuestionQuestion
  • Resolved questionResolved question
  • General discussionGeneral discussion
  • TipTip
  • Alert or warningAlert or warning
  • PraisePraise
  • RantRant

You are e-mailing the following post: Post Subject

Your e-mail address is used only to let the recipient know who sent the e-mail and in case of transmission error. Neither your address nor the recipient's address will be used for any other purpose.

Sorry, there was a problem emailing this post. Please try again.

Submit Email Cancel

Thank you. Sent email to

Close

Thank you. Sent email to

Close

You are reporting the following post: Post Subject

If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.

Offensive: Sexually explicit or offensive language

Spam: Advertisements or commercial links

Disruptive posting: Flaming or offending other users

Illegal activities: Promote cracked software, or other illegal content

Sorry, there was a problem submitting your post. Please try again.

Submit Report Cancel

Your message has been submitted and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.

Close

Your message has been submitted and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.

Close

You are posting a reply to: Post Subject

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to the CNET Forums policies for details. All submitted content is subject to CBS Interactive Site Terms of Use.

You are currently tracking this discussion. Click here to manage your tracked discussions.

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

Sorry, there was a problem submitting your post. Please try again.

Sorry, there was a problem generating the preview. Please try again.

Duplicate posts are not allowed in the forums. Please edit your post and submit again.

Submit Reply Preview Cancel

Thank you, , your post has been submitted and will appear on our site shortly.

Close