Solved

WinG and Borland C++

Posted on 1997-05-02
7
425 Views
Last Modified: 2013-12-04
I've just recompiled my 16-bit WinG app with Borland C++. There's a
documented bug with WinG which insists that it is loaded before
Toolhelp.dll. I have successfully done this with Visual C++ 1.52, does
anyone know how to do it with Borland C++ 4.5?

I am building using a .ide file, I linked to wing.dll by adding wing.lib to the project manually using add node, toolhelp.dll appears to be linked automatically as part of the standard libraries.

Thanks
Nathaniel

0
Comment
Question by:than050297
[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
  • 5
  • 2
7 Comments
 
LVL 15

Expert Comment

by:NickRepin
ID: 1397075
Do you use .mak (make) or .ide (project expert) files?Do you link toolhelp.lib & wing.lib at compile-time or load toolhelp.dll and wing.dll at run-time?
0
 

Author Comment

by:than050297
ID: 1397076
Edited text of question
0
 
LVL 15

Accepted Solution

by:
NickRepin earned 200 total points
ID: 1397077
There is no toolhelp.lib in Borland's standard libraries. So compiler cannot (and does not) link automatically toolhelp.dll to your application.If you do not call toolhelp.dll in your program then there is no problem at all (according MS, problem exists if you use toolhelp.dll).You can check if compiler links toolhelp.lib by clicking 'Project->Generate makefile' and then searching for 'toolhelp.lib' in this file.
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 15

Expert Comment

by:NickRepin
ID: 1397078
If you find 'toolhelp.lib' in .mak file, please post this file as comments.
0
 

Author Comment

by:than050297
ID: 1397079
You're right - it does not link to toolhelp.lib. However, my program calls various toolhelp.dll functions including timeSetEvent, the Borland standard libraries must import toolhelp.dll so there is no need for toolhelp.lib. So the problem is reduced to one of linking to wing.lib before the standard libraries. Presumably the only way to do this is to edit the makefile manually?
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 1397080
timeSetEvent is exported by winmm.dll, not by toolhelp.dll.

It seems that you should not care about toolhelp.dll.

Here is a list of exported functions for  toolhelp.dll:

      CLASSFIRST                      
      CLASSNEXT                      
      GLOBALENTRYHANDLE              
      GLOBALENTRYMODULE              
      GLOBALFIRST                    
      GLOBALHANDLETOSEL              
      GLOBALINFO                      
      GLOBALNEXT                      
      INTERRUPTREGISTER              
      INTERRUPTUNREGISTER            
      LOCALFIRST                      
      LOCALINFO                      
      LOCALNEXT                      
      MEMMANINFO                      
      MEMORYREAD                      
      MEMORYWRITE                    
      MODULEFINDHANDLE                
      MODULEFINDNAME                  
      MODULEFIRST                    
      MODULENEXT                      
      NOTIFYREGISTER                  
      NOTIFYUNREGISTER                
      STACKTRACECSIPFIRST            
      STACKTRACEFIRST                
      STACKTRACENEXT                  
      SYSTEMHEAPINFO                  
      TASKFINDHANDLE                  
      TASKFIRST                      
      TASKGETCSIP                    
      TASKNEXT                        
      TASKSETCSIP                    
      TASKSWITCH                      
      TERMINATEAPP                    
      TIMERCOUNT                      
      WEP                            

0
 
LVL 15

Expert Comment

by:NickRepin
ID: 1397081
You can check this list by right-clicking on toolhelp.dll in explorer and then selecting 'Quick view' (for Win95/NT 4.0).

Toolhelp.dll is not documented by MS and Borland C does not link it.

Of course, you can manually change order of linking by editing makefile and then use make.exe instead of project manager to make project. But in my opinion there in no need to do so.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

728 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