Solved

WinG and Borland C++

Posted on 1997-05-02
7
418 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
  • 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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