Re: Mobile Service & Auto Start

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



87 is almost always invalid parameter (the standard Windows 87 error is
"invalid parameter"). You might have passed an invalid time to run, an
invalid name for the event to fire, etc. I don't think that Visual Studio
ever got it, but I could be wrong, but there is a tool called Error Lookup
that finds those standard Windows errors very nicely. You can find it in
eMbedded Visual C++, or you can install the C/C++ SDK for your target device
and search the header files every time you get such an error.

The only real registry reference is the documentation that comes to device
OEMs with Platform Builder, the configuration utility for building the
custom operating system for your device. MSDN might have some of the same
information and, if you search the archives of microsoft.public.windowsce.*
(all of the Windows CE groups), you can find specific answers to other
questions (where is the name of the wallpaper stored, etc.)

Paul T.

"Jeremy" <Jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7C71DE5A-EE6C-423C-BF17-5F3A541F92EA@xxxxxxxxxxxxxxxx
Great I see uses of CeRunAppAtTime and it seems like just what I need, now
I
just have to get it to work. I swear every time I need to use a pinvoke
call
I spend 3 days trying to find info on the errors I recieve from it. Does
anyone know where to find some info on these errors?

I get error code 87 trying to call that.

As for the registry, thanks, that looks just like what I was looking for.
Do
you know any good references for the windows ce registry!

10000000 Thanks, you have helped me out a ton!!!





"Paul G. Tobey [eMVP]" wrote:

Your Windows knowledge of the registry is completely useless in Windows
CE.
It's not the same operating system; the registry keys are, almost without
exception, in different places. You're looking for HKLM/Init and the
various entries under it.

Top level windows are enumerated by the running programs list, not
processes. If you have no visible top-level window, you don't show in
that
list; if you do, you do.

Paul T.

"Jeremy" <Jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:363060E5-F6D4-445A-B146-759F8FDECF9D@xxxxxxxxxxxxxxxx
thanks that is helpful, it s the windows CE registry documentation I
suppose
I am really looking for (have been looking) I know where the keys are
to
autorun apps in windows but I dont see matching keys in ce. The app
itself
will just read a file for the list, then move around files accordingly,
so
that should work just as a regular app that just executes first right?

As for the service I could have sworn I tried just threading an app,
but
that app would show up in the memory list so people could just stop it.
I
am
looking at a backup app that I have on my pda that has a scheduled
service
in
it and say you set every night to backup the device, it does not show
in
the
memory list of apps but it still runs every night. What would they be
doing?

"Paul G. Tobey [eMVP]" wrote:

Well, there's not going to be a how-to-replace-pim.vol sample floating
around. Nothing you are doing there is very complex. You'll need the
registry documentation for the case of adding your application to the
registry in an Init key to run it early in the process. Note that you
can't
read any list from a filesystem until that filesystem is mounted which
might
very easily happen after your application runs. Not something you
have
to
worry about on the desktop PC.

I don't see any reason to implement this as a service. Windows
desktop
services and Windows CE services are not alike at all in terms of
implementation. They might be used for similar things (the Web server
on
Windows CE runs as a service), but that's about it. Windows CE
service
docs
would be found in MSDN, of course. I'd just write a regular old
application
in C# which P/Invokes to CeRunAppAtTime() to set up to trigger an
event
at a
given time. Create a thread in the application, or use the main
thread,
to
wait on that event with WaitForSingleObject(). When it fires, do
whatever.

Paul T.

"Jeremy" <Jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F980F72E-DBAD-4B3D-AFB8-C723EE9FF3DB@xxxxxxxxxxxxxxxx
Thanks for the direction, do you know of any good resources for
developing
such applications. I would be setting the system to reboot via a dot
net
UI,
and pretty much set a list of files that need to be put in place one
of
which
being th pim.vol. So all the app would need to do is before those
other
apps
take control of the files it would read that list of files and put
them
where
they belong.

As for the service I just want to say have a custom schedule where
the
system will read a couple db values and check a value on a web
service
say
once a day then it would do a bunch of stuff.

I have written windows services so I thought I could do it all in a
service
but I dont see any Project templates for creating such an app
(service
or
driver) for windows mobile using either C# or C++. Any suggestions
on
how
to
get started.

Thanks!

"Paul G. Tobey [eMVP]" wrote:

Forget about managed code for this. You have a need to run very
early
in
the boot process, before managed code programs can run, in fact.
Write
it
in C++. You're also going to have to start before the mail API to
have
any
chance to access that file before the main programs on the device
do.
You
might accomplish this with a driver, or a service, which are pretty
much
the
same thing, that waits for the object store to become available and
immediately does the delete. It's still going to be in a race with
the
real
owner of the file, but I think that you should be able to get in
there
and
delete it.

There's no such thing as a "scheduled service", but an application
that
runs
on startup and does not display any user interface can still call
CeRunAppAtTime() to set an event at a given time. If the
application
then
calls WaitForSingleObject() on the event which will fire at that
time,
the
Wait call will return at (or around), the target time and the
application
can do what it wants. A service could also do this, I suppose, but
not
knowing what you want to do at that time or the run/stop
characteristics
of
your "service", I can't say whether making it a service has any
benefit.

Paul T.

"Jeremy" <Jeremy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E18696A9-C155-4B4E-A9F7-645C6E623870@xxxxxxxxxxxxxxxx
I am trying to create a mobile application that starts when the
device
is
turned on so that it can access files that are normally locked.
Has
anyone
seen or know anything about creating something similar to a
windows
service
for the compact framework?

I need to overwrite the pim.vol and some other vols and cant get
access
to
them, if you simply know how to free up access to those that
would
help.

I also need to almost have something like a scheduled service and
I
dont
see
anything like that out there but I notice on my ipaq there are
services
that
you cannot stop using the memory manager so I figure it must be
capable
somehow.

Thank you very much in advance











.



Relevant Pages

  • Re: OT: Win 7 comments
    ... then that is a huge weakness of Windows. ... I do not know a single app which has broken because the OS supplied Print ... The registry is a monolithic whole. ... reinstalling the missing files, not by changing the registry at all. ...
    (comp.sys.mac.advocacy)
  • Re: Honestly Curious
    ... vendors to get the Windows logo on their packaging and marketing ... Microsoft themselves don't properly use the registry. ... it's a Windows app. ... About as bad as a registry-dependent package on Windows. ...
    (comp.sys.mac.advocacy)
  • Re: Mobile Service & Auto Start
    ... Great I see uses of CeRunAppAtTime and it seems like just what I need, ... As for the registry, thanks, that looks just like what I was looking for. ... Top level windows are enumerated by the running programs list, ... The app itself ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Honestly Curious
    ... This is not a real-world problem, but I give you points for being creative enough to try and dream up an excuse for my moving an app *might* be a bad thing somehow. ... The registry however is the method Microsoft not only recommends for applications to use, but they require it for vendors to get the Windows logo on their packaging and marketing material. ...
    (comp.sys.mac.advocacy)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)