Re: Console redirected to COM1




>>Note that I am using COM1 for all boot messages and now want
>>to use it for the shell.

You can't share a single serial port for debug printing and
normal serial communications. You will need to disable
debug printing and load the serial driver for it.


>> [HKEY_LOCAL_MACHINE\init]
>> "Launch60"="Subproject1.exe"
>> "Depend60"=hex:14,00, 1e,00
>>
>> result = CreateProcess(TEXT("cmd.exe"), NULL, NULL, NULL, 0,
>> CREATE_NEW_CONSOLE, NULL, NULL, NULL, &new_cmd_exe);

This may be not enough. Note that your "Subproject1.exe" may
be executed before the serial driver has been loaded by the
device manager and thus the command shell will simply fail to
open the com handle ...


gissa wrote:
Using wince 6, I added the reg entries to redirect the console to COM1
and to run Subproject1 at boot. Now, Subproject1 will execute CMD

Here is the code!
result = CreateProcess(TEXT("cmd.exe"), NULL, NULL, NULL, 0,
CREATE_NEW_CONSOLE, NULL, NULL, NULL, &new_cmd_exe);


[HKEY_LOCAL_MACHINE\Drivers\Console]
"OutputTo"=dword:1
[HKEY_LOCAL_MACHINE\Drivers\Console]
"COMSpeed"=dword:5c3

[HKEY_LOCAL_MACHINE\init]
"Launch60"="Subproject1.exe"
"Depend60"=hex:14,00, 1e,00

This is what I get on boot on COM1. Note that I am using COM1 for all
boot messages and now want to use it for the shell. You can see below
how I got an invalid handle. Any help is appreciated

OSAXST1: >>> Loading Module 'coredll.dll' (0x83FEA4F8) at address
0x40010000-0x4
0085000 in Process 'cmd.exe' (0x83F34BE4)
OSAXST1: >>> Loading Module 'cmd.exe' (0x83F34BE4) at address
0x00010000-0x00026
000 in Process 'cmd.exe' (0x83F34BE4)
Heap Statistics at 0x40080740
Console redirected to COM1 for process 0xE50002
!!DecodeAPI: invalid handle! (h = ffffffff, iApiSet = 00000007 'NONE',
pActvProc
->dwId = 00e50002)
Invalid handle: Set=7 'W32H' Method=3
ObjectCall: returning 8027fbf0
OSAXST1: <<< Unloading Module 'coredll.dll' (0x83FEA4F8) at address
0x40010000-0
x40085000 in Process 'Subproject1.eConsole redirected to COM1 for
process 0xE700
02
!!DecodeAPI: invalid handle! (h = ffffffff, iApiSet = 00000007 'NONE',
pActvProc
->dwId = 00e70002)
Invalid handle: Set=7 'W32H' Method=3
ObjectCall: returning 8027fbf0
MessageBox - Customizeable
xe' (0x83F340C0)
OSAXST1: <<< Unloading Module 'coredll.dll' (0x83FEA4F8) at address
0x40010000-0
x40085000 in Process 'cmd.exe' (0x83F34BE4)
OSAXST1: <<< Unloading Module 'Subproject1.exe' (0x83F340C0) at address
0x000100
00-0x00013000 in Process 'Subproject1.exe' (0x83F340C0)
OSAXST1: <<< Unloading Module 'cmd.exe' (0x83F34BE4) at address
0x00010000-0x000
26000 in Process 'cmd.exe' (0x83F34BE4)

.



Relevant Pages

  • Re: shell variables
    ... the shell doesn't export ... Testing: HISTSIZE ... WARN: pxfgetenv, Invalid argument ...
    (comp.lang.fortran)
  • Re: root shell
    ... >was invalid. ... >some workaround for things like this? ... If a non-root user could change root's shell to an arbitrary value ...
    (comp.unix.solaris)
  • Re: handling perl string containing @ and $ with system function
    ... The simplest way would be to bypass the shell: ... perldoc -f system ... (remove .invalid and reverse each component for email address) ...
    (comp.lang.perl.misc)
  • rlogin TIOCFLUSH problems
    ... I am getting the following problem during rlogin sessions. ... it prints "ioctl TIOCFLUSH: Invalid arguments". ... Whenever I start a new shell, or exit from a shell, it just waits ...
    (comp.unix.solaris)
  • Re: How to know whether certain files was soft linked?
    ... then the link_a will be invalid. ... from the OS or shell. ... if any of them are a soft link to a. ... Chris Mattern ...
    (comp.unix.shell)