Solved

WinG and Borland C++

Posted on 1997-05-02
7
422 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 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