Mobile 6 + changing pictures
Hi,
I'm using Visual Basic 2005 and programming for a TyTanII handheld.
On the storage card I have a series of pictures(maps) in a folder named P19.
I want to change the picture in a picturebox. I can do it OK in VB for the
desktop but and am completely lost when it comes to doing it for the pocketPC.
I have searched around but can't find anything to help or guide me. I fear I
am missing something simple. Can someone supply me with some sample code?
Perhaps even what imports I need? I'm only a hobbyist (obsessive my partner
says)programmer and this has me stumped.
Paul C Tag: Camera Tag: 127279
Data abort when using LocalAlloc() between classes
Hi,
I'm using LocalAlloc() in my application running Windows mobile 6.
When this is used in a Dialog class and another class member function is
called with an argument pointing the allocated memory, it meets 'data abort'
several steps after going into the callee class thesm.MaSMSdispatch().
what is this making this data abort?
Please let me know how I should use memory management between classes.
thanks you.
<here is the part of my codes.>
iService.sms_recipient.lpmsisdn=(TCHAR*)::LocalAlloc(GPTR,sizeof(lptemp)+1);
iService.sms_recipient.lpmsisdn[sizeof(lptemp)]=0;
_tcscpy(iService.sms_recipient.lpmsisdn,lptemp);
thesm.MaSMSdispatch( hDlg,(void *)&iService);
::LocalFree(iService.sms_recipient.lpmsisdn);
<error message>
Data Abort: Thread=82ec47b4 Proc=803e8410 'cmob01.exe'
AKY=00200001 PC=0002f630(cmob01.exe+0x0001f630)
RA=0002f3a4(cmob01.exe+0x0001f3a4) BVA=2c37009a FSR=00000001
The program '[c3221272] cmob01.exe' has exited with code 1067 (0x42b). Tag: Camera Tag: 127278
SHCameraCapture crashes
My program calls SHCameraCapture. The camera interface launches, it
allows me to take a picture and it saves the file as expected, but when
I finish, my program crashes. I get this in the debug logs:
[Stack fault]: Thread=8a325400 Proc=885781e0 'camara.exe'
AKY=00100001 PC=0001136c(camara.exe+0x0000136c)
RA=f000fffc(???+0xf000fffc) BVA=2a0219e4 FSR=00000007
This was working perfectly before. I just added one text box and a label
in another dialog (the parent of the SHCameraCapture window), and the
code to read the text that the user enters in it.
I've tried it in two different devices and in the emulator and it does
the same thing in both, so it's not a problem of the device.
Any help will be appreciated. Tag: Camera Tag: 127269
GetManiestResourseStream() and exception
Hi all,
I have a dll which contains five resource images (gif and png) as
embedded resource, I am loading these resources from the dll into my main
application, I get all the resource names correctly from the resource dll
... after constructing 2 bitmaps this piece of code throws exception.
The exception stacttrace is
at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)
at System.Drawing.Bitmap._InitFromMemoryStream(MemoryStream mstream)
at System.Drawing.Bitmap..ctor(Stream stream)
at MELFO_eLearning.MainForm..ctor()
at MELFO_eLearning.Program.Main()
Code:
Assembly asm = Assembly.LoadFrom("appres.dll");
string[] resNames = asm.GetManifestResourceNames();
Bitmap[] resBmps = new Bitmap[resNames.Length];
for (int i = 0; i < resNames.Length; i++)
{
try
{
Stream stream = asm.GetManifestResourceStream(resNames[i]);
resBmps[i] = new Bitmap(stream);
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace);
}
}
Any ideas, please ???? Tag: Camera Tag: 127266
Pocket PC w/ SQL Server 2000 and 2005
Using Visual Studio 2005 Professional:
We have two versions of SQL Server running on one machine: SQL Server 2000
Enterprise (Sql2000) and SQL Server 2005 Express.
We need to connect the Pocket PC (PPC) to Sql2000. The PCs can connect, but
not the Pocket PCs.
The Pocket PCs can ping Sql2000, but when our code tries to open an Sql
Connection, we get the following SqlException Error Message:
"SQL Server does not exist or access denied."
Since we can ping, we know the server exists and can be seen from the PPC.
We have tried multiple versions of the connection string, but this does not
seem to be the problem.
Our System Admin assures me that the server is not running a firewall, so
what else would prevent the PPC from being able to connect to Sql2000?
The PPC does not have a login ID/PWD, so I say we should *not* be using
Integrated Security.
Sql2000 uses port 1433, and it is setup to accept both SQL Server and
Windows Authentication.
We have tried different User ID/Password combinations; some have
Administrator access, while others only have access to the tables we need to
read.
Here are the different connection strings we have tried:
"Data Source=CPAPP;Initial Catalog=AIO;Integrated Security=True;User
ID=public;Password=public"
"Data Source=172.16.8.105,1433;Initial Catalog=AIO;Integrated
Security=True;User ID=AIO\public;Password=public"
"Data Source=172.16.8.105,1433;Initial Catalog=AIO;Integrated
Security=True;User ID=AIO\vti;Password=vti"
"Data Source=CPAPP;Initial Catalog=AIO;Integrated Security=False;User
ID=aio\vti;Password=vti"
"Data Source=CPAPP;Initial Catalog=AIO;Integrated Security=False;User
ID=public;Password=public"
"Data Source=CPAPP;Initial Catalog=AIO;User ID=test;Password=test;"
"Data Source=CPAPP;Initial Catalog=AIO;User ID=public;Password=public"
"Data Source=CPAPP;Initial Catalog=AIO;Integrated Security=True;User
ID=public;Password=public"
Does anybody have any information on this? Tag: Camera Tag: 127263
How to reset the GPS receiver?
Hi,
I'm developing a GPS-related application, and I need to use the raw interface.
Sometimes the GPS receiver seems to go nuts: it keeps sending NMEA data
(including 10-12 visible sattelites), but it is unable to find a location.
However, when I start some commercial GPS application, it quickly finds a
valid location.
The question is: is it possible / neccessary to somehow reset the GPS
receiver? If so, how?
Thanks,
BalintN Tag: Camera Tag: 127262
What is the differentence bettwen mencfilt and encfilt
Dera all,
What is the differentence between mencfilt and encfile? I found some data
abort message on my device but I don't know what is mencfilt ?
========================================================================
Data Abort: Thread=86280400 Proc=8031aa70 'filesys.exe'
AKY=00000007 PC=03eb7300(fatfsd.dll+0x00002300) RA=03e75178(mencfilt.
dll+0x00004178) BVA=04000007 FSR=00000001
========================================================================
Thanks
Eric
--
Message posted via http://www.pocketpcjunkies.com Tag: Camera Tag: 127261
Axim N300 series PDAs, vanished from the earth?
Where can I buy an Acer N300 PDA, or an Acer N310 PDA, or and Acer
N311 PDA? Searched on ebay for these PDAs, can't find one at all. I
want these particular models because I know these models have a USB
host port that works with FTDI's USB to serial TTL converter cables,
specifically, TTL-232R-3V3.
I'm in the States, but am looking everywhere. Tag: Camera Tag: 127260
ADOCE on PPC with VS 2008 Basic .NET
Want to convert EVB programs using ADOCE on Pocket PC to VS 2008
VB .NET. I am trying and loving VS 2008 Pro TRIAL on XP HOME. Works,
but slow of course. Can't install SQL Server CE on XP Home. For trial
purposes I do NOT want to install XP PRO yet. Can I still convert and
use the ADOCE code with some changes to see if the app would work? Any
other free or trial SQL DB to use during the trial?
I have MySQL on desktop but I don't think there's a mobile version. Tag: Camera Tag: 127257
DataGrid runtime format
Hello,
Anyone knows how to change the datagrid header text at runtime?
Also how to align a datagrid column text at runtime?
Any help will be really appreciated.
Miguel. Tag: Camera Tag: 127256
sequence photo in windows mobile 5.0
hi,
i am using hp ipaq 6965. i wrote a code for accessing the built-in camera..
the code is as follows
int i = 0;
CameraCaptureDialog cameraCaptureDialog = new CameraCaptureDialog();
cameraCaptureDialog.Owner = this;
cameraCaptureDialog.Title = "Take Photo";
cameraCaptureDialog.Resolution = new Size(640, 480);
cameraCaptureDialog.Mode = CameraCaptureMode.Still;
cameraCaptureDialog.InitialDirectory = "\\Storage Card\\imgDir";
while (i <5)
{
if (DialogResult.OK == cameraCaptureDialog.ShowDialog())
{
cameraCaptureDialog.DefaultFileName = "img_" +
DateTime.Now.ToString("dd-MM-yy_HH-mm-ss") + ".jpg";
}
i++;
}
My idea was to take 5 photos continuosly.(Sequence photo)
it is working .. but some problems are there.
1. Camera is opening in portrait mode (but i want it to be in landscape mode)
2. Camera is going to standby after 15 secs. (i want to extend this time)
3. To take 5 photos its taking me atleast 3 minutes (Long delay!!!!!)
I don't know how, after taking each photo, the camera is
disappearing and reappearing (Cause of delay...)
is there any way i can reduce the delay??? can i open the camera in
landscape mode??
please help.
Rabeeh Tag: Camera Tag: 127249
Problem with CeRunAppAtEvent
Hi,
I have been using the API CeRunAppAtEvent () to launch my application
when the device wakes up. This works fine for most cases. But, recently I
noticed a strange problem. On a data enabled SIM (GPRS) when I browse, that
is, when I am retrieving data, when I switch off the device and again switch
it on (wakeup) , the application is not launched!! When I investigated
further, I noticed that after the page has loaded, if I switch off and then
wakeup the device, my application is launched!!
Can anybody shed some light on this? Is there any other alternative? Tag: Camera Tag: 127247
RIL C# Again...
Has anybody succesfully initialized RIL under C# using the ril.dll
interface? I'm trying to use the following commands but never managed to
receive a callback after invoking the proper methods.
public delegate void RILRESULTCALLBACK(int dwCode, void* hrCmdID,
void* lpData, int cbData, int dwParam);
public delegate void RILNOTIFYCALLBACK(int dwCode, void* lpData, int
cbData, int dwParam);
public static readonly int RIL_NCLASS_ALL = 0x0fffffff;
[DllImport("ril.dll")]
public static extern int RIL_Initialize(int dwIndex,
[MarshalAs(UnmanagedType.FunctionPtr)]RILRESULTCALLBACK pfnResult,
[MarshalAs(UnmanagedType.FunctionPtr)]RILNOTIFYCALLBACK pfnNotify, int
dwNotificationClasses, int dwParam, out void* lphRil);
And then I try:
RILRESULTCALLBACK resultCallback = new RILRESULTCALLBACK(f_result);
RILNOTIFYCALLBACK notifyCallback = new RILNOTIFYCALLBACK(f_notify);
where the receivers are:
private void f_notify(int dwCode, void* lpData, int cbData, int dwParam)
{...}
private void f_result(int dwCode, void* hrCmdID, void* lpData, int
cbData, int dwParam) {...}
My question is am a using correct argument types for the methods. Has
anyone done it, had it working and would share the solution with me? Tag: Camera Tag: 127244
Mobile Application
Hi , Everybody
I am Onur , A computer engineering student , and waiting to start my
graduation project ,
my project will be in asp.net,c# and mobile application field , but
all subject in this field are repeated and conumed , if any one can
help me to get a new idea for the project I'll be very grateful .
Waiting for Opinions .....
Regards, Onur Tag: Camera Tag: 127236
Problem With Deployment
I am new to developing on Windows Mobile Devices but have experience with
Palm. I am trying to develop a simple app (button and message box) but when I
try to deploy the application to the device I get this message:
-----------------------------------------------------------------------------------------------
Error 1 Deployment and/or registration failed with error: 0x8973190e. Error
writing file '\Windows\NETCFv2.wm.ARMV4I.cab'. Error 0x80070020: The process
cannot access the file because it is being used by another process. Device
Connectivity Component
-----------------------------------------------------------------------------------------------
I am using Visual Studio 2005 with all of the Windows Mobile 5.0 resource
kit installed (I also tried reinstalling it). I am using a Dell Azim (windows
mobile 5.0 device) and it will actively connect and sync to my computer.
Additionally, if I try to deploy to the emulator the deployment takes over 3
minutes, the emulator shows up but I cannot see my application even though in
this case the status bar indicates "Deply Succeeded"
Any help is greatly appreciated.
Joe. Tag: Camera Tag: 127235
WM6 Bluetooth scanner
I'm currently trying to write a program for my HTC Touch Cruise which
searches for bluetooth devices periodically and logs the discovered devices
to a log file.
If possible I would like to have the program turn the bluetooth on and off
to save battery power.
Although I would like to write it in VB .net, I don't mind trying it in C#
.net if not possible in VB .net .(both 2005).
(is it possible to run the program will the device is in sleep mode) Tag: Camera Tag: 127230
How to implement dual initiation?
I need to require two simultaneous actions to trigger an event on a Windows
Mobile 5 device.
I want the user to have to press a trigger button while a hardware button is
being held down. So the user would press and hold a "ARM" hardware button
down, then click a "FIRE" button to fire the device. The "ARM" button would
enable the "FIRE" button as long as it was held down. If the "ARM" button is
released, the "FIRE" button would be disabled and have no effect.
An alternative would be to leave the "FIRE" button enabled, but on click it
would check the state of the "ARM" button and would fire if the "ARM" button
was being held down. Otherwise it would display a message to the user
instead of firing.
I'm hoping there's a simple solution, but I'm new to Mobile devices and the
solution isn't obvious to be. I think in a PC app I would just set a Boolean
on buttondown and clear it on buttonup, but that option doesn't seem
availalbe on Mobile devices.
Thanks in advance for any suggestions. Tag: Camera Tag: 127221
Smart Device Applications
Hi
Iam new to smart device applications . I want to know
How do we access the application (in C# .Net or VB.Net) on a VSS
through a smart device.
In other word,how do we access data from a smart device?
Thanks,
Archie Tag: Camera Tag: 127213
Strange Problem with Editbox.
Hi,
I am using an editbox IDC_PORT and i have set the Number property to TRUE so
that it allows only digits to be entered.It is behaving as expected if i type
something.If i try to enter alphebets it is correctly dispalying
"Unacceptable Character".But if i copy some data from other editbox say
"server" and paste it in
IDC_PORT editbox, it is accepting eventhough the "Number" property is set.
Can anyone help me in this regard.
Thanks in advance. Tag: Camera Tag: 127209
Raw IR Issue
Hi, i'm developing an application for IPAQ HX2490 (Windows Mobile 5.0) that
communicates through raw IR with a IR controlled by a PIC microcontroller. In
the first three parts of the operation, i can receive data fine, but on the
last one the handheld just seems to ignore the data that is being received,
it doesn't receive anything. Is there something related to the data that is
being sent to the pocket PC? It is a byte array {0x10, 0x06, 0x16, 0x16}. I'm
using port 2 for the communication. But when i communicate with a desktop PC
with a serial Infrared running exactly the same application in the PIC,
everything works fine! I can't realize what's going on there. Any help would
be appreciated. Thanks. Tag: Camera Tag: 127188
Suggestions for PocketPC SDK for 1D/2D Barcode Scanning via
For many years I have wanted a solution to a problem I have by using
my PocketPC as a Barcode Scanner. Some of the latest nifty solutions I
have seen lately have little applications that use the built-in Camera
(in what appears to be in video mode, not still camera mode) to scan a
2D barcode, which makes a chime sound then passes a user to a web site
on the PPC (the web site being encoded in the 2D Barcode).
I would love to pretty much do the exact same thing except capture the
image (save the barcode), display the decoded text (and write it to a
text file with a time stamp) and trigger audio recording. Basically
using the device for capturing a tonn of barcodes while recording
audio.
Does anyone know where a good place to start for this would be for
Visual Studio 2008? .NET (C# or VB.NET) development is my forte.
Are there any hardware considerations I have to keep mindful off? I
will need several PocketPC's running this and have to collect the
stored data at the end of the day.
ANY suggestions or directions would be greatly appreciated!
ChuckM Tag: Camera Tag: 127186
Pocket PC can't connect to SQL 2000 Server
I am having difficulty connecting my Pocket PC to our SQL Server 2000 database.
The application worked great, until they decided to move the database to
this newer server.
Here is my connection string:
Public sqlConn As New SqlConnection("Data Source=SQLSERVER;Initial
Catalog=Company_Records;Integrated Security=SSIP;User
ID=public;Password=public")
I connect to the SQL 2000 Server using this code:
Dim SqlDataAdapter da = New SqlDataAdapter("SELECT * FROM EmployeeTable",
sqlConn)
DataTable dt = New DataTable
Try
da.Fill(dt)
Catch ex As Exception
Console.WriteLine(ex.ToString())
End Try
The output to the console is:
System.Data.SqlClient.SqlException: SqlException
at System.Data.SqlClient.SqlConnection.OnError()
at System.Data.SqlClient.SqlInternalConnection.OnError()
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Connect()
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen()
at System.Data.Common.DbDataAdapter.FillInternal()
at System.Data.Common.DbDataAdapter.Fill()
at System.Data.Common.DbDataAdapter.Fill()
at CompanyApp.frmMain.btnOK_Clicked()
at System.Windows.Forms.Control.OnKeyDown()
at System.Windows.Forms.Control.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterModalDialog()
at System.Windows.Forms.Form.ShowDialog()
at CompanyApp.modStart.Main()
Does anyone have any idea what is going on?
I've done Google searches, but most of what I am finding is for SQL Server
2005 or SQL CE. Tag: Camera Tag: 127184
.net CF Combobox size
Hello
I want to change the height of a combobox in .NET CF. if I choose Font size
of 7, the height of the combobox is decreasing a bit, but there is still
free space in the combobox where the test will never be.
Unfortunately CF (I'm using 3.5) doesnt support DrawItem like in Full
Framework.
Is there a possibility to force the height to a given value or an easy
example to create an own combobox?
Thanks
James Tag: Camera Tag: 127182
DirectShow: IAMCameraControl
Hi,
I'm developing camera capture application for WM 5.0/6.0 using direct
show.
I have to implement zoom in/out feature so I've tried to use
IAMCameraControl interface.
Here is the snippet:
long flags = 0;
long zoom_value = 0;
CComPtr<IAMCameraControl> pCameraControl;
m_pVideoCaptureFilter->QueryInterface(IID_IAMCameraControl,
(void**)&pCameraControl);
CHK(pCameraControl->Get(CameraControl_Zoom, &zoom_value, &flags));
Logger::LogDebug("current zoom = %d\n", zoom_value);
if ((zoom_value + 50) <= 600) {
zoom_value = zoom_value + 50;
CHK(pCameraControl->Set(CameraControl_Zoom, zoom_value,
CameraControl_Flags_Manual));
}
Device (samsung SGH i 600) has the following zoom range:
min = 0
max = 600
default = 10
step = 10
Code works without any exceptions and errors but it has no effect. I
enumerated all possible combinations of flags and values, stopped
graph before setting new value etc.... but with no luck..
Also tried on another device Qtek 8310 (it has only 2 possible zoom
value) but the same result as for samsung.
Could someone point me to right solution/code example or possibly
remove mistakes from my code :)
AFAIK there are some posts from ppl which faced with same problem but
I didnt see any useful reply.
Many Thanks
Leonid Tag: Camera Tag: 127181
Newbie Questions: Device Lock, Date Time Sync
Hi
Scenario: Company I'm working for currently has PALM devices running
software developed in Satellite forms. Management are looking to very quickly
roll out Pocket PC devices (due to shortages of PALM devices) running the
existing software with a view to later re-writing/replacing the application.
I have Sat Forms running on the device and have modified the current sync
routines in the desktop application.
What I need to do now is:
1. Lock the devices so that the users will only be able to run the Sat Forms
application and use the phone.
2. Lock the phone so that only specifed numbers can be dialled.
3. Ensure that the date and time on the device are set to that on the PC
when the devices are synched. The current plan is *not* to have them set as
partners but I don't think a guest sync updates the date/time.
BTW New devices are WM5.
Any thoughts on how best to do this?
Thanks
Paul Tag: Camera Tag: 127176
any 3rd party PDA simulator that can run independently
Hi all,
does anyone know is there any 3rd party PDA simulator that I can use to run
to provide demo to my customers? including demo of file transfer via
activesync to the simulator and executing an exe in the PDA from Desktop
currently i tried using VS Emulator but when i transfer files and execute an
exe from Desktop, my Emulator will hang. And moreover VS Emulator requires me
to install VS on the demo machine which my customer wont allow.
can anyone introduce to me any 3rd party PDA simulator which I can use?
Pls advise.
Thanks
--
Johnson Tag: Camera Tag: 127174
Do we *need to* dynamically link gx.dll?
Hi again,
I made a note a while ago about a potential bug that would occur if my app
installed to a device that didn't have gx.dll in the \Windows directory.
The recommendation seemed to be that if I'm using the GAPI (which I am) that
I should include gx.dll with my distribution and store it in the same folder
as my application. (See the end of this post for reference info).
So, my question is, if gx.dll isn't included on the device in \Windows, does
my app need to manually handle that case and dynamically load gx.dll, or does
the O/S automatically do something like:
1) Load app and sees that it requires gx.dll
2) Checks \Windows folder for gx.dll
3) If gx.dll isn't found in \Windows, check application's folder for gx.dll
4) If found, load the gx.dll found within the application folder
Or am I just supposed to always statically/dynamically link to my own copy
of gx.dll and assume that it won't be in the Windows directory? The above
makes sense to me, but I'm not sure if that's what happens, since it seems a
little hand-wavy.
I tried to delete gx.dll from the emulator to test this out but WM wouldn't
have it.
Here's one of the quotes I wrote down. I have two others, but I didn't save
their links for some reason:
"On PocketPCs and Smartphones, a specific library called "gx.dll" needs to
be placed in the \Windows folder or the application folder of your program.
Newer devices have this DLL built in, but some older devices does not. If the
file gx.dll is not available CGapiDisplay::OpenDisplay will return
GDERR_NOGAPI. The file gx.dll is included in the GapiDraw SDK in the "misc"
folder. It is recommended that you always ship gx.dll with your application."
Reference:
http://www.develant.com/docs/gapidraw/36/gapidisplay-main.htm
Would anyone happen to know what goes on behind the scenes (or at least what
Microsoft expects us to do) in the case of a missing gx.dll?
Thank you,
Chris Writely Tag: Camera Tag: 127171
RAFI and ActiveSync
Hello,
Wondering how to invoke RAPI functions once host computer and device is
connected via ActiveSync? That is, once ActiveSync begins or has
established connection between device and desktop pc, how do I begin to
perform RAPI functions? Tag: Camera Tag: 127168
How to determine if emulator has been hard reset?
Hi,
This is a repeat of a question from a few years ago:
http://groups.google.com/group/microsoft.public.pocketpc.developer/browse_thread/thread/2d462b038232464a/9728cd09efb4294f?lnk=gst&q=reset
The answer there was to check HKLM\Comm for the BootCount value.
There is no such value in anywhere in the WM6 registry. The only keys
in the registry with "boot", "count", or "reset" anywhere in their
names are:
\System\Shell\Booted
\init\BootVars
\Comm\Security\LASSD\AuthReset
None of these keys contains any subkeys or values relevant to the
number of times the unit has been rebooted.
So how can I verify that the emulator has performed a hard boot?
thanks! Tag: Camera Tag: 127165
Hiding menu CDialog
Hello,
Is there a way to hide the menu bar at the bottom of the screen in dialog
box? I created a MFC dialog box application and put the following code in the
OnInitDialog function:
-- code snippet begin --
SHMENUBARINFO mbi;
ZeroMemory(&mbi, sizeof(SHMENUBARINFO));
mbi.cbSize = sizeof(SHMENUBARINFO);
mbi.hwndParent = GetSafeHwnd();
mbi.dwFlags = SHCMBF_HIDDEN;
// also tried using the SHCMBF_HIDESIPBUTTON flag with the HIDDEN flag
SHCreateMenuBar(&mbi);
-- code snippet end --
That didn't seem to work. It works when I created a Windows application and
put the code in response to the WM_CREATE message.
The other thing that would work for me is if I can draw over that menu bar
area.
Thank you in advance for your help.
----
mark Tag: Camera Tag: 127158
SIP menu disable menu item.
Hello EB,
I'm trying to disable the "Options..." menu item in the SIP's menu
that pops up on the Pocket PC, for both - Pocket PC 2003 and WM5.0.
I'm unable to get the handle to the menu for the SIP's menu.
WM_COMMAND messages aren't fired on the click event which occurs when
I select the "Options..." menu item.
What I've done is:
//Get the handle to the SIP's window.
hSIP = FindWindow(TEXT("MS_SIPBUTTON"), TEXT("MS_SIPBUTTON")) ;
// Get the menu associated with this window.
hMenu = (HMENU) SendMessage(hSIP, SHCMBM_GETMENU, 0, 0);
// Get the sub-menu for the SIP button's menu.
hSubMenu = GetSubMenu(hMenu, 0); // Tried other position values too.
NULL ref. returned.
I also tried obtaining the system menu - using the GetSystemMenu(...)
API, but I don't get any sub-menu on the menu handle that I receive on
this call.
Where am I going wrong? How can I disable "Options..." for good? Any
help in this regard will be appreciated.
Thank you.
Warm regards,
Amit. Tag: Camera Tag: 127157
Configure networks programatically
Sometimes my devices lose their network configuration (I mean the menu
in Start > Settings > Connections > Connections > Advanced > Select
networks). The one I set sometimes changes to another for unknown
reasons....
I tried to delete the other ones but to my surprise that's not possible,
once you have created a connection there, there isn't any option to
delete it...
Can this be set from a program? If so I would just set the correct one
each time my programs start.
Thanks. Tag: Camera Tag: 127155
no more pocket console?
http://www.symbolictools.de/public/pocketconsole/applications/PocketCMD/
The venerable pocket console has disappeared, sure could use a copy
but the site seems to have gone. Anyone have a place I can get it? The
only way to get WM5 to show a console seems to be to use this and
change a registry key.
"HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo" value to "0"
Not much use without the software!
thanks Tag: Camera Tag: 127152
.net cf: BMP/PNG & Speed
Hello Community
I have a project where I have to use some bitmaps. The space is no problem
on the device, but I have some fear that the startup speed is slow when
using too many bitmaps.
So should I use BMP instead of PNG? PNG would be smaller, but bmp should
load faster, is that correct? PNG are converted first before displaying (I
use it in Me.Paint()
Thanks
James Tag: Camera Tag: 127148
Practices for packaging/distributing apps to WM 5/6/2003SE?
Hi,
I was wondering what everyone's general practice was for
packaging/distributing applications to multiple platforms? I should clarify
that...
I'm currently working on the setup for my application. I have a cabinet file
being built, and a simple Windows-based Setup.exe to go with it (currently
made with EzSetup [side-question: is there anything better?]).
But making the .cab/Setup.exe brings up a bunch of questions about how to
package and distribute my application. Namely:
1) Should I be building one cab/setup.exe per supported platform and ask the
user to choose their O/S before downloading? (In this case, I'm targeting WM
2003 SE, WM 5 and WM 6).
2) Should I create a custom Setup.exe that houses all three .cab files and
automatically chooses which one to install at runtime, depending on the
user's system?
3) Should I just create a WM 2003 SE version and distribute that? If so,
i) Is that safe? Is this what other people are doing?
ii) Are there any potential/specific issues with cross-compatibility that
I should watch out for?
iii) Is it good enough just to recompile and run the unit tests for each
O/S, or is there a specific set of extra tests I should be doing in this case.
iv) Are there any performance or visual differences between running a WM
2003/5/6 app on a WM 5/6 device?
...By the way, this is for a native C++ application, using ATL and a GUI
(I'd prefer to stay away from .NET for the setup).
It seems as though I should go with number 3, but then I start to wonder if
that's the best way to go about it. I wouldn't mind making a specialized
setup, as in number 2, if it means that the product performs and/or looks
better on my customer's devices.
As far as I can tell, most of the functions work on both all of the above
platforms. But I did notice a change in my Settings App: my dialog sizes
itself differently between the WM 2003 SE and WM 5 compiles.
It's actually a dialog window over a tab group. Both ran on a WM 5 device.
I'm not sure if that has to do with the ORIENTATION_AWARE define. I didn't
use the pre-generated ATL stuff for my project... could that be an issue?
Other than that, SecureZeroMemory() isn't supported on WM 2003 SE.
To sum up, I'm still pretty new at this. I was wondering if there's some
common/conventional wisdom about how to deploy to multiple O/S's?
If anyone would be so kind as to share your experiences about this, it would
be very much appreciated.
Thank you very much,
Chris Writely Tag: Camera Tag: 127146
Bizarre error message from SerialPort.open
I have an app that talks to COM8 (the "Outgoing" Bluetooth port on a
PDA. Periodically, when it has previously been in use, it seems, I get
the error
"The port 'COM8:' does not exist."
on sport.open().
Apart from the fact that COM8 clearly does exist, where does "COM8:"
come from? I definitely defined it as "sport.PortName = "COM8"" - so
(a) why does it think it doesn't exist, and (b) where does that colon
in the port name come from?
Peter Royle Tag: Camera Tag: 127119
Sound output using PPCSound Library
http://www.pocketpcdn.com/libraries/ppcsound.html
Hi, Anyone used the PPCSound libary at this site. Input capture
works straight off but can't get any output of the speaker, I've put
breakpoints in the wavethread.cpp functions CWaveOutThread::ThreadProc
and am getting lots of MM_WOM_DONE messages. So obviously something
is being played. Are there any bugs in it or changes that need to be made.
I checked the m_pWaveHeaderArray[iLastIndex] lpdata area to check there is
data as well!
I have my own waveout implementation which i don't think is as good as the
PPCSound
libary and i can play sound so i know my device is ok etc so i there must be
something
fundamental i'm missing for this not to work. Tag: Camera Tag: 127118
VS2005 cab deployment
Hi,
I've asked this before, but got no response.
When I create a "Smart Device CAB Project", and add a Setup DLL, it is added
twice.. once as "CESetupDLL=..." in the inf, as well as in the list of files
to copy to %InstallDir%. I can not manage to use the VS user interface to
prevent it from being added as a file to be installed.. so I have to
manually remove this from the generated .inf.
This seems like a bug to me, unless someone can tell me how to do this.
Lisa. Tag: Camera Tag: 127114
Do we need to build for MIPS, SH for WM 2003+?
Hi,
I've been trying to find confirmation on the practice of building for MIPS
and SH processors in Visual Studio 2005, instead of just building for ARM.
The closest thing I've found is from a post here by Mr. Robert E. Zaret (see
below).
The reason why I'm a bit confused is a bit long-winded, but anyway, it's
mainly because I'm also doing research on how to create a Windows-based setup
program that automatically copies and runs a .cab file on Windows Mobile
devices. It seems as though all of the examples expect the .ini file going
into CEAppMgr.exe to contain multiple .cab files, one per architecture.
This includes newer, 2005+ examples.
Could anyone confirm the following quote? It's not that I don't believe Mr.
Zaret, it's just that I haven't found anything official on this, plus the
issue above.
If it helps, I'm mainly interested in building for WM 2003 and up.
Quote:
"Microsoft controls the specifications for the Pocket PC platform
(called Windows Mobile Classic and Windows Mobile Professional, as of
Windows Mobile 6). As of Pocket PC 2002, they have decreed that the
platform supports only ARM-compatible CPUs. Also, the SDKs Microsoft
provides do not distinguish among ARM-compatible CPUs. So, unless you
are supporting some other platform(s), you have no need or ability to
support CPUs other than ARM. "
(From: post titled "Generate multi processor cab files on VS2005")
Thank you,
Chris Tag: Camera Tag: 127110
Updating DataRow throws Exception 0xC0000005
Hi guys,
I'm facing a very puzzling problem and thought maybe someone here
could help. It's been driving me nuts, really... Maybe it's something
dumb that I'm just not realizing.
I'm developing a Windows CE application (to be deployed in Windows CE
4.2 core) and my emulator is running Windows CE .NET v4.10 (build
908). I don't have a device with me now where I could test the
software, unfortunately (that's still being arranged).
One of the code bits is a button to consolidate data, merging rows in
a DataTable:
[CODE]
private void btnConsolidar_Click(object sender, System.EventArgs e)
{
for( int j=0; j < dataTable.Rows.Count; j++ )
{
DataRow row1 = dataTable.Rows[j];
String ean = (String)row1["ean"];
String cod = (String)( ( row1["codigo"] == null ) ? "" :
row1["codigo"] );
int idx;
for( idx=j+1; idx < dataTable.Rows.Count; idx++ )
{
DataRow row2 = dataTable.Rows[idx];
if( ((String)row2["ean"]) == ean || (cod != "" &&
((String)row2["codigo"]) == cod ))
{
long q1 = long.Parse((string)row1["quant"]);
long q2 = long.Parse((string)row2["quant"]);
if( bConferencia )
{
if( (string)row1["quant1"] == "0" )
{
string q =
(string)row2["quant1"];
//row1["quant1"] = q;
dataTable.Rows[j]["quant1"] = q; // CRASH!
}
if( (string)row1["quant2"] == "0" )
//row1["quant2"] = (string)row2["quant2"];
dataTable.Rows[j]["quant2"] =
(string)row2["quant2"];
}
row1["quant"] = q1+q2;
// remove a fileira copiada
dataTable.Rows.RemoveAt( idx );
//dataTable.AcceptChanges();
// row1 = dataTable.Rows[j];
// compensa a fileira removida
idx--;
}
}
}
dgItens.DataSource = dataTable;
dgItens.Refresh();
}
[/CODE]
Please forgive the commented extra code, I've been adding and removing
scaffolding looking for the problem.
What this does is something like this: suppose you have three rows,
thus:
A 0 0 7
B 4 3 0
A 0 0 3
C 1 5 0
A 2 2 0
It consolidates the same products to:
A 2 2 10
B 4 3 0
It works when you only have one product repeated (i.e., only one row1
is updated). However, if there are several repeated products,
A 0 0 7
B 0 0 5
A 2 2 0
B 4 3 0
the system crashes with a native exception (code 0xC0000005, which
research shows is an illegal memory access exception) when I try to
update the second row in the table (line marked "CRASH!", above). Note
that the first update goes well! Also, if I set it up with only one
product repeated, press the button, set it up with another product
repeated, and press the button again, it works.
I'm guessing it has to do with the way DataTable updates its rows, but
so far, I've had no luck figuring the problem out. I'll greatly
appreciate any help I can get!
Thanks in advance,
Shade. Tag: Camera Tag: 127107
Unable to complete install of ActiveSync 4.5 on a W2k3 R2 server
I have tried upgrading a working 4.2 Active Sync to 4.5 (required by the WM6)
on 2 servers (w2k3 R2). The installation never completes. Each time I click
on ActiveSync it brings up the installation dialog and performs a series of
steps only to get to the starting point when it is done. I have tried
uninstalling, rebooting and installing again with no success. What are the
steps to get this fixed? Tag: Camera Tag: 127104
try/catch
Hi,
My debug output shows an exception when using CArchive::ReadString() beyond
the end of the file.
I thought that by handling exceptions, I could prevent the debug output for
them:
CFile f;
if (f.Open(_T("\\Temp\\test.txt"), CFile::modeRead)) {
CArchive ar(&f, CArchive::load);
CString s;
try {
while (ar.ReadString(s)) {
DEBUGMSG(1, (_T("ReadString: %s\r\n"), s));
}
} catch (CArchiveException* e) {
e->ReportError(); // never gets called!
e->Delete();
}
}
However, output is still shown for CArchiveException::endOfFile, and my
exception handler is never called.
Yes, I provided the /EHsc (and tried deprecated /GX) compiler options, set
via Project Settings/C++/Exception Handling in VS 2005.
Any clues?
Lisa Tag: Camera Tag: 127098
Setting the language of an email
Can anyone tell me how you set the language of a message (programatically).
I do not see any property which can be used with IMessage which will do
this.
It can be set in pocket outlook (within options of an open message), so I
assume you must be able to set in code.
Thanks in advance.
Jason. Tag: Camera Tag: 127095
How to Editing a HTML Page Dynamically?
Dear all,
I'm currently working on Windows Mobile 6.0 platform.
My query is I would like to edit a HTML page contents before displaying it
in to the HTML control box. (Like to replace few <a href > links before
loading it)
But while going through MSDN I got a method for parsing only a XML document
using "IXMLDOMDocument2" object.
Is there any method/object available for HTML page?
Thanks,
Shankar B Tag: Camera Tag: 127094
How to Edit a HTML page dynamically?
Dear all,
I would like to edit a HTML page contents before displaying it in to the
HTML control box.
But while going through MSDN I got a method for parsing only a XML document
through "IXMLDOMDocument2" object.
Is there any method/object available for HTML page?
Shankar B. Tag: Camera Tag: 127092
Is it possible to increase the width of the caret (cursor) in CE?
I would like to widen the width of the cursor / caret throughout my
device. This is easily achieved in Windows XP/Vista. Is there any
way to programatically (or via registry) adjust the cursor width or
perhaps install a different cursor type on my device? Tag: Camera Tag: 127089
Database for a Pocket PC - Desktop syncing application
I am planning to build a utiltiy for Pocket PC and sync it's data with it's
counterpart on the desktop. Something in the lines of Illium eWallet.
What is the best database to use for this type of applications? I can use
SQL Server mobile on PDA but the SQL Server on the desktop will be overkill
for my targer audience. Access will be the right choice for desktop. I don't
see any solid solution for Access on Pocket PC.
An idea is to build a sync application to sync data between SQL Server CE
and Access on the desktop. Or build a custom binary data file.
Any suggestions please? Tag: Camera Tag: 127084
How do I make an "upgradeable" MSI-File?
Hi there,
I am stuck with updating a previous version of my application :)
I pack all needed files into a cabinet file and build than a MSI-File
around it (via the Deployment Project in Visual Studio 2008). Now, if
I start the setupt (the MSI) file and a previous version (or the same)
is already installed it tells me this fact and than exits.
What can I do to upgrade my application with an MSI file? And where
can I specify the version of my application (Since the "version" of
the MSI means the version of the installer which should be 1.0.0 I
guess)?
Thanks in advance,
Tom Tag: Camera Tag: 127081