windows CE (HOW TO?)

未分类 , , , , , 发表评论

Q: Does CE support java ,Macro media flash and PDF view ?
A:
Java: only java script,it does not include java virtual machine (3rd party support)
Pocket word: Yes.
PDF view: Yes.
Macro mediaFlash: 3rd party support

Q: How to verify OS image with or without PID?
A:
use : viewbin -t nk.bin

if it shows :
ROMHDR Extensions ——
PID[0] = 0x00000000
PID[1] = 0x00000000
PID[2] = 0x00000000
PID[3] = 0x00000000
PID[4] = 0x00000000
PID[5] = 0x00000000
PID[6] = 0x00000000
PID[7] = 0x00000000
PID[8] = 0x00000000
PID[9] = 0x00000000
Means this nk.bin without PID.

Q: WinCE 一how to auto start or execute an application on Power on ?
A:
add:
/FILES/ PLATFORM.BIB
FILES
sampleprogram.exe $(_FLATRELEASEDIR)/sampleprogram.exe NK S

Add in platform.dat
Directory(“/Windows/StartUp”):-File(“sampleprogram.exe”,”/Windows/sampleprogram.exe”)
In Platform.reg add:
[HKEY_LOCAL_MACHINE/init]
“Launchxx”=”sampleprogram.exe”
“Dependxx”=hex:1e,00
xx- will depend on BSP implementations.

Q: How to hide desktop icon
A:
Mask this registry.
;[HKEY_LOCAL_MACHINE/Explorer/Desktop]
;”{……..}”=”My Computer”
;”{……..}”=”Recycle Bin”

Q: How to hide start bar
A:
Set this registry.
[HKEY_LOCAL_MACHINE/Software/Microsoft/Shell/AutoHide]
@=” “
Name: (Default)
Type: REG_SZ (String Value)
Value: (0 = disabled, 1 = enabled)
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Shell/OnTop]
@=””
Name: (Default)
Type: REG_SZ (String Value)
Value: (0 = disabled, 1 = enabled)

Q: How to check that you have installed QFE.
A:
Check it with ceqfecheck.exe

Q:how do you set static IP.
A:
[HKEY_LOCAL_MACHINE/Comm/NE20001/Parms/Tcpip]
“EnableDHCP”=dword:0
“DefaultGateway”=””
“UseZeroBroadcast”=dword:0
“IpAddress”=”195.168.33.222”
“Subnetmask”=”255.255.0.0”

Q: how do you set IE start page.
A:
[HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Main]
“Start Page”=”http://ujagga.blogspot.com/

Q: How to use unalignment memory.
A:
#pragma pack(1)
typedef struct
{
CHAR syncbytes[7];
ULONG imgaddr;
ULONG imglen;
} IMGHDR, *PIMGHDR;
//unaligned
typedef UNALIGNED IMGHDR unlIMGHDR;
typedef UNALIGNED PIMGHDR unlPIMGHDR;

Q: How to bypass all warning.
A: Use compiler option – /W, /w(Set Warning Level.)
Warning Level Description
/w Turns off all warning messages. Use this option when you compile
programs that deliberately include questionable statements. The /w
option applies to the remainder of the command line, or applies until
the next occurrence of a /w option on the command line. /W and /W0
are the same as /w.
/W1 Default. Displays severe warning messages.
/W2 Displays an intermediate level of warning messages. Level 2 includes
warnings such as the following:
• Use of functions with no declared return type
• Failure to put return statements in functions with non-void
return types
• Data conversions that would cause loss of data or precision
/W3 Displays a less severe level of warning messages, including warnings
about function calls that precede their function prototypes in the source
code.
/W4 Displays the least severe level of warning messages, including
warnings about the use of non-ANSI features and extended keywords.
/WX Treats all warnings as errors. If there are any warning messages, the
compiler generates an error message, and continues compilation.

Q: Don’t show suspend button in start menu.
A:
Set the registry key in platform.reg.
; @CESYSGEN IF CE_MODULES_GWES
; This registry setting eables the Explorer’s suspend menu button
; Emulator does not currently support suspend
[HKEY_LOCAL_MACHINE/Explorer]
“Suspend”=dword:0
; @CESYSGEN ENDIF CE_MODULES_GWES

Q: How to change bin to nb0.
A:
Cvrtbin.exe is command-line tool. Converts read-only memory (ROM) files from
binary (.bin) format to SRE or NBX (.nb0) format.

Q: How to simulate KeyDown and KeyUP.
A:
#include //keybd_event need to include file
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
unsigned char c;
for(c=’A’;c<=’Z’;c++)
{
keybd_event (c, 0, 0, 0); //Key down
//keybd event (virtual-key code, scan code, key type, extern)
keybd_event(c, 0,KEYEVENTF_KEYUP,0); //Key up
//keybd event (virtual-key code, scan code, key type, extern)
}
return 0;
}

Q: How to modify wallpaper.
A:
Replace the WindowsCE.bmp file.
[HKEY_CURRENT_USER/ControlPanel/Desktop]
“wallpaper”=//Windows//WindowsCE.bmp

Q: Auto enable keyboard “NumLock” key when OS boot up.
A:
Write an AP to execute when OS boot up.
keybd_event(VK_NUMLOCK, 0, 0, 0);
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0);

Q: How to auto run the program when card plug in.
A:
1. Use the API to build up a execute file.
#include
#include
#include
void wmain(void)
{
CeRunAppAtEvent(_T(“//windows//touch.exe”),
NOTIFICATION_EVENT_DEVICE_CHANGE);
}
Parameter one is launch APP and two is Card detect even.
2. Launch the execute file to notify the information to OS when launch the
notified APP after OS boot up.
3. OS will auto run the APP after card plug in.
ps. The way can’t launch APP in Card because the program will launch APP
when card plug in before mount.

发表评论

邮箱地址不会被公开。 必填项已用*标注

昵称 *