Fastest way to convert a 16bit DLL with Bitmaps

Fastest way to convert a 16bit DLL with Bitmaps

Postby MichaelMo » Fri May 15, 2009 6:42 pm

It has taken me awhile to convert some "funcky" library routines which I had been using into pure Harbour/Fivewin code, but that seems to have gone pretty smoothly compared to my process of converting the DLL screen files and bitmaps to 32 bit.

Evidently the Fivewin conversion program doesn't like my 16 bit bitmaps. I'm trying to figure out the "easiest/fastest" way to convert my screens and bitmaps without going through the code itself to load bitmaps from the hard disk. I'd be willing to include the DLL's as a resource file and put it into the EXE file as well. If however that isn't feasible, I can of course load the bitmaps from the drive, but that will require me going through a lot of PRG files.

I'm willing to buy some additional software from Borland or another C-complier if that is helpful. Any suggestions on the best way to accomplish this DLL/Bitmap conversion?
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby Antonio Linares » Sat May 16, 2009 8:27 am

Michael,

1. Export to a RC file from your 16 bits DLL, using a tool like Borland Resources Workshop.

2. If you have embedded bitmaps in your RC file, is advisable to export them as external BMP files.

3. Use FWH\DLL\rc2dll32.bat to create your 32 bits DLL from the RC file.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby MichaelMo » Mon May 18, 2009 4:56 pm

When I convert the original DLL file to an ascii RC file, and attempt to convert it, I get the following message:

----------------------------------------------------------------------------------------
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.

c:\FWH\dll>c:\bcc55\bin\ilink32 /Tpd c:\bcc55\lib\c0d32.obj screen32.obj, ocw.dll
l,,c:\bc55\lib\cw32.lib c:\bcc55\lib\import32.lib,, ocw.res
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Access violation. Link terminated.
Warning: Unable to perform incremental link - performing full link...
Fatal: Access violation. Link terminated.


c:\FWH\dll>del *.i*

c:\FWH\dll>del *.map
Could Not Find c:\FWH\dll\*.map

c:\FWH\dll>del *.obj

c:\FWH\dll>del *.res

c:\FWH\dll>del *.tds

c:\FWH\dll>echo done!
done!

c:\FWH\dll>
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby MichaelMo » Mon May 18, 2009 5:08 pm

Is there a way to simply include the RC file in the compile? I'm using EUStudio and I've simply added all my PRG files to a project and and it's been compiling the prg files for me in Harbour. I've not even bothered to build a separate MAKE file.
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby MichaelMo » Mon May 18, 2009 11:54 pm

Hmm. I took a *MUCH* older copy of my original DLL file and I was able to convert that file just fine as well as some other dll files I have been using. I'm starting to think there is some kind of corruption on the original DLL file I was trying to convert, or some problem created when it's converting the newer copy of the dll file.
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby Antonio Linares » Tue May 19, 2009 4:35 am

Michael,

have you checked if the old DLL has the same info inside as the more recent one ?

Same amount of bitmaps, etc. ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fastest way to convert a 16bit DLL with Bitmaps

Postby MichaelMo » Wed May 20, 2009 5:05 pm

There are differences in both the number of bitmaps and screens in the older DLL and the newer one. The "clue" here is that I cannot export the newer DLL file to a RC format and read it back in again using exactly the same tool (16 bit Borland Resource workshop). There is definitely some corruption on the newer DLL file.

I'm having trouble at the moment getting the dialog boxes to come up even with older DLL converted to 32 bits. I've opened the converted 32 bit DLL file in Pelles and I can see the resources for the dialog boxes, bitmaps and icons now. The bitmaps seem to load at least to the toolbar. However, I keep getting the following error message when I try to open any sort of dialog box:

Application
===========
Path and name: C:\32Bit\OCW\Debug\ocw.EXE (32 bits)
Size: 5,165,056 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 05/20/09, 10:03:41
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: ABOUT

Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(558)
Called from: => TDIALOG:ACTIVATE(290)
Called from: C:\32Bit\OCW\MENU.PRG => ABOUT(1093)
MichaelMo
 
Posts: 55
Joined: Thu Feb 15, 2007 1:35 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests