Re: HKLM\Init and MFC Application (further clarification)
- From: "Chris Tacke, eMVP" <ctacke@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Jun 2005 16:58:47 -0400
Have you tried getting the Init keys to launch some other app? Try
something like "control.exe" to launch the control panel at order 90, just
to see if it's working.
--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
"Jay Daniel" <theinitialJandthenthenameDaniel@xxxxxxxx> wrote in message
news:6544786A-C0BB-46CA-8379-5D7456487C37@xxxxxxxxxxxxxxxx
> Paul,
>
> Well thanks at least for giving it some thought. I agree that Brian's
> idea is probably correct about the 50 was not found message. As far as
> using
> a PB support call, I'm still running the evaluation version (I only
> started
> looking at this project about 2 months ago). As such, I only get a call
> for
> "installation issues." Perhaps I'll just have my company pony-up for a
> paid
> call or something of the like.
>
> Also, I don't know if it triggers any more possible ideas for you, but
> the
> last time I tried this, I told the PB debugger to continue running again
> after the DEBUGCHK failure and a messagebox appears that says "MyMFCTest
> is
> not a valid windows ce application." I don't know if that's more
> information, or just what gets displayed when there's an error loading an
> exe.
> --
> Jay Daniel
>
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> Yes, I'm not surprised that it shows as 'read only' in the image, since
>> it's
>> presumably in nk.bin. I'm out of ideas. You could use one of the
>> support
>> requests that comes with PB and see if MS support can get you an answer.
>>
>> I think that Brian might very well be right about the 50 not found error
>> coming from MFC trying to open it as a file name. Don't forget to call
>> SignalStarted() with that value...
>>
>> Paul T.
>>
>> "Jay Daniel" <theinitialJandthenthenameDaniel@xxxxxxxx> wrote in message
>> news:59B8B173-2009-4ADE-9560-B80555530884@xxxxxxxxxxxxxxxx
>> > Paul,
>> >
>> > The application is certainly not read-only on my PC in the flat
>> > release
>> > directory. When I use "My Device" on the emulator, however, the
>> > properties
>> > show it as read only. Also, I am given an error message when I try to
>> > remove
>> > that property. This doesn't really surprise me though, since the
>> > emulator
>> > is
>> > treating this as though it were flash, correct? Isn't that what XIP
>> > means?
>> > That it doesn't need to load it into ram, but just executes it
>> > "in-place?"
>> >
>> > --
>> > Jay Daniel
>> >
>> >
>> > "Paul G. Tobey [eMVP]" wrote:
>> >
>> >> I don't know what the heck is going on there. Is the EXE read-only by
>> >> some
>> >> strange chance?
>> >>
>> >> Paul T.
>> >>
>> >> "Jay Daniel" <theinitialJandthenthenameDaniel@xxxxxxxx> wrote in
>> >> message
>> >> news:BB5AE6FA-B4B9-4E8C-AF5D-6E3AF9B0E23E@xxxxxxxxxxxxxxxx
>> >> > Paul,
>> >> >
>> >> > Here's what I did to try it some other way. I just deleted the
>> >> > MyMFCShell
>> >> > project in PB altogether. I modified the project.bib file in PB and
>> >> > added
>> >> > this line:
>> >> >
>> >> > MODULES
>> >> > MyMFCShell.exe "c:\somedir\MyMFCShell.exe" NK
>> >> >
>> >> > With my registry entries removed (and everything re-sysgened), I
>> >> > boot
>> >> > up
>> >> > into explorer. Then I go to the windows folder via my device and
>> >> > have
>> >> > it
>> >> > show all the files there. Double-clicking on MyMFCShell.exe then
>> >> > leads
>> >> > back
>> >> > to the DEBUGCHK failure I mentioned about paging in from
>> >> > uncompressed
>> >> > R/O
>> >> > module.
>> >> >
>> >> > Next, I changed the .bib file line to:
>> >> >
>> >> > MyMFCShell.exe "c:\somedir\MyMFCShell.exe" NK C
>> >> >
>> >> > since the message had something to do with compression. This time,
>> >> > PB
>> >> > prompts me for the directory in which it can find the executable.
>> >> > When
>> >> > I
>> >> > supply it, the application runs correctly.
>> >> >
>> >> > As far as the registry entry, I've used the remote registry editor
>> >> > on
>> >> > the
>> >> > device and noted that my "Launch50" entry was really there. Perhaps
>> >> > the
>> >> > problem I was having had something to do with PB needing to prompt
>> >> > me
>> >> > for
>> >> > the
>> >> > location of the executable?
>> >> >
>> >> > I'm still bewildered, but appreciative of your help so far. Thanks
>> >> > again.
>> >> > --
>> >> > Jay Daniel
>> >> >
>> >> >
>> >> > "Paul G. Tobey [eMVP]" wrote:
>> >> >
>> >> >> Can you run the program some other way after the unit has booted
>> >> >> fully,
>> >> >> just
>> >> >> to be sure it works?
>> >> >>
>> >> >> The 50 not found thing sounds like some other Init item is
>> >> >> dependent
>> >> >> on
>> >> >> 50,
>> >> >> but there's no 50 in the registry. I assume, since it looks like
>> >> >> the
>> >> >> program is starting, that you've checked reginit.ini to verify that
>> >> >> the
>> >> >> entry is present (and that your hardware is using the default
>> >> >> registry)...
>> >> >>
>> >> >> Paul T.
>> >> >>
>> >> >> "Jay Daniel" <theinitialJandthenthenameDaniel@xxxxxxxx> wrote in
>> >> >> message
>> >> >> news:4B55D333-233B-48CA-9668-51B32D7A05BF@xxxxxxxxxxxxxxxx
>> >> >> > Paul,
>> >> >> >
>> >> >> > Thanks for the advice. I actually DO compile the program in
>> >> >> > EVC.
>> >> >> > The
>> >> >> > project I created in PB, I specified as "NOTARGET" so it
>> >> >> > basically
>> >> >> > just
>> >> >> > exists to copy the application from my EVC build directory as
>> >> >> > well
>> >> >> > as
>> >> >> > the
>> >> >> > .reg file into the flat release directory. Also as I mentioned,
>> >> >> > I
>> >> >> > have
>> >> >> > tried
>> >> >> > both with an without adding it to the modules section of the .bib
>> >> >> > file
>> >> >> > for
>> >> >> > that notarget project without success in either case.
>> >> >> >
>> >> >> > I agree that the problem with it failing from PageInFromROM
>> >> >> > could
>> >> >> > have
>> >> >> > something to do with the MFC dll, but I'm not sure how the "50
>> >> >> > was
>> >> >> > not
>> >> >> > found"
>> >> >> > error could be. I'm signalling to the kernel that the
>> >> >> > application
>> >> >> > was
>> >> >> > started by calling an API function ::SignalStarted, so I would
>> >> >> > think
>> >> >> > the
>> >> >> > MFC
>> >> >> > dll wouldn't be involved in that.
>> >> >> >
>> >> >> > Any other possible suggestions?
>> >> >> >
>> >> >> > --
>> >> >> > Jay Daniel
>> >> >> >
>> >> >> >
>> >> >> > "Paul G. Tobey [eMVP]" wrote:
>> >> >> >
>> >> >> >> You might try compiling your MFC application with eVC, not PB,
>> >> >> >> and
>> >> >> >> just
>> >> >> >> add
>> >> >> >> it to your Project.bib or whatever to put it into the OS. This
>> >> >> >> also
>> >> >> >> might
>> >> >> >> be a problem with the MFC DLL (I assume you're using the MFC as
>> >> >> >> a
>> >> >> >> DLL
>> >> >> >> right?), rather than your application itself.
>> >> >> >>
>> >> >> >> Paul T.
>> >> >> >>
>> >> >> >> "Jay Daniel" <theinitialJandthenthenameDaniel@xxxxxxxx> wrote in
>> >> >> >> message
>> >> >> >> news:2D1B7C8A-7A06-4A3C-8DDA-77A62B69F166@xxxxxxxxxxxxxxxx
>> >> >> >> > My apologies... I left out some details from my question which
>> >> >> >> > (in
>> >> >> >> > retrospect) might be somewhat important.
>> >> >> >> >
>> >> >> >> > As it was generated, the MyMFCShell project from platform
>> >> >> >> > builder
>> >> >> >> > didn't
>> >> >> >> > work right for me. For some reason, when the system tried to
>> >> >> >> > run
>> >> >> >> > MyMFCShell.exe, I would get a DEBUGCHK failure in the
>> >> >> >> > "PageInFromROM"
>> >> >> >> > function in loader.c. The message was: "Paging in from
>> >> >> >> > uncompressed
>> >> >> >> > R/O
>> >> >> >> > page
>> >> >> >> > from XIP module -- should've never happened."
>> >> >> >> >
>> >> >> >> > If I REMOVE the entry for MyMFCShell.exe from the .bib file,
>> >> >> >> > then
>> >> >> >> > I
>> >> >> >> > get
>> >> >> >> > to
>> >> >> >> > where I was mentioning before (50 was not found messagebox).
>> >> >> >> > Alternatively, if I add a "C" qualified to the .bib file for
>> >> >> >> > this
>> >> >> >> > module,
>> >> >> >> > I
>> >> >> >> > aso get to the 50 was not found message.
>> >> >> >> >
>> >> >> >> > I don't know if that information will be useful for figuring
>> >> >> >> > out
>> >> >> >> > what's
>> >> >> >> > going on, but I'm completely without any more ideas. Again...
>> >> >> >> > thanks
>> >> >> >> > for
>> >> >> >> > any
>> >> >> >> > help.
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Jay Daniel
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Jay Daniel" wrote:
>> >> >> >> >
>> >> >> >> >> I'm new to Windows CE development, so I apologize if I'm
>> >> >> >> >> overlooking
>> >> >> >> >> some
>> >> >> >> >> very obvious things, but I'm having some difficulty in my
>> >> >> >> >> initial
>> >> >> >> >> attempts at
>> >> >> >> >> customizing a WinCE OS image.
>> >> >> >> >>
>> >> >> >> >> I'm using WinCE 5.0 and Platform Builder as well as EVC++
>> >> >> >> >> 4.0SP4.
>> >> >> >> >> What
>> >> >> >> >> I've
>> >> >> >> >> done is create an MFC application in EVC. I'm trying to use
>> >> >> >> >> this
>> >> >> >> >> as a
>> >> >> >> >> shell
>> >> >> >> >> replacement instead of explorer.exe since ultimately I'll be
>> >> >> >> >> making
>> >> >> >> >> a
>> >> >> >> >> dedicated HMI device.
>> >> >> >> >>
>> >> >> >> >> I created a new platform in Platform Builder and added the
>> >> >> >> >> options
>> >> >> >> >> I'd
>> >> >> >> >> need
>> >> >> >> >> for my app (standard SDK, MFC, etc.). I've used this to
>> >> >> >> >> create
>> >> >> >> >> and
>> >> >> >> >> export an
>> >> >> >> >> SDK for EVC which is what I built my MFC application against.
>> >> >> >> >> That
>> >> >> >> >> builds
>> >> >> >> >> and runs on the emulator from EVC.
>> >> >> >> >>
>> >> >> >> >> Next, I created a new project called MyMFCShell in platform
>> >> >> >> >> builder.
>> >> >> >> >> I
>> >> >> >> >> modified the sources file and changed targettype to
>> >> >> >> >> "NOTARGET."
>> >> >> >> >> I
>> >> >> >> >> created a
>> >> >> >> >> MyMFCShell.reg file as follows:
>> >> >> >> >>
>> >> >> >> >> IF IMGMFCSHELL
>> >> >> >> >> [HKEY_LOCAL_MACHINE\Init]
>> >> >> >> >> "Launch50"="MyMFCShell.exe"
>> >> >> >> >> "Depend50"=hex:14,00,1e,00
>> >> >> >> >> ENDIF
>> >> >> >> >>
>> >> >> >> >> Finally, I changed postlink.bat to copy the executable from
>> >> >> >> >> my
>> >> >> >> >> evc
>> >> >> >> >> output
>> >> >> >> >> directory to the flat release directory, along with the .reg
>> >> >> >> >> file.
>> >> >> >> >>
>> >> >> >> >> At startup, I see the kernel launching the application, but
>> >> >> >> >> instead
>> >> >> >> >> of
>> >> >> >> >> coming up properly, I see a message box that says "50 was not
>> >> >> >> >> found."
>> >> >> >> >> Note
>> >> >> >> >> that I DO call ::SignalStarted(_wtol(m_lpCmLine)) from
>> >> >> >> >> InitInstance()
>> >> >> >> >> in
>> >> >> >> >> MyMFCShell. Also, if I change the launch key from Launch50
>> >> >> >> >> to
>> >> >> >> >> Launch99
>> >> >> >> >> say,
>> >> >> >> >> the message box says "99 not found." I've even tried calling
>> >> >> >> >> SignalStarted(50) directly in case the command line was
>> >> >> >> >> somehow
>> >> >> >> >> getting
>> >> >> >> >> messed up by some default behavior in CWinApp, but to no
>> >> >> >> >> avail.
>> >> >> >> >>
>> >> >> >> >> Any help would be greatly appreciated.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Jay Daniel
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
.
- Follow-Ups:
- Re: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- Re: HKLM\Init and MFC Application (further clarification)
- References:
- HKLM\Init and MFC Application
- From: Jay Daniel
- RE: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- Re: HKLM\Init and MFC Application (further clarification)
- From: Paul G. Tobey [eMVP]
- Re: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- Re: HKLM\Init and MFC Application (further clarification)
- From: Paul G. Tobey [eMVP]
- Re: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- Re: HKLM\Init and MFC Application (further clarification)
- From: Paul G. Tobey [eMVP]
- Re: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- Re: HKLM\Init and MFC Application (further clarification)
- From: Paul G. Tobey [eMVP]
- Re: HKLM\Init and MFC Application (further clarification)
- From: Jay Daniel
- HKLM\Init and MFC Application
- Prev by Date: RE: RDP Registry Settings
- Next by Date: Further Attempts
- Previous by thread: Re: HKLM\Init and MFC Application (further clarification)
- Next by thread: Re: HKLM\Init and MFC Application (further clarification)
- Index(es):
Relevant Pages
|