Compiling the resource file

Ok, now it is time to complile the resource file. First save the file in the same directory as your project. This file needs to have a .rc extension. I suggest you call it APW.RC. Do NOT give it the same name as your dll. If you do Delphi will overwrite it.

And I'm afraid folks, now it is time for some DOS. The program used to compile the resource is BRC.EXE and should be in your Delphi\Bin directory. Open a DOS box, and CD to the directory containing the APW.RC file. You will then need to execute this command:

c:\delphi\bin\brc -r apw.rc -foapw16.res

If your copy of Delphi is in another directory, change the command appropriately. After the resource has been compiled, you should have an APW16.RES file in the project directory.
You then need to compile a 32 bit resource. The command is similar; but the compiler is called brc32.exe and is in the Delhi32\bin directory.

c:\delphi32\bin\brc32 -r apw.rc -foapw32.res

Now all that is left is to add the resources to your project. So, back to Delphi, and click on the 'dlldemo' tab in the code window. (If it isn't there, choose View/Units). About half way through the code there is the line

{$R *.RES}

You can delete this line if your UCD doesn't use any forms, but leaving it there shouldn't cause any problems. You need to add these lines after that one:

{$ifdef WIN32}
     {$R apw32.res}
{$else}
     {$R apw16.res}
{$endif}

And thats it! Compile the project, load APW, start new file, load the functions and they will be listed just like a proper UCD.

on to: Creating the U32

back to: Creating the resource file          Start