Re: Service Auto Start Problems in PPC2003
From: Jeremy T. (JeremyT_at_discussions.microsoft.com)
Date: 11/16/04
- Next message: r_z_aret_at_pen_fact.com: "Re: Run an application directly after hardreset"
- Previous message: tgeyer: "Re: How do I transfer an .MDB file to the Pocket PC?"
- In reply to: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Next in thread: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Reply: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 10:03:01 -0800
The dll is definately in the windows dir. Yes it is PPC 2003 on a siemens
sx56 and hp 6132 I think is the number. The odd thing is, is a co-worker also
has a service but his will auto start we've compared our services and they
seem identical. The thing that is baffling to me is ActivateService works
which goes off the settings in the registry. Any input you have will help,
thanks.
"John Spaith [MS]" wrote:
> Hmm... this is very strange. Is your service DLL in the \windows directory,
> or is it by any chance on a storage card or on some other filesystem? It's
> possible that a storage card filesystem will be slow in starting up and that
> when services.exe initializes and tries to load your service, the underlying
> filesystem isn't around yet. When you ActivateService later on, then the
> filesystem is up.
>
> Also I want to confirm this is on a PocketPC 2003, correct? Some 3rd party
> guys managed to emulate services.exe on pre-2003 devices, and while I think
> that's very cool it's not something I can support :).
>
> --
> 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.
>
> "Jeremy T." <JeremyT@discussions.microsoft.com> wrote in message
> news:3577DF90-B304-4FBE-BCF1-829B73F29541@microsoft.com...
> >I cannot get my service to load automatically on startup. I can load it
> > manually using either registerservice or activateservice and I can
> > successfully unload it with deregister service. The service works great
> > when
> > I manually load it but not otherwise. Here is my basic service code
> > below:
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Close(DWORD dwData)
> > {
> > return 0;
> > }
> >
> > /**
> > * Required method by service. Called on destruction of the service.
> > */
> > extern "C" __declspec(dllexport) BOOL ADD_Deinit(DWORD dwData)
> > {
> > //basic unload code
> > return 1;
> > }
> >
> > /**
> > * Required method by service. Called on initialization of the service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Init(DWORD dwData)
> > {
> > //very minimal startup here
> > return 1;
> > }
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_IOControl(
> > DWORD dwData,
> > DWORD dwCode,
> > PBYTE pBufIn,
> > DWORD dwLenIn,
> > PBYTE pBufOut,
> > DWORD dwLenOut,
> > PDWORD pdwActualOut)
> > {
> >
> > return 1;
> > }
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Open(
> > DWORD dwData,
> > DWORD dwAccess,
> > DWORD dwShareMode)
> > {
> > return 0;
> > }
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Read(
> > DWORD dwData,
> > LPVOID pBuf,
> > DWORD dwLen)
> > {
> >
> > return 0;
> > }
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Seek(
> > DWORD dwData,
> > long pos,
> > DWORD type)
> > {
> >
> > return 0;
> > }
> >
> > /**
> > * Required method by service.
> > */
> > extern "C" __declspec(dllexport) DWORD ADD_Write(
> > DWORD dwData,
> > LPCVOID pInBuf,
> > DWORD dwInLen)
> > {
> >
> > return 0;
> > }
> >
> > Here is the basic registry settings that correspond:
> >
> > in HKEY_LOCAL_MACHINE\Services\MyService
> > DWORD Order = 10 (also tried it at 8)
> > DWORD Flags = 0
> > String Description = My Service
> > String Display Name = My ServiceName
> > DWORD Context = 0
> > DWORD Index = 0
> > String Prefix = ADD
> > DWORD Keep = 1
> > String Dll = My Service.dll
> > --
> > Jeremy T.
> > Software Engineer
>
>
>
- Next message: r_z_aret_at_pen_fact.com: "Re: Run an application directly after hardreset"
- Previous message: tgeyer: "Re: How do I transfer an .MDB file to the Pocket PC?"
- In reply to: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Next in thread: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Reply: John Spaith [MS]: "Re: Service Auto Start Problems in PPC2003"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|