more deatels
enter the web
http://www.tutorials-se.com/smartphone/smartphone-10.html
How to access Internet throw mobile phone to PC? pls tell me names of mobiles?
How to access Internet throw mobile phone to PC? pls tell me names of mobiles?
Hello all,
I'm porting a PocketPC ( program to Smartphone 2003.
This program hooks all keyboard event. Thus I use the unsupported
SetWindowsHookExW function (coredll.dll).
The hook is correctly setted, BUT when I try to access to the LPARAM of
the HookProc (pointer on KBDLLHOOKSTRUCT), I got an Access Violation.
However I CAN read the KBDLLHOOKSTRUCT in the debugger !!
I'm still on the emulator right now.
I guess other people got this problem (several post), but nobody tells
the resolution (if any !!)
Thanks,
Manitoba
Hi,
> The hook is correctly setted, BUT when I try to access to the LPARAM of
> the HookProc (pointer on KBDLLHOOKSTRUCT), I got an Access Violation.
> However I CAN read the KBDLLHOOKSTRUCT in the debugger !!
You need to have privileged rights to access the KBDLLHOOKSTRUCT. So you
either need all users of your app to have their phones in a one-tier
security model (via SDA_ApplicationUnlock.exe or similar), or you need
to sign your app with a privileged certificate.
HTH
Regards,
Danny
Hi danny,
thanks for your reply.
I can't understand why (and how) I cannot access to a particular piece
of memory because of a security policy. I mean that I should not have
been able to create the hook, instead.
However, I signed the exe using the smartphone privileged devlopment
certificate (generated for myself),
still does not work on emulator (IsBadReadPtr on KBDLLHOOKSTRUCT
returns true)
What am I doing wrong ???
Manitoba
I bet it's failing because the process isn't in kernel mode. SetKMode(TRUE)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50conmemoryaccess.asp
--
Scott Yost
Software Development Engineer/Test
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
"manitoba"
wrote in message
news:1146147273.909913.188800@u72g2000cwu.googlegroups.com...
> Hi danny,
>
> thanks for your reply.
> I can't understand why (and how) I cannot access to a particular piece
> of memory because of a security policy. I mean that I should not have
> been able to create the hook, instead.
>
> However, I signed the exe using the smartphone privileged devlopment
> certificate (generated for myself),
>
> still does not work on emulator (IsBadReadPtr on KBDLLHOOKSTRUCT
> returns true)
>
> What am I doing wrong ???
> Manitoba
>
Hi scott,
Well, I call SetKMode as you suggested, but I still get the error.
Note that SetKmode(true) always returns false even when I call it twice
(second call should returns true). Thus, I suppose Its a security
issue.
I guess my app is not signed with the privileged development
certificate or the root privileged certificate is not load in the
emulator's certificate store.
But I don't even know how I may check that signing is correct.
Any ideas ?
Manitoba
m- [27 Apr 2006 07:14:33 -0700]:
>I can't understand why (and how) I cannot access to a particular piece
>of memory because of a security policy. I mean that I should not have
>been able to create the hook, instead.
What's the address? If it's way up in K space
(like 0xCxxx_xxxx) you won't get far. Custom
menus (MF_OWNERDRAW) are like that, too (in
Smartphone) -- you can set the MF_ flag but
when it comes time to draw, welcome to GPF City.
It's a bug in the OS as far as I'm concerned,
at least WRT creating owner-drawn menus. PPC
returns a Ctl pointer in the process space,
for example, which works fine.
It was like this in SP2003/SE. Maybe (o) it
(OD menu) was corrected in Wm5.
--
40th Floor - Software @ http://40th.com/
iPlay : the ultimate audio player for mobiles
parametric eq, xfeed, reverb; all on a mobile
Hi,
> I bet it's failing because the process isn't in kernel mode. SetKMode(TRUE)
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50conmemoryaccess.asp
>
I doubt that. In my app I do not need to call SetKMode to gain access to
the KBDLLHOOKSTRUCT.
Regards,
Danny
Hi,
> I guess my app is not signed with the privileged development
> certificate or the root privileged certificate is not load in the
> emulator's certificate store.
> But I don't even know how I may check that signing is correct.
> Any ideas ?
What IDE do you use? In Visual Studio 2005, the signing procedure is the
following:
http://msdn2.microsoft.com/en-US/library/ms180782.aspx
Don't forget to select that you want to privision the device with the
certificate (can't remember the exact name at the moment, I have no
VS2005 here).
Regards,
Danny
Hi danny
You get it !
I switch from EVC to VS2005 and it works !!
I can't understand why, because in both IDE, I set the code-signing
properties.
(on my point of view, I 've done the same !
So no need for SetKMode and not a bug in SP2003 (thanks to both scott
and 40th floor for suggestion)
Note that KBDLLHOOKSTRUCT address is 0xC2.... without code signing and
0x22... with code signing
many thanks ...
manitoba
cant resolve error
Hi all,
I m trying to add a dialog box to the inboxmenuextensibility
example..when i add a dialog box and build my application the following
errors are obtained:
------ Rebuild All started: Project: InboxMenuExtensibility,
Configuration: Debug Windows Mobile 5.0 Smartphone SDK (ARMV4I) ------
Deleting intermediate and output files for project
'InboxMenuExtensibility', configuration 'Debug|Windows Mobile 5.0
Smartphone SDK (ARMV4I)'
Compiling...
ClassFactory.cpp
InboxMenuExt.cpp
Main.cpp
MyDialog.cpp
WINVER not defined. Defaulting to 0x0400, which is appropriate for all
supported Windows CE versions
_CE_ACTIVEX was not defined because this Windows CE SDK does not have
DCOM.
_CE_ACTIVEX could be caused to be defined by defining
_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA, but it is recommended that
this be done only for single-threaded apps.
_ATL_NO_HOSTING was defined because _CE_ACTIVEX was not defined.
c:\program files\windows ce tools\wce500\windows mobile 5.0 smartphone
sdk\samples\cpp\win32\inboxmenuextensibility\inboxmenuextensibility\MyDialog.h(15)
: error C2065: 'IDD_SMARTPHONE_PORTRAIT' : undeclared identifier
Generating Code...
Build log was saved at "file://c:\Program Files\Windows CE
Tools\wce500\Windows Mobile 5.0 Smartphone
SDK\Samples\CPP\Win32\Inboxmenuextensibility\InboxMenuExtensibility\Windows
Mobile 5.0 Smartphone SDK (ARMV4I)\Debug\BuildLog.htm"
InboxMenuExtensibility - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
plz help...will be grateful to you all
regards
kapil kaushik
--
sidhu
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
OK - Cancel Softkeys Handle
Hi all,
I'm currently working on a full screen application- written in C++ using
win32 api- for SP 2003. I intend to handle the key events which come from
the OK-Cancel ( I don't really know what the names for these keys are. In
symbian, "we" call it softkeys which I guess it's the same).
I've noticed that if no menu bar is instanciated I only get a KeyUp msg from
those keys. If I instanciate a menu bar with let's say an left "ok" button,
I get the WM_COMMAND msg with the right id. My question is how can I
subscribe to the key event? If I absolutely must have a menu bar, how can I
hide it and handle WM_COMMAND messages in my app?
Thanks in advance,
Cronopi.
Mobile communicate with PC
Hi All,
I am new to this kind of development. But we have a requirement to
develop the required modules to communicate betweeen Mobile phone and
PC. Can anybody tell me the required tools for this project. I
understand that Mobile phone needs to have OS. I think we need to
Bluetooth for communication.
Here the OS on mobile comes with Mobile phone itself or ? (Basically
what OS s are installed on Mobile phone).
What are the modules we need to develp and install on mobile and as
well as on PC.
What are the tools we need for the development.
What are the SDK we need to use for this development.
Basically I am VC++ developer. We had experience working Tablet with PC
via Bluetooth. There we developed one Windows service which worked via
messaging with the main application. I am expecting something like here
also, but the main difference, we need to some modules (?) and OS (?)
on mobiles also.
If you can, please provide me the links also where I can get more
information for this kind of requirement. I really appreciate your
information.
Thank You
Murthy
Location with GPS receiver
Hi,
Can some body throw me a light on using Location API's on WM5.0 to fins lang
lat info, Sample code snippet may help me a lot.
Thanks for your time.
Regards
-Subash
Help about placing a file on a FTP server
Hello,
I have already made some post about this topic, but I decided to do some
changes.
I want to develop a program for a Windows Mobile 5.0 Smartphone. I think the
better and the more simple language to do this is the C#.
The goal of the program is to take a snapshot with the camera's phone and
automatically send it by placing this picture on a ftp server.
So to take the picture, I'll use CameraCaptureDialog() of
Microsoft.WindowsMobile.Forms, I think it will be not too difficult.
But my problem is to place it on the FTP server. I don't know how to connect
the device on Internet by a GSM/GPRS/UMTS connexion in C# and I don't know
how to put files on the server too.
I found some function to do this, like that :
System.Net.WebClient wc = new System.Net.WebClient();
wc.Credentials = new NetworkCredential(@"Username", @"Password");
wc.UploadFile(@"ftp://FTP/file.jpg",
System.Net.WebRequestMethods.Ftp.UploadFile, @`"\file.jpg");
wc.Dispose();
BUT it is not possible to do this with Windows Mobile 5.0 (the librairy is
only usable with .NET Framework). So i'm a bit lost.
So please, if someone knows how to make a Internet connexion in C# for a
smartphone and place a file on a FTP server, help me to start or tell the
good way to do.
Sample codes are greatly welcome.
Thx, Jerome
Where do i find my Application on Smart phone emulators?
Hi,
It seams to be a funny question but seriously i need guidence.
When i try to run my application on WM 5.0 Smart phone emulator i
couldnot find my application exe.There is folder inside programs named
as DebugApp where i find my exe only if i run the programe in debug
mode means by applling a break point on init or create window.But i am
able to run pocket pc programes from root.
So if anybody take some time and answer my query its a great
support for me.
Regards
Swapnil
Converting BYTE to LPWSTR
Hi,
I'm writing a plugin for WM5, but I can't find any explanations on how
to work with strings. This is what I have:
BYTE* pAllbyteData;
pAllbyteData = new BYTE[dwSizeLow];
if (ReadFile(hFile, pAllbyteData, dwSizeLow, &dwBytes, NULL))
{
LPCWSTR str = (TCHAR*) pAllbyteData;
DrawText(hdc, str, -1,
const_cast(&(ppe->p.paint.rcDraw)),DT_LEFT);
}
DrawText needs the string to be a LPCWSTR. This compiles fine, but when
I debug pAllbyteData contains the correct text, but then str contains
all boxes (the ones you get when a font can't be found).
Anyone have any ideas how I can get DrawText to print whatever is
returned in pAllbyteData?
Thanks,
Felix
invoking dialog box on click of menu item
Hi all,
i have dynamically added a menu item in the menu of smartphones
now wai i want ia that when end user click that menu item a dialog box
should appear..can u plz send ome sample which i can work upon and
proceed in my project...or refer me some link by which i can acheive
it...
plz help...will be grateful u to all
regards
kapil kaushik
--
sidhu
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
invoking dialog box on click of menu item
Hi all,
I have dynamically addded a menu item in the inbox menu of
smartphones..wat i want that when the end user click that menu item a
dialog box should open up consisting of some contols..can u plz tell me
any link for such samples which i can study and proceed..i m using
visual studio 2005 and windows smartphone sdk 5.0..plz help will be
grateful to you all..
regards
kapil kaushik
--
sidhu
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
Smartphone Home vs. WM5 Today screen plugin lifecycle
We're porting an app from Windows Mobile 5 to Smartphone; in WM5 the
plugin DLL stays resident from when it is registered and first invoked;
the lifecycle in Smartphone appears to be quite different with the DLL
being instantiated/streamed to persistent storage/destroyed before
home.exe loads it. If the user changes the home screen layout or turns
off the phone, the whole process repeats. An app implemented in the
context of a DLL that is not always resident will not always be
available.
What's the best way to implement a persistent app like a Today screen
DLL in Smartphone? Needs to be able to intercept/process windows
messages whenever the phone is on. Is there a better alternative than
a plugin?
Thanks!
VS 2005 Home screen CAB project CESelfRegister: how?
After getting the SDK homescreen example project to work, I tried creating my
own project that is just a trivial revision of the sample. I set up my new
dll and CAB projects' properties to mirror the settings in the homescreen
sample.
I am unable to get the smart phone CAB project to include the line
"CESelfRegister=.dll" in the inf file it builds as part of the
CAB creation process.
Visual Studio 2005 creates the inf file as part of the build, so I cannot
manually edit the inf file; any edits get discarded when the CAB build
occurs. Is there a VS 2005 property or dialog screen to specify that the dll
needs to SelfRegister?
Access violation using a keyboard Hook
Hello all,
I'm porting a PocketPC ( program to Smartphone 2003.
This program hooks all keyboard event. Thus I use the unsupported
SetWindowsHookExW function (coredll.dll).
The hook is correctly setted, BUT when I try to access to the LPARAM of
the HookProc (pointer on KBDLLHOOKSTRUCT), I got an Access Violation.
However I CAN read the KBDLLHOOKSTRUCT in the debugger !!
I'm still on the emulator right now.
I guess other people got this problem (several post), but nobody tells
the resolution (if any !!)
Thanks,
Manitoba
Deployement of signed cab on multiple devices
Hello,
I would like to understand the portability of signed cab on multiple
devices. For instance, if I have developed an application using Smartphone
2003 SDK and that I have signed it through Mobile2Market program, will it be
possible to :
- install it on any Smartphone 2003 device having the Mobile2Market root
certificate?
- install it on any Smartphone 2002 device having the Mobile2Market root
certificate?
- install it on a windows mobile 2005 device having the Mobile2Market root
certificate?
Thanks in advance for clarification
--
Ste
Not full screen Dialog Box
Hi!
I have dialog box, and now I want to show it as modeal:
CInputText iText;
iText.DoModal();
But this window is full screen now. How can I resize this window?
I'm using VS80, WM5.0 and smartphone.
Best regards,
Marek
Blackberries: Can you make them?
Hello.
I have made a program using Microsoft Windows XP Excel and was wondering if
Microsoft could make a Blackberry that supported this program. I don't want a
mini PC, just this one program.
Is there anyway you could do this? How much would it cost?
Access violation using a keyboard Hook by marekc
MENU
Hw to create menu in mfc app for windows mobile/smartphone?
Access violation using a keyboard Hook by =?Utf-8?B?eWF4aXhp?=
How to emulate callevent with Device Emulator?
My problem is described in the subject bar.
Any help appreciated.
Access violation using a keyboard Hook by jimh@netwasp.com
Strange Scrollbar Issue on ListBox
My Listbox scrollbar is either only 1 pixel wide or is drawing too far
over to the right. Can I not have a scroll bar on a listbox on
SmartPhone? Here is the creation code:
// Create the history list
m_hWndList = ::CreateWindow(_T("LISTBOX"),
NULL,
WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_BORDER |
LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | LBS_SORT,
0,
0,
m_dwEditWidth,
SCALEY(DEFAULT_EDITHEIGHT)*2,
hWnd,
NULL,
m_hInstance,
(PVOID)this);
Anyone come across this problem or am I doing so obviously wrong I just
can't see it?
Access violation using a keyboard Hook by =?Utf-8?B?SG93YXJkIEN1bm5pbmdoYW0=?=
How to install a new root certificate on smartfon during developme
I am trying to produce a way that my testers can install a root certificate
on our smartfon without needing to be connected via KITL to modify the
registry. This is NOT a problem with PPC.
1. I can install the certificate by modifying
HKLM\Security\Policies\Policies\00001017 to 144 (was 128 - CARRIER_TPS, I am
adding USER_AUTH), copy the CER to the device, view the CER in FExplorer,
click it and it installs.
2. This would be OK, if I could get a local RegEdit that can update the
registry, but RegEditSTB cannot update the registry (probably a security
issue - can't tell).
3. I tried follwing the MSDN steps to export the CER, create _setup.xml,
package this in a CPF and sign the CPF. But when I click on the CPF, it
always sends a failed message to the device inbox complaining of insufficient
security.
We do build the image for the device so I looked for a way to include my
root ceritifcate in the image registry (like the other default certificates),
but no luck.
We would prefer NOT to hack the platform.reg in the image to change
HKLM\Security\Policies\Policies\00001017 and of course changing
PUBLIC\WPC\OAK\FILES\project.reg is a bad thing.
; Grant Manager Policy
; (default: CARRIER_TPS for phone skus; USER_AUTH for non-phone skus)
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
IF SKUTYPE=PHONESKU
"00001017"=dword:80
ENDIF ; SKUTYPE=PHONESKU
IF SKUTYPE=PHONESKU !
"00001017"=dword:10
ENDIF ; SKUTYPE=PHONESKU !
Can anyone give me some advice here?
Thanks,
--
Howard Cunnningham
BluefinMobile
RTP, NC
Access violation using a keyboard Hook by cronopi
MaskBlt and ShLoadImageFile
Hi all,
I'm loading Images from files (png type) using ShLoadImageFile but now I'm
stuck because I can't show properly the transparent bits of my image. Does
anybody know how to extract the mask from the image that I load?
Also, when trying to use IImagingFactory and IImage in SP2003, I get some
compile errors due to missing include files such as:
#include
#include
Does anybody have a workaround for this?
Cheers All,
Cronopi
Access violation using a keyboard Hook by =?Utf-8?B?eWF4aXhp?=
How to make the left soft key disable?
Hi,
In some condition, I need disable the left soft key, simultaneitily make
the text on the left soft key ,e.g. "OK", become gray. How could I do ?
hope anyone's help.
Access violation using a keyboard Hook by marekc
Transparent List Box
Hi!
I would like to put on dialog (smartphone, mfc, wm5.0) LIST BOX with
transparent backgroud. I can not find any word about how to do this?
Best regards.
Access violation using a keyboard Hook by =?Utf-8?B?amVyb21l?=
Help about placing files on FTP server !
Hello, I'm a newbie about programming on smartphone, and I have just few
notions. Actually, I want to make a soft for a Windows Mobile 5.0 smartphone
which can take a picture with the camera and automatically place it on a FTP
server. I have to do this for my training course. I have Visual Studio
Professional 2005 and I downloaded the Windows Mobile 5.0 Smartphone SDK.
I want to know if it is possible, and if someone did a similar program
already. I just want to be sure that is realizable.
I made few searchs, and I found I can use the
function SHCameraCapture of the Aygshell library to take picture. And I can
use the Connection Manager API to connect the phone on Internet and finally,
I can use WinInet library to place the picture on a FTP server with the
function
FtpPutFile.
Access violation using a keyboard Hook by marekc
Using bluetooth
Hi!
I'm looking for sample code or something about how to start with
bluetooth with smartphone.
Regards!
Access violation using a keyboard Hook by ivan_ivan_ivan@mail.ru
TAPI lineSetAppPriority: How to check which application has top priority.
I could set my application to be high priority by executing
LONG WINAPI lineSetAppPriority(
LPCSTR lpszAppFilename,
DWORD dwMediaMode,
LPLINEEXTENSIONID lpExtensionID,
DWORD dwRequestMode,
LPCSTR lpszExtensionName,
DWORD dwPriority
);
How I could check which application now has top priority.
I mean how to get application name for some media mode.
Or how to get all application names that listening for calls, without
reference to media mode.
Access violation using a keyboard Hook by Patrikpl
How access contacts database on WM5
Hello,
Could you please advice me how to access the Contacts database which is in
the volume PIM.VOL, i.e. on smartphone with OS WM5.
Function CeMountDBVol(&vol1,L"\\PIM.VOL",OPEN_EXISTING ); it does not open
the volume, even when I make a copy of it as a file under different name and
it is then not used in any other way.
Definitely I need to work with mentioned database so that the changes made
in original OS application will be shown immediately in my application and
vice-versa.
Thank you
Patrik
Access violation using a keyboard Hook by Gernot Frisch
Override back key
I have a simple window. No dialog, no controls, no nothing. Just a
window.
Which window do I send the SHCMBM_OVERRIDEKEY message to? Mine?
SHFindMenuBar(mine)? SHFindMenuBar(someone_else_s)?