Thread: Getting resources from another program.

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Question Getting resources from another program.

    The script in "warkres.dll" would be:

    Code:
     int main() 
    {
      MessageBox( 0,
    					"Wark Resources",
    					"THIS IS A RESORCE PROGRAM!\nLeave allone, open with \"Wark.exe\".",
    				   MB_ICONWARNING );
      return 0;
    }
    Then I would have a lot of bmp and wav resources.

    And I want my "real" program get those resources from it.

    How can I, I have no clue.

    Help appreciated, August.

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Step 1) LoadLibrary
    Step 2) FindResource
    Step 3) LoadResource
    Step 4) LockResource

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Okay, I've got the following:
    Code:
    HINSTANCE hExecLib;
    hExecLib = LoadLibrary(TEXT("warkres.dll"));
    PlaySound("JMPSND", hExecLib, SND_ASYNC | SND_RESOURCE);
    And it works, but now how can I enum the resources in "warkres.dll"?
    Thanks, August.

  4. #4
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  2. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  3. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  4. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM