NO

Author Topic: Creating Pocket PC DLL  (Read 2490 times)

louis

  • Guest
Creating Pocket PC DLL
« on: September 28, 2008, 10:08:17 PM »
Hi, I want to create a DLL for Pocket PC but I am not sure how to get started, as the Wizard is only for WIN32 DLL creation. I want, for example, 2 functions to be exported.
int Add(int a, int b)
{
 return a+b;
}

int Subtract(int a, int b)
{
 return b-a;
}

How would I export per say those above functions for Pocket PC? And, are they coded right in C?
Thank you very much.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Creating Pocket PC DLL
« Reply #1 on: October 01, 2008, 12:00:35 PM »
The process is pretty much the same for Pocket PC and desktop Windows. You should be able to create a dummy Win32 project using the wizard, then create an empty Pocket PC DLL project ("WinCE Pocket PC Dynamic library"), and finally copy the files generated by the Win32 wizard into the Pocket PC project folder (and modify them as you like).

You may also want to replace the DllMain function from the wizard with this:
Code: [Select]
BOOL WINAPI DllInit(HANDLE hDLL, DWORD dwReason, LPVOID lpReserved)
{
    return TRUE;
}
/Pelle