FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 16-bit DLL to 32-bit DLL
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
16-bit DLL to 32-bit DLL
Posted: Tue Jun 18, 2013 10:35 PM
I have a resource DLL which was created 2003 and it contains dialogs, bitmaps, cursors and icons
I can local this DLL into Borland Workshop.
The problem is that all ICON, BITMAP,CUR are visible in Workshop, but I don't have the files on disk for these resources. So when I "view resource as text" is shows the resource in binary form.

What I need is to convert this resource DLL into 32-bit or 64-bit DLL
Actually I would be happy if I can export all data into RC file from Borland Workshop. I can do that by "save as" and select some RC file. Then I get a huge RC file (about 7MB) with all graphic files as binary form definition, like this:
Code (fw): Select all Collapse
ADDNEW BITMAP LOADONCALL MOVEABLE 
{
 '42 4D 16 02 00 00 00 00 00 00 76 00 00 00 28 00'
 '00 00 1A 00 00 00 1A 00 00 00 01 00 04 00 00 00'
 '00 00 A0 01 00 00 00 00 00 00 00 00 00 00 00 00'
 '00 00 10 00 00 00 00 00 00 00 00 00 80 00 00 80'
 '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80'
 '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF'
 '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF'
 '00 00 FF FF FF 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 88 88 88 88 88 88 88 77'
 '77 77 77 00 00 00 77 77 88 88 88 88 88 88 88 77'
 '77 77 77 00 00 00 77 74 44 44 44 44 44 40 00 00'
 '77 77 77 00 00 00 77 74 BF BF BF BF BF B0 EE E0'
 '77 77 77 00 00 00 77 74 FB FB FB FB FB F0 EE E0'
 '77 77 77 00 00 00 77 74 BF BF BF BF BF B0 EE E0'
 '77 77 77 00 00 00 77 74 FB FB FB F0 00 00 EE E0'
 '00 00 77 00 00 00 77 74 BF BF BF B0 EE EE EE EE'
 'EE E0 77 00 00 00 77 74 FB FB FB F0 EE EE EE EE'
 'EE E0 77 00 00 00 77 74 BF BF BF B0 EE EE EE EE'
 'EE E0 77 00 00 00 77 74 FB FB FB F0 EE EE EE EE'
 'EE E0 77 00 00 00 77 74 BF BF BF B0 00 00 EE E0'
 '00 00 77 00 00 00 77 74 FB FB FB FB FB F0 EE E0'
 '77 77 77 00 00 00 77 74 BF BF BF B4 44 40 EE E0'
 '77 77 77 00 00 00 77 74 FB FB FB F4 FB 40 EE E0'
 '77 77 77 00 00 00 77 74 BF BF BF B4 B4 70 00 00'
 '77 77 77 00 00 00 77 74 FB FB FB F4 47 77 77 77'
 '77 77 77 00 00 00 77 74 44 44 44 44 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00 77 77 77 77 77 77 77 77 77 77'
 '77 77 77 00 00 00'
}

If I then try to import this RC file using Pelles C the error I get is
-------------------
Error reading from file "somefile.RC"
Not enough storage is available to complete this operation
--------------------

My question is, how can I use the data in this old DLL to create a 32-bit or 64-bit program, because the 32-bit or 64-bit program cannot use 16-bit DLL created 10+ years ago....

Any help/idea is apreciated
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: 16-bit DLL to 32-bit DLL
Posted: Tue Jun 18, 2013 10:46 PM

Codemaker:

Perhaps you can open your 16bits DLL using Pelles C, then FILE => SAVE AS ... to
export to .RC or .RES files.

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: 16-bit DLL to 32-bit DLL
Posted: Wed Jun 19, 2013 01:24 AM

http://forums.fivetechsupport.com/viewt ... its#p76597

CONVERT A 16b DLL TO 32b DLL using the 4.3 PellesC (Google traduction)

1 - Open the 16b Dll with Resource WorkShop
2 - Save as RC
3 - Open the newly created RC with PellesC
4 - On the PellesC menu: NEW, PROJECT WIZARD choose WIN32 DLL and put the name and PATH where it will be create
5 - Click OK, NEXT, FINISH
6 - In the tree on the right, right click, ADD FILES TO PROJECT (add the newly created RC)
7 - Click PROJECT, BUILD DLL32. Sub-folder will be created with this name and within this, the DLL32
8 - copy it to the appropriate directory of your program.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: 16-bit DLL to 32-bit DLL
Posted: Wed Jun 19, 2013 02:36 PM

Boris,

If you cannot succeed with the suggestions of our friends, try to send me the DLL and I'll see what I can do.

EMG

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: 16-bit DLL to 32-bit DLL
Posted: Wed Jun 19, 2013 03:03 PM
Boris

If I recall .. ( if you have BRW ) you can open your .dll and export all the images out to disk ( save resource as like Francisco mentions) .. then use your 32 bit editor and re-import them back in individually. I know that can be long and tedious work, but I do not know of any tool than can convert your 16 bit .dll to 32 bit. :-)

Rick Lipkin

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 16-bit DLL to 32-bit DLL
Posted: Wed Jun 19, 2013 08:28 PM

If there are a lot of bitmaps and icons to export, I think its relatively simple to parse the RC and get the bytes and create the output file.

I have not tested it myself, but if there are lots of files to export, it seems as a possible valid solution :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion