locked
Windows Mobile 6.0.. service XXX_Init() is not getting called RRS feed

  • Question

  •  

    Hello,

     

    I'm developing one service for windows mobile 6.0 platform. i'm seeing the issue like my dll get loaded (at power up) and dll_main() get called 2 times. but somehow my service XXX_Init() is not being called at power up which i believe suppose to happen. and after that my dll get unloaded.

     

    I confirmed my reg entries has proper prefix and i'm using extern "c" also properly for exported function. Has any body seen this issue or can help me out how this can be debug to root cause why my XXX_Init() function is not being called.

    Or is there something supposed to be done in dllmain() like something related to security etc...

     

    Thankyou,

    Manish

    Tuesday, February 26, 2008 12:57 PM

Answers

  •  

    actually my service doesn't need XXX_IOControl() and looks like this also has to be implementaed by the dll module.

     

    Friday, February 29, 2008 11:21 AM

All replies

  • Hello,

     

    One issue i found i not sure but can be the issue... like i was using 6 letter prefix and i think it should be suppose to be 3 letter.

     

    i fix this problem still having the issue. When i call registerservice() it returns error code 1. i not sure but the XXX_Init() function exported properly confirmed by dumpbin. not sure why this is happening.

     

    Thankyou,

    Manish

     

    Wednesday, February 27, 2008 9:29 AM
  •  

    On most devices service modules need to be signed. Usually with a privileged certificate. You can test this on the emulator where you have access to SDK test certificates
    Wednesday, February 27, 2008 1:30 PM
  • if this is the case then dllmain itself also shouldn't get called.

     

    the other thing i like to add here when i call registerservice it returns error code 1.

     

    Wednesday, February 27, 2008 2:42 PM
  • Try using dumpbin to check that your exports are not mangled

     

    Wednesday, February 27, 2008 2:44 PM
  •  

    Yes i tried that(dumpbin) too.. it shows exported XXX_Init() properly...

     

    on top of this i myself call loadlibrary and getprocaddress of XXX_Init() and i successfully able to get the function pointer...

     

    Now I'm wondering why windows is not able to call same Init function.... Worse is they not log any error message like why they didn't load the service ....

    Friday, February 29, 2008 4:27 AM
  •  

    actually my service doesn't need XXX_IOControl() and looks like this also has to be implementaed by the dll module.

     

    Friday, February 29, 2008 11:21 AM