Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534

    Resource Only DLL

    I have tried several resource editors but have not found exactly what I'm looking for just yet. I am trying to build a resource-only DLL and then call the resources in AMS.

    Anyone know any good programs for creating the DLL? XN Resource Editor lets me create res and dcr files but I'm having trouble compiling them with Dev C++. Any pointers to relevant articles about this would be great. I spent hours searching through erroneous information and, as yet, haven't had success with finding helpful and clear info on how to create DLLs from res files.

    Also, how are the resources called? I have spent a while reading about RO DLLs and can't quite peg the call procedure. Is it just LoadImage() or LoadModule()? How does this works?

    After about a week of working with this problem I figured it might not be a bad idea to ask for some tips.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  2. #2
    Join Date
    May 2006
    Posts
    1,443
    How To Build A Resource Dll With Dev-C++ :
    • Open Dev-C++
    • From Main Menu : File -> New -> Project
    • On New Project Dialog : Select DLL And Save Your New Project
    • From Main Menu : File -> New -> Resource File
    • Rename Your Resource File Like MyResource ( do not use Resource as resource file name)
    • Open dll.h And Put This #define IDI_ICON1 100 After #define _DLL_H_
    • Open your MyResource.rc And Put This #include "dll.h"
    • Place An Icon File In To Your Project Directory , For Example : MyIcon.ico
    • Put This IDI_ICON1 ICON "MyIcon.ico" In To MyResource.rc
    • If You Did Above Correctly Press To Build Button From ToolBar
    • If You Will Get Some Compiler Errors Then Restart Dev-C++ And Build Project Again
    • Create An Empty AMS Project And Put An Instance Of Icon Object Plugin To Page Area
    • Copy OutPut Dll From Your Dev-C++ Project Directory And Paste In To Docs Folder Of Your AMS Project
    • Put This To On Show Event Of Your AMS Project
    • Icon.LoadEx("Plugin1", _SourceFolder.."\\AutoPlay\\Docs\\Project1.dll", "IDI_ICON1", 32, false);
    • Do Not Forget To Replace Dll Name With Yours
    • And PreView Your AMS Project
    • Good Luck

    I Can Show Some Tips Later For Loading Resources From WithIn AMS

  3. #3
    Join Date
    Sep 2005
    Posts
    87
    Hi reteset,

    I have been trying to call a function (in AMS 7.5) from a DLL made in C++ (Borland Delphi) in another posting thread. Can you help? So far, no success.

    http://www.indigorose.com/forums/sho...3&goto=newpost

    Regarding a tool to write C++ DLL's: while I suspect that the Dev-C++ may be a far better choice, the VisualStudio 2008 C++ edition is available for free at the Microsoft developer site. (I don't have the skills needed to successfully use it, but I think it can generate Win 32 DLL's in C++ (unmanaged code).

    Kind Regards,

    SGW
    Last edited by SGW; 08-17-2009 at 04:30 PM.

  4. #4
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Thank you reteset! That was very informative. Now if I want to use an image would I just change IDI_ICON1 ICON "MyIcon.ico" to IDI_IMAGE1 IMAGE "MyImage.jpg" for all instances?
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  5. #5
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    I used to include resources in DLL's using PureBasic's resource system. Centauri, you've got purebasic right? Do you know how to generate/create *.rc resource scripts? It allows you to include files in your dll.

    This is a nice way reteset, thank you
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  6. #6
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Yes, I have PureBasic. I think I can generate those scripts with XN Resource Editor. Are you saying to compile the scripts with PureBasic?
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  7. #7
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by Centauri Soldier View Post
    Yes, I have PureBasic. I think I can generate those scripts with XN Resource Editor. Are you saying to compile the scripts with PureBasic?
    Yes, Compiler > Compiler options > Resources You can browse and add resource scripts and afterwards compile it as DLL (without any script).

    If you get any bugs while you're compiling, message me, I might know the reason (happend to me plenty of times before)
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts