Create Extension DLL in windows mobile 5.0

Source: Internet
Author: User

Extension dll is often used when developing PC Desktop programs because it can export classes, which facilitates System Development and Integration. However, it is different from PC in PPC.
1. Create Extension DLL
File-> New-> Project-> MFC Smart Device Dll-> MFC extension Dll.
After the project is created, add a class, such
Class CTheDll: public CWnd
{
DECLARE_DYNAMIC (CTheDll)

Public:
CTheDll ();
Virtual ~ CTheDll ();

Protected:
DECLARE_MESSAGE_MAP ()
Public:
Int AddInteger (int a, int B); // adds a function and implements
};
Add AFX_EXT_CLASS before the class after implementing the new function. Changed:
Class AFX_EXT_CLASS CTheDll: public CWnd
{
DECLARE_DYNAMIC (CTheDll)

Public:
CTheDll ();
Virtual ~ CTheDll ();

Protected:
DECLARE_MESSAGE_MAP ()
Public:
Int AddInteger (int a, int B );
};
Compile after completion. Copy the compiled *. lib and *. H files to the test program folder.
Call AddInteger () in the test program ();
Now you can debug the program, and the test program compilation will not go wrong, but the runtime times "Unable to start pragma ....".
Upload the dllth to the file where the program .exe is located.
2. Differences:
On a PC, generally, the development program dynamically loads dll by default, while PPC is statically loaded by default, so the above problems will occur. If you don't want this problem, you must select use MFC in a shared Dll instead of use MFC in a static library during development.

Related Article

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.