?
Solved

WinG and Borland C++

Posted on 1997-05-02
7
Medium Priority
?
426 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 600 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 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