Re: running a service/driver/application upon startup



Hi John,

Thanks again for your help. I am unable to use the debugger because the
debug version of the image is too large to load onto the device. I tried
attaching to the services.exe app to debug the dll, but the debugger
requires an exe file.

WRT your other suggestions:

I ran dumpbin/exports on the finger dll and saw the required function names:


1 0 000010E2 FIN_Close
2 1 0000109A FIN_Deinit
3 2 000010E6 FIN_IOControl
4 3 0000103E FIN_Init
5 4 000010DE FIN_Open

I took your advice and copied the dll to the device and ran the command
services load finger (I also tried fingerserver)

and got an "operation failed" message with error code 0x6e (110), which is
an open failure.

Again, my registry values for the ...\services\finger key are

DLL FINGER.DLL
Order 9
Keep 1
Prefix FIN
Index 0

I experimented with the DLL value by putting various pathnames. Nothing
seems to work.

I did write a skeletal app which successfully loaded the dll by calling
LoadLibrary("finger.dll"). Interestingly, it was unable to load the
telnetd.dll which services loads, even after I unloaded it. The error code
was 1114 (ERROR_DLL_INIT_FAILED).

Thanks again for your help. If you can suggest anything else I'd appreciate
it.

Verne

"John Spaith [MS]" <jspaith@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OiXmUVP1FHA.3864@xxxxxxxxxxxxxxxxxxxxxxx
> The .pdb and .rel files are only needed for debugging. If you have a
fully
> debug version of CE, the best bet is to run it, hook it up to Platform
> Builder, and turn on full debugzones for services.exe. This may help
> pinpoint the issue very quickly. You can also turn on the loader debug
> zones (I think this is via the process nk.exe debugzones) to get tons of
> detailed information.
>
> I would also try running, from a "build" window on your XP host (in PB 5.0
> it's in Build Os->Open Release Directory, not sure if it's the same on CE
> 4.1). Then run 'link /dump /exports fingerserver.dll'. You should see
> something like FIN_Init, FIN_DeInit, and FIN_IOControl - those are the 3
> required exports.
>
> Also try setting DLL name equal to the full path of your service DLL.
>
> Another common error is that your fingerServer.def file itself needs to
have
> "LIBRARY FingerServer" or something like that in it. I've seen people
where
> they have something like "LIBRARY
> NameOfOldDllICopiedAndPastedThisDefFileFrom" and this will compile but the
> linker won't handle it.
>
> You can avoid constantly having to reboot the device to test different
> theories as to why it's not getting loaded but just doing 'services load
> Finger". That's the same code path (almost) as in system startup.
>
> --
> John Spaith
> Software Design Engineer, Windows CE
> Microsoft Corporation
>

"John Spaith [MS]" <jspaith@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:OiXmUVP1FHA.3864@xxxxxxxxxxxxxxxxxxxxxxx
> The .pdb and .rel files are only needed for debugging. If you have a
fully
> debug version of CE, the best bet is to run it, hook it up to Platform
> Builder, and turn on full debugzones for services.exe. This may help
> pinpoint the issue very quickly. You can also turn on the loader debug
> zones (I think this is via the process nk.exe debugzones) to get tons of
> detailed information.
>
> I would also try running, from a "build" window on your XP host (in PB 5.0
> it's in Build Os->Open Release Directory, not sure if it's the same on CE
> 4.1). Then run 'link /dump /exports fingerserver.dll'. You should see
> something like FIN_Init, FIN_DeInit, and FIN_IOControl - those are the 3
> required exports.
>
> Also try setting DLL name equal to the full path of your service DLL.
>
> Another common error is that your fingerServer.def file itself needs to
have
> "LIBRARY FingerServer" or something like that in it. I've seen people
where
> they have something like "LIBRARY
> NameOfOldDllICopiedAndPastedThisDefFileFrom" and this will compile but the
> linker won't handle it.
>
> You can avoid constantly having to reboot the device to test different
> theories as to why it's not getting loaded but just doing 'services load
> Finger". That's the same code path (almost) as in system startup.
>
> --
> John Spaith
> Software Design Engineer, Windows CE
> Microsoft Corporation
>
> Check out the new CE Networking Team Blog at http://blogs.msdn.com/cenet/.
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. © 2003 Microsoft Corporation. All rights
> reserved.
>
> "vernon hyde" <vhyde@xxxxxxxxxxxxxxx> wrote in message
> news:O3TXwhO1FHA.1132@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi John,
> >
> > Thanks for your help. I still can't get it to work, but the problem
> > appears
> > to be something more basic, because I can't load the dll even when it is
> > part of the image.
> >
> > I'm new to CE, so it might be something really obvious. I noticed that
> > the
> > other services store map, pdb, and rel files in the release directory.
> > Are
> > they necessary?
> >
> > My registry settings are as follows:
> >
> > ...\Services\FINGER
> >
> > DLL fingerserver.dll
> > Order 9
> > Keep 1
> > Prefix FIN
> > Index 0
> >
> > Any help you or anyone else out there can provide for a frustrated
novice
> > would be greatly appreciated.
> >
> > Thanks again, Verne
> >
> >
>
>


.



Relevant Pages

  • Re: running a service/driver/application upon startup
    ... Would it be possible for you to drop a debug services.exe and debug nk.exe ... > I ran dumpbin/exports on the finger dll and saw the required function ... >> theories as to why it's not getting loaded but just doing 'services load ...
    (microsoft.public.windowsce.embedded)
  • Re: loading symbols for unmanaged C++ DLL called by C#
    ... I have a VS2005 solution with an unmanaged C++ DLL being called by a C# ... exclamation mark and the error "The module did not load at the default ... I am running in debug mode for both projects. ... this help doc: ...
    (microsoft.public.vsnet.debugging)
  • Re: Debugging question
    ... It is a managed DLL, but I don't reference it, I load it at ... Obviously the LoadFrompoints to a DLL on the smart device, ... its debug information will be loaded from the PC ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: VS2008 DLL not loading
    ... Why would it be trying to load a nondebug DLL? ... "Phil Wilson" wrote: ... In VS2005 both the release and debug versions of the DLL loaded fine (at ...
    (microsoft.public.vsnet.debugging)
  • Re: Fail to load debug version of a DLL
    ... that the abovementioned DLL failed to load. ... versions of it (debug and release) with DependencyWalker, ... what are the main reasons for a DLL to fail to load? ...
    (microsoft.public.vc.mfc)