Hey Guys
Im trying to update my Wallaby ( Gradiente Partner - Brazil) ROM with special edition ROM, but adaptrom trow a message "unsupperted language PTB". This because my ROM is a PPC 2002 in Portuguese Brasillian. So i picked up the source code of adaptrom to work on it. Installed pocket pc 2002 sdk, open the project and modified the includes and lib directories. But when i compile , i got these errors
rror LNK2019: unresolved external symbol [email protected] referenced in function _main
adaptrom.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _main
Generaly they happen when utilizing a diferent libraries and/or target builds.
Someone could help-me on create a development enviroment to compile the source code?. im using Visual studio 2005 Express beta.
It's seems DllMain won't run when a dll loaded by LoadLibrary in wm5.0.
The dll is very simple,complied by vs 2005 beta2,just a MessageBox in dllmain
I load this dll in another process,using the api loadlibrary,In windows mobile 5.0 ppc emulator,no dialog box appear,but you can see that dll.dll had been loaded with remote file viewer.In Pocket PC 2003 SE emulator,every thing is ok
anybody has any idea about it?
Thanks
dll.cpp
#include "stdafx.h"
#include <windows.h>
#include <commctrl.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
MessageBox(NULL,L"11",L"22",0);
return TRUE;
}
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
psneddon said:
Hi,
There is no default entry point in a DLL. You are doing everything fine except you need to load the module (function) you want to call. I cant remember off hand the details but its LoadModule.
Look thought the documentation for calling a function in a dll some more.
Paul
Click to expand...
Click to collapse
Thanks for your reply.
I don't want to call any function,excep the default entry point DllMain when loading library.
There should be default entry point in the dll I complied,because in wm2003,everything is ok(Messagebox appears when loading or unloading library)
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
oh right. Maybe I'm wrong - i always thought DLL's didnt have default entry points - I need to get reading the SDK's more
Paul
mamaich said:
DllMain worked in my programs in 2K5. Maybe your messagebox appears behind today window? I never tried MessageBox in DLLs, but CreateFile worked fine.
Click to expand...
Click to collapse
hi mamaich,what device are you using?Emulator?
I've tried in another way:return TRUE or FALSE in DllMain,then check whether the dll is loaded with remote process viewer.
In wm5.0 emulator,DllMain's return value is ingored,the dll is always loaded.And in wm2003 emulator,dll can be loaded only if DllMain's return value is TRUE
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
mamaich said:
I've compiled the DLL with eVC4 and run it on XDA2 with WM5. That DLL was a part of a rather large project.
Maybe VS2005 produces incorrect DLLs?
Click to expand...
Click to collapse
The dll should be ok,it works well on ppc2003's emulator.I have also tried the dll produced by evc4.0.
Seems it's my fault,I got it work on wm emulator now
Thanks for all
I found it,dllmain not run just because the dll export no function.after add a not used fuction,MessageBox appear when loading
Linux on Universal. NEW NEW Install is now very simple!!!
Hi All!
Can anybody inform me about:
- Who is working on linux port on Universal?
- Which is the status of the kernel development now?
- When will we see a linux boot on this hardware?
- How can we help to complete the porting project?
I tracked rencently the wiki Universal pages, but the progress
page shows a 'Coming soon' message for a long time.
****
Moderator edit
NEW NEW NEW. Install linux without any knowledge or Linux PC :
http://forum.xda-developers.com/showthread.php?p=1680178#post1680178
Just follow the instructions in post #1739 on page 174 by goxboxlive
-----------------------------------------------------------------
Old news below
New versions can be downloaded here http://www.linuxtogo.org/~htcpxa/
Go to http://www.handhelds.org/moin/moin.cgi/Universal for a How-To install or
http://wiki.xda-developers.com/index.php?pagename=Universal_Installing_Linux
----
We have made a common mailing list for the HTC PXA phone's.
Subscribe to Htc-pxa at https://www.handhelds.org/mailman/listinfo/htc-pxa
****
Yes :`)
Please .... informations ....
Re: Linux on Universal
pasztorl said:
- Who is working on linux port on Universal?
Click to expand...
Click to collapse
The hardware information is gathered here in wiki.
The CVS branch for universal is at http://sf.net/projects/xanadux
There is a #htc-blueangel irc channel, where
you can discuss any HTC phone, since they
have a lot in common.
- Which is the status of the kernel development now?
Click to expand...
Click to collapse
Not all necessary hardware information
is found out, see wiki for details.
I have written some basic kernel patches to support the LCD and ASIC3, but this kernel
doesn't boot. I 'll commit the changes to CVS.
- When will we see a linux boot on this hardware?
Click to expand...
Click to collapse
Good question.
- How can we help to complete the porting project?
Click to expand...
Click to collapse
There are many open issues, so it depends
on what you can/want to do.
Re: Linux on Universal
There are many open issues, so it depends
on what you can/want to do.
Click to expand...
Click to collapse
Sorry, but I am not a kernel hacker, so I can't help to solve kernel
level problems. But I already made some embedded systems
with linux. I would like help to make a distribution for this hardware.
I know I can do that now, because linux can run in other pdas,
but I have only an Universal (this is my first pda), so I would like
to test my developement, and it is not possilbe until I dont't have
a running kernel on it.
Re: Linux on Universal
There are many open issues, so it depends
on what you can/want to do.
Click to expand...
Click to collapse
I seen in the wiki, the universal hardware shared with the Motorola E780. What does it mean exactly?
Is it a big help on development?
Re: Linux on Universal
pasztorl said:
I seen in the wiki, the universal hardware shared with the Motorola E780. What does it mean exactly?
Is it a big help on development?
Click to expand...
Click to collapse
Motorola A780. It includes some drivers that are not available elsewhere.
Like the camera drivers. A780 also uses USB host for communicating with the GSM/UMTS processor. The CVS kernel for universal boots, but the LCD is
not initialized properly, and that can damage your hardware (it switches on the white flashlight LED for some reason). There is no serial cable, so the kernel must be debugged
over IR, and this code is not working yet.
Re: Linux on Universal
cr2 said:
pasztorl said:
I seen in the wiki, the universal hardware shared with the Motorola E780. What does it mean exactly?
Is it a big help on development?
Click to expand...
Click to collapse
Motorola A780. It includes some drivers that are not available elsewhere.
Like the camera drivers. A780 also uses USB host for communicating with the GSM/UMTS processor. The CVS kernel for universal boots, but the LCD is
not initialized properly, and that can damage your hardware (it switches on the white flashlight LED for some reason). There is no serial cable, so the kernel must be debugged
over IR, and this code is not working yet.
Click to expand...
Click to collapse
Thx for the info!
Can You start the UniversalProgress page on the wiki?
What does it mean 'can damage your hardware'? Damage
the LCD or the flashlight LED?
Can You post the precompiled working kernel, and explain how we are test it?
What is the driver status at now? (working / not working hardware components)
I'll be glad to switch to linux on my universal... the sooner the better !
I already moved to linux on my desktop PC since a few years now, and I cant stand beeing enforced to launch windows to sync my handheld (I was used to sync my clié with no hassle, but unfortunately, it died, and palm OS seems to soon become memories )
So if any help is needed, and I can help, I'll be glad to.
Re: Linux on Universal
pasztorl said:
Can You start the UniversalProgress page on the wiki?
Click to expand...
Click to collapse
http://wiki.xda-developers.com/index.php?pagename=UniversalProgress
What does it mean 'can damage your hardware'? Damage
the LCD or the flashlight LED?
Click to expand...
Click to collapse
I want that both are initialized properly.
Can You post the precompiled working kernel, and explain how we are test it?
Click to expand...
Click to collapse
There is no "working" kernel. If you really know what you are doing, compile one
from the xanadux CVS (-un0 branch). And don't blame me for the destroyed hardware
What is the driver status at now? (working / not working hardware components)
Click to expand...
Click to collapse
The CPU, RAM and IR are working.
Don't know about the rest.
Re: Linux on Universal
cr2 said:
http://wiki.xda-developers.com/index.php?pagename=UniversalProgress
Click to expand...
Click to collapse
Thx!
There is no "working" kernel. If you really know what you are doing, compile one
from the xanadux CVS (-un0 branch). And don't blame me for the destroyed hardware
Click to expand...
Click to collapse
I checked out this branch yesterday and my result was:
LD arch/arm/mach-pxa/built-in.o
arch/arm/mach-pxa/pxa27x.o: In function `get_clk_frequency_khz'xa27x.c.text+0x0): multiple definition of `get_clk_frequency_khz'
arch/arm/mach-pxa/pxa25x.oxa25x.c.text+0x0): first defined here
arm-linux-ld: Warning: size of symbol `get_clk_frequency_khz' changed from 428 in arch/arm/mach-pxa/pxa25x.o to 536 in arch/arm/mach-pxa/pxa27x.o
arch/arm/mach-pxa/pxa27x.o: In function `get_memclk_frequency_10khz'xa27x.c.text+0x218): multiple definition of `get_memclk_frequency_10khz'
arch/arm/mach-pxa/pxa25x.oxa25x.c.text+0x1ac): first defined here
arm-linux-ld: Warning: size of symbol `get_memclk_frequency_10khz' changed from 64 in arch/arm/mach-pxa/pxa25x.o to 132 in arch/arm/mach-pxa/pxa27x.o
arch/arm/mach-pxa/pxa27x.o: In function `get_lcdclk_frequency_10khz'xa27x.c.text+0x29c): multiple definition of `get_lcdclk_frequency_10khz'
arch/arm/mach-pxa/pxa25x.oxa25x.c.text+0x1ec): first defined here
arm-linux-ld: Warning: size of symbol `get_lcdclk_frequency_10khz' changed from 20 in arch/arm/mach-pxa/pxa25x.o to 84 in arch/arm/mach-pxa/pxa27x.o
make[1]: *** [arch/arm/mach-pxa/built-in.o] Error 1
make: *** [arch/arm/mach-pxa] Error 2
(emDebian gcc4 cross compiling tools)
Re: Linux on Universal
pasztorl said:
arch/arm/mach-pxa/pxa27x.o: In function `get_clk_frequency_khz'xa27x.c.text+0x0): multiple definition of `get_clk_frequency_khz'
arch/arm/mach-pxa/pxa25x.oxa25x.c.text+0x0): first defined here
arm-linux-ld: Warning: size of symbol `get_clk_frequency_khz' changed from 428 in arch/arm/mach-pxa/pxa25x.o to 536 in arch/arm/mach-pxa/pxa27x.o
Click to expand...
Click to collapse
You are not supposed to compile the support for PXA25X and PXA27X CPU at the same time (i will consider it as a bug in the config system).
Start configuring the kernel with
arch/arm/configs/htcuniversal_defconfig
Use haret from the Blueangel pages.
In the startup.txt
set MTYPE 855
and use
console=ttyS2
for the console on your pda IR port.
Do not run irda on your host system, remove all the irda modules
and use raw serial port.
The framebuffer is not working yet (the driver was written by lkcl, i have not yet looked into it).
Re: Linux on Universal
cr2 said:
You are not supposed to compile the support for PXA25X and PXA27X CPU at the same time (i will consider it as a bug in the config system).
Start configuring the kernel with
arch/arm/configs/htcuniversal_defconfig
Use haret from the Blueangel pages.
In the startup.txt
set MTYPE 855
and use
console=ttyS2
for the console on your pda IR port.
Do not run irda on your host system, remove all the irda modules
and use raw serial port.
The framebuffer is not working yet (the driver was written by lkcl, i have not yet looked into it).
Click to expand...
Click to collapse
Thanks!
Another problem:
origo /home/pasztorl/xda/linux-2.6-xda# cp arch/arm/configs/htcuniversal_defconfig .config
cp: felülírja `.config'-t? y
origo /home/pasztorl/xda/linux-2.6-xda# make clean
origo /home/pasztorl/xda/linux-2.6-xda# make
CHK include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
arch/arm/mach-pxa/Kconfig:45: can't open file "arch/arm/mach-pxa/generic/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** [include/linux/autoconf.h] Error 2
origo /home/pasztorl/xda/linux-2.6-xda#
Re: Linux on Universal
pasztorl said:
arch/arm/mach-pxa/Kconfig:45: can't open file "arch/arm/mach-pxa/generic/Kconfig"
Click to expand...
Click to collapse
Remove this line 45 from arch/arm/mach-pxa/Kconfig. There is
no arch/arm/mach-pxa/generic/ here in my tree. Must be some stray commit
by somebody else.
interesting....
Re: Linux on Universal
cr2 said:
Remove this line 45 from arch/arm/mach-pxa/Kconfig. There is
no arch/arm/mach-pxa/generic/ here in my tree. Must be some stray commit
by somebody else.
Click to expand...
Click to collapse
After removing I get this error:
drivers/mmc/asic3_mmc.c: In function 'mmc_irq':
drivers/mmc/asic3_mmc.c:672: error: invalid storage class for function 'hwinit2_irqsafe'
drivers/mmc/asic3_mmc.c:676: warning: implicit declaration of function 'hwinit2_irqsafe'
drivers/mmc/asic3_mmc.c: In function 'mmc_get_ro':
drivers/mmc/asic3_mmc.c:811: warning: unused variable 'host'
drivers/mmc/asic3_mmc.c: At top level:
drivers/mmc/asic3_mmc.c:828: warning: conflicting types for 'hwinit2_irqsafe'
drivers/mmc/asic3_mmc.c:828: error: static declaration of 'hwinit2_irqsafe' follows non-static declaration
drivers/mmc/asic3_mmc.c:676: error: previous implicit declaration of 'hwinit2_irqsafe' was here
make[2]: *** [drivers/mmc/asic3_mmc.o] Error 1
make[1]: *** [drivers/mmc] Error 2
Re: Linux on Universal
pasztorl said:
After removing I get this error:
Click to expand...
Click to collapse
The SD/MMC driver is not working (but it is easy to fix).
Make menuconfig, and remove it from compilation.
Re: Linux on Universal
cr2 said:
The SD/MMC driver is not working (but it is easy to fix).
Make menuconfig, and remove it from compilation.
Click to expand...
Click to collapse
After disabling SD/MMC support compilation fails at this point:
CC drivers/serial/pxa.o
In file included from include/asm/proc-fns.h:166,
from include/asm/system.h:94,
from include/asm/bitops.h:22,
from include/linux/bitops.h:77,
from include/linux/thread_info.h:20,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from drivers/serial/pxa.c:33:
include/asm/cpu-single.h:44: warning: type qualifiers ignored on function return type
In file included from include/linux/kernel.h:17,
from include/linux/spinlock.h:13,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from drivers/serial/pxa.c:33:
include/asm/bug.h:8: warning: type qualifiers ignored on function return type
drivers/serial/pxa.c:768: error: initializer element is not constant
drivers/serial/pxa.c:768: error: (near initialization for 'serial_pxa_ports[0].port.mapbase')
drivers/serial/pxa.c:782: error: initializer element is not constant
drivers/serial/pxa.c:782: error: (near initialization for 'serial_pxa_ports[1].port.mapbase')
drivers/serial/pxa.c:796: error: initializer element is not constant
drivers/serial/pxa.c:796: error: (near initialization for 'serial_pxa_ports[2].port.mapbase')
drivers/serial/pxa.c:810: error: initializer element is not constant
drivers/serial/pxa.c:810: error: (near initialization for 'serial_pxa_ports[3].port.mapbase')
make[2]: *** [drivers/serial/pxa.o] Error 1
make[1]: *** [drivers/serial] Error 2
make: *** [drivers] Error 2
Re: Linux on Universal
pasztorl said:
After disabling SD/MMC support compilation fails at this point:
Click to expand...
Click to collapse
I have fixed the MMC/SD driver, so it compiles now, but have not tested if
it really works.
CC drivers/serial/pxa.o
Click to expand...
Click to collapse
Didn't see such error. I am using the precompiled toolchain from handhelds.org.
I will try to make a clean CVS checkout and try again.
Re: Linux on Universal
cr2 said:
I will try to make a clean CVS checkout and try again.
Click to expand...
Click to collapse
Didn't have any problem to compile.
Re: Linux on Universal
cr2 said:
cr2 said:
I will try to make a clean CVS checkout and try again.
Click to expand...
Click to collapse
Didn't have any problem to compile.
Click to expand...
Click to collapse
Ok, I get successful result with gcc 3.4.1 ( with gcc 4.0 kernel not compiled )
Hi,
I've been porting a large number of linux based programs to the Gizmondo (CE 4.2 device).
One of the main issues is the broken c-runtime of CE, specifically the lack of current dir support (not to mention no posix layer ). At any rate I wanted to be able to hook fopen etc. to call my own functions which would handle current dir.
To do this I thought I'd make some nice and easy IAT hooking code, that was until I discovered how complex this was on CE (relative to Win32 that is).
After much head scratching and looking at the stellar work of those such as mamaich, itsme etc. I finally managed to get it right.
I hope this is useful to someone (I searched this board, but couldn't find any code, though I do remember someone asking how to do it) and have attached a zip file with the hooking code. In order to use this you will need to provide your own undoc.h with the relevant kernel struct and function definitions for your wince flavour.
Once again, I stand on the shoulders of giants, without whom this would not have been possible
Enjoy
-(e)
Beatiful~
You are genius~
Thank you.
Wow~
You are so beautiful~ ^_____^
Thank you.
I just wanted to start asking questions here... sweetlilmre, THANK YOU VERY MUCH!!!
excellent job~
thank you
Does anybody have undoc.h created for windows mobile 6 (wince 5.x)? If not, where should I look for the undocumented type info?
Hi~ JKingDev
I have ever created undoc.h with referencing "private" directroty.
"private" directory is installed with Platform builder. ( I used Platform Builder 5.0 )
If PB is installed, then C:\WINCE500\PUBLIC and C:\WINCE500\PRIVATE is created.
( I don't know Window Mobile 6.0 environment. )
p.s :
If you can translate KOREAN, then visit http://www.digipine.com/programming/1310.
This site has attached file "WinCE_ARM_Hook.zip". ( bottom side )
It is not my post, maybe it is posted by "jung cheulwon".
Hi all,
first of all, thank you sweetlilmre for posting this.
Your solution works perfectly fine for platforms based on Win CE 5, e.g. Win Mobile 6.1 and Win Mobile 6.5.3.
However it does unfortunately not work on Win CE 6 and Win CE 7.
I assume that this is due to changes in the memory architecture of Win CE 6 and higher.
Does anyone have a clue on how to port the "Deep IAT Hooking" solution on Win CE 6 and Win CE 7?
Some techical details on what i have tried so far...
Code:
[INDENT]
PROC WINAPI DeepHookImportedFunction(
LPCWSTR pwszModuleToHook, // Module to intercept calls to
LPCWSTR pwszFunctionToHook, // Function to intercept calls to
PROC pfnNewProc, // New function (replaces old function)
LPWSTR* ppwszExcludeList // List of module names to exclude from the hook
) {
PROC pfnOriginalProc;
PIMAGE_IMPORT_DESCRIPTOR pImportDesc;
PIMAGE_THUNK_DATA pThunk;
PPROCESS pProcess;
struct info inf;
PMODULE pmods;
LPVOID baseptr;
BOOL bHooked = FALSE;
SetKMode(TRUE);
// Get current process struct from KData
pProcess = KData.pCurPrc;
// Get process import descriptor
[B][COLOR="Red"]inf = pProcess->e32.e32_unit[IMP];[/COLOR][/B]
[/INDENT]
The program crashes (at the red marked spot) when i try to access the member
Code:
pProcess->e32
.
This is because the structure
Code:
pProcess
is filled up by the value zero only.
This happens quite early in the implementation, therefore i didn't proceed very far. I still hope that somebody can help me out with this case.
Kind regards
--------------------------------------------------------------------------------
When trying to perform LoadLibrary function on "bthlink.dll" driver -
In debug mode:
I get "No Source Code Is Available".
Not in debug mode :
I just get an error loading it.
I noticed that if im using LoadLibraryEx with the flags param of - LOAD_LIBRARY_AS_DATAFILE, it does work but i cant invoke its functions.
What can I do and why this is happening?
thanks.
Please post the code how you load the library.