Create resource DLL

Source: Internet
Author: User
Resource Creation DLL When creating a multi-language version of the software, it is very meaningful to make resource DLL of different languages and implement different language versions by switching the DLL. Generally, DLL starts from the dllmain () function. When creating a resource DLL, you can not use the dllmain () function. 1. Select Win32 dynameic ~ Link Library
  2. Create an empty project and insert the resource. 3. Set the Project LINK option and set no entry function for the DLL, OK!

4. Usage: # include "../ResDLL/resource. H" Void crdlltestdlg: onbutton1 (){ Handle hdll; Hrsrc hres; Hexe = loadlibrary (".. // ResDLL. dll "); If (Hexe = NULL) { Afxmessagebox ("cocould not load DLL ."); } Char buff [1000] = "/0 "; Int r =: loadstring (struct hinstance _ *) hdll, ids_str, buff, 255 ); Afxmessagebox (buff ); // Clean up. If (! Freelibrary (struct hinstance _ *) hdll )) { Afxmessagebox ("cocould not free DLL ."); } }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.