|
Hi Guys,
I'm trying to make a WinCE application that will work as a reminder, this application is going to be run by the OS every time interval, the application will play a sound to remind or notify the user, OK? until now everything is just fine, the problem is that this application should mute, halt, suspend - I don't know what is the best word to describe the process - any program(s) that is playing a sound, just like the situation when a phone call is received, if any application is playing any sound, it will be muted or halted
until the ringing is finished if the user didn't answer the call or until the user finishes the call, after that the sound playing will be resumed.
The question is: how can I accomplish something like that?
Thank you in advance for any kind of help.
Regards,
Ayman
|
|
|
|
|
hi all,
i want to develop an activex control with http connection for the mobile ie.
and i'm going to use the CAtlHttpClient class, but the complier reported the error: cannot find atlhttp.h.
i use vs2008 and have already copy the atlhttp.h file and the related files to the folder "$VS2008/VC/altmfc/include".
who can tell me how to resolve this problem, thanks~
|
|
|
|
|
Hi
i do the first steps in vs 2008 mobile programming.
On my local pc i have a text file, which i would like to open with a streamreader.
Where i have to put the text file on my local pc?
I always get the error 'file not found' - is it possible the directly access to e.g. 'g:\test.txt' ?
I do not understand the path-organization (of the mobile device) while debugging.
Thank you very much for some ideas.
juergjakob
|
|
|
|
|
Make sure the text file is part of your project. If you right-click on the file and select "Propertues" from Visual Studio in the properties window that appears ensure that the file is set as content. Doing that will ensure it gets copied to the same folder as your application.
Once copied you must use the absolute path to the file in order to properly open it. Chances are you can use code like the following:
string fileName="MyFile.txt"
string FullPath=Path.Combing(Path.GetDirectoryName(this.GetType().Assembly.GetModules()[0].FullyQualifiedName),fileName);
|
|
|
|
|
Hi..
I have a question to ask. How would i actually remove a selected item from a listbox into a database. I have created these codes for my form but it says invalid operation although the selected item does actually inserted into the database. Also, I am using foreach statement to get the selected item but if there is multiple text inside the listbox. the selected item being inserted into my database would have been doubled..
private void btnSave_Click(object sender, EventArgs e)
{
SqlCeConnection listConn = new SqlCeConnection("Data Source = \\My Documents\\ContactsDB.sdf");
try
{
listConn.Open();//--open conection--
if (listosend.SelectedItem == null)
{
MessageBox.Show("No Item Selected");
}
else
foreach (string item in listosend.Items)
{
SqlCeCommand insertCommand = listConn.CreateCommand();
SqlCeCommand insertCommand2 = listConn.CreateCommand();
System.Diagnostics.Trace.WriteLine("List Box : " + listosend.Text);
//listosend.Items.Remove(listosend.SelectedItem.ToString();
insertCommand.CommandText = "Insert into Orders(OrderDate, Food) VALUES ( '" + txtDate.Text + "','" + item + "')";
insertCommand.ExecuteNonQuery();
insertCommand2.CommandText = "Insert into Customers (PhoneNo) VALUES ('" + txtFrm.Text + "')";
insertCommand2.ExecuteNonQuery();
listosend.Items.Remove(item);
}
listConn.Close();//--close connection--
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
|
|
|
|
|
Hi All
I am having a little trouble with the code below. I am trying to create an application that acts kind of like a service for windows mobile, but everytime I debug, it simply end and it should remain resident in the memory to intercept the sms and check if it meets a certain criteria.
Please help me
Imports Microsoft.WindowsMobile.PocketOutlook.MessageInterception<br />
Imports HWButton.TAPI<br />
Imports Microsoft.WindowsMobile.PocketOutlook<br />
Imports Microsoft.Win32<br />
Imports System.Runtime.InteropServices<br />
<br />
<br />
Module Module1<br />
Public SMSCap As MessageInterceptor = Nothing<br />
Dim imsi As String<br />
Dim Recipient As String<br />
Const RegKey As String = "Software\InterCept\WM65"<br />
Public SMSSend As SmsMessage<br />
Dim ResponseNum As String<br />
Dim oldimsi As String<br />
Public Class ProcessInfo<br />
Public hProcess As IntPtr<br />
Public hThread As IntPtr<br />
Public ProcessID As IntPtr<br />
Public ThreadID As IntPtr<br />
End Class<br />
<br />
<DllImport("CoreDll.DLL", SetLastError:=True)> _<br />
Private Function CreateProcess(ByVal imageName As [String], ByVal cmdLine As [String], ByVal lpProcessAttributes As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal boolInheritHandles As Int32, ByVal dwCreationFlags As Int32, _<br />
ByVal lpEnvironment As IntPtr, ByVal lpszCurrentDir As IntPtr, ByVal si As Byte(), ByVal pi As ProcessInfo) As Integer<br />
End Function<br />
<br />
<DllImport("coredll")> _<br />
Private Function CloseHandle(ByVal hObject As IntPtr) As Boolean<br />
End Function<br />
<br />
<DllImport("coredll")> _<br />
Private Function WaitForSingleObject(ByVal hHandle As IntPtr, ByVal dwMilliseconds As UInteger) As UInteger<br />
End Function<br />
<br />
<DllImport("coredll.dll", SetLastError:=True)> _<br />
Private Function GetExitCodeProcess(ByVal hProcess As IntPtr, ByRef lpExitCode As Integer) As Integer<br />
End Function<br />
<br />
Private Sub LaunchApp(ByVal strPath As String, ByVal strParms As String)<br />
Dim pi As New ProcessInfo()<br />
Dim si As Byte() = New Byte(127) {}<br />
CreateProcess(strPath, strParms, IntPtr.Zero, IntPtr.Zero, 0, 0, _<br />
IntPtr.Zero, IntPtr.Zero, si, pi)<br />
' This line can be commented out if you do not want <br />
' to wait for the process to exit<br />
'WaitForSingleObject(pi.hProcess, &HFFFFFFFF)<br />
Dim exitCode As Integer = 0<br />
GetExitCodeProcess(pi.hProcess, exitCode)<br />
CloseHandle(pi.hProcess)<br />
CloseHandle(pi.hThread)<br />
Exit Sub<br />
End Sub<br />
<br />
Private Sub SMSCap_MessageReceived(ByVal sender As Object, ByVal e As MessageInterceptorEventArgs)<br />
Dim sender1<br />
Dim comms<br />
Dim command As String<br />
Dim req As String<br />
sender1 = ((DirectCast(e.Message, SmsMessage).From.Address))<br />
Recipient = (sender1.ToString)<br />
comms = ((DirectCast(e.Message, SmsMessage).Body))<br />
command = (comms.ToString)<br />
'*************** Commands ***********<br />
req = (command.Substring(4, command.Length - 4)).ToLower<br />
Select Case req<br />
Case ("prg")<br />
MsgBox("It works")<br />
End Select<br />
End Sub<br />
<br />
Private Sub VerifyKeys()<br />
Dim HKCU As RegistryKey = Registry.LocalMachine<br />
Dim VeriKey As RegistryKey = HKCU.OpenSubKey(RegKey, True)<br />
ResponseNum = VeriKey.GetValue("RPNum")<br />
End Sub<br />
Sub Main()<br />
If MessageInterceptor.IsApplicationLauncherEnabled("InterCept") Then<br />
SMSCap = New MessageInterceptor("InterCept")<br />
Else<br />
SMSCap = New MessageInterceptor(InterceptionAction.NotifyAndDelete)<br />
SMSCap.MessageCondition = New MessageCondition(MessageProperty.Body, MessagePropertyComparisonType.StartsWith, "cmd", False)<br />
SMSCap.EnableApplicationLauncher("InterCept", "\\Program Files\\DeviceApplication1\\DeviceApplication1.exe")<br />
End If<br />
AddHandler SMSCap.MessageReceived, AddressOf SMSCap_MessageReceived<br />
PhoneInfo.Get(Nothing, Nothing, Nothing, Nothing, imsi)<br />
Dim HKCU As RegistryKey = Registry.LocalMachine<br />
Dim VeriKey As RegistryKey = HKCU.OpenSubKey(RegKey, True)<br />
If imsi = VeriKey.GetValue("RegCode") Then<br />
<br />
Else<br />
SMSSend = New SmsMessage(ResponseNum, "ATT! Sim changed on phone. Send Tracking commands to this number!")<br />
SMSSend.Send()<br />
End If<br />
End Sub<br />
<br />
End Module<br />
|
|
|
|
|
Well, from looking in it you've got nothing to keep the program within the main function. It's registering some things and then continuing on to exit the main procedure. You need a message processing loop in your program.
|
|
|
|
|
Hi,
I would like to migrate a CE 5.0 handheld product to Windows Mobile 6.5 (Not application migration, looking for OS Migration details)
Currently product supported features are: 802.11 a/b/g, Bluetooth, WPA or WPA2 security, WWAN, GSM/GPRS, GPS receiver, Barcodes, Display and Keyboard properties (touch screen, function keys, alpha numeric keys), Interfaces( USB Host & Client, Powered RS-232, Ethernet etc) etc.
My understaning is to migrate this product to WM, get the WM binaries from Microsoft and pull required drivers from current Win CE OS image and put in to new WM OS image. As WM on top of WinCE, changes in drivers will be very less. If I am wrong please share what are the changes required here.
Also I feel there will not be any chanegs requried in BSP/boot loader. Please correct me if my understaning is wrong or if anything I am missing here please let me know.
Ultimately I would like to know what will be the technical appraoch to migrate WINCE 5.0 to WM 6.5.
Thanks for your help.
Reagrds,
Noushad
|
|
|
|
|
Hi,
I'm writing a replacement for the volume control of Windows Mobile. To do so my program hooks the keyboard and listens for keypresses on the volume hardware keys. This works great but if WMP is in foreground it doesn't work. I've found the same behaviour in HTC FM Radio.
Why do these programs break the keyboard hook and how can I get this working?
This is the hook code (nothing special I think):
hookDeleg = new HookProc(HookProcedure);
hHook = WinApi.SetWindowsHookEx(WinApi.WH_KEYBOARD_LL, hookDeleg, WinApi.GetModuleHandle(null), 0);
if (hHook == 0)
{
MessageBox.Show("Keyboard Hook Failed", "VolumeKeys Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
Application.Exit();
}
|
|
|
|
|
Hi,
I want to write System files in window CE Compact flash card so that it
boots from CF flash. The files are
1.Configuration file: bootcepc.cnf
2. Boot logo .pcx file: bootcepc.pcx
3. Kernel Image file (nk.bin)
To write i have just copied file's by copy and paste in Flash but it doesn't
work and i am getting error like "Boot failure" . I heard about a utility
named (makeCFUtility) used to write in Flash. But i don't know how to
download this utility.
Is there is any other way to write system files in Flash card.
I am using Advantech single board (PCM-3370 F) with 128 MB RAM . The OS used
is Window CE 5.0.
priyank
|
|
|
|
|
pri_skit wrote: I heard about a utility
named (makeCFUtility) used to write in Flash. But i don't know how to
download this utility.
Did you try searching via Google?
|
|
|
|
|
Yes , i tried but i am getting non relevant results.
priyank
|
|
|
|
|
What about these[^]?
[EDIT]bad spacing [/EDIT]
|
|
|
|
|
Hi Folks,
The Nokia WRT Plug-in 2.2 for Aptana Studio is now available. This new version provides support for use of the plug-in on computers running Linux based Ubuntu 8.04 and Apple Mac OS X Snow Leopard.The Plug-in provides a set of tools for the creation, testing, debugging, and deployment of Web Runtime (WRT) widgets in Aptana Studio.
It supports the development of WRT widgets for any S60 device supporting WRT. This includes support for the development of home screen views and use of the Platform Services integration APIs. In case you want more details on this, just goto http://www.forum.nokia.com/info/sw.nokia.com/id/00d62bd8-4214-4c86-b608-5f11b94dad54/Nokia_WRT_Plug_in_for_Aptana_Studio.html
|
|
|
|
|
Hello mobogeek,
Thanks for your news, very nice!
But please edit the type of your post to news!
Thanks,
Nathan Paulino Campos
|
|
|
|
|
Hi,
I wrote a program using VC++ that should scan for available wireless networks in the area.
In my SW I use the commands OID_802_11_BSSID_LIST_SCAN and OID_802_11_BSSID_LIST.
My questions are:
1. How can I Force the Wireless NIC to do ACTIVE SCAN (as contrary to PASSIVE scan) ?
2. According to tests that I did, the card does not flush the list between scans, i.e. I get for several scan a result of an AP that was on air during an old scan, but is no longer there, and new scans return's it's data as if it is still there.
A code part that I used is attached - in order to illustrate which functions I am using.
NDIS_802_11_BSSID_LIST* m_pBSSIDList;
m_pBSSIDList = (NDIS_802_11_BSSID_LIST *) VirtualAlloc (NULL,
sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE) ;
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
oidcode = OID_802_11_BSSID_LIST_SCAN;
DeviceIoControl (m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof(oidcode),
(ULONG *) NULL,
0,
&bytesreturned,
NULL);
Sleep (6100);
oidcode = OID_802_11_BSSID_LIST;
if (DeviceIoControl( m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof(oidcode),
(ULONG *) m_pBSSIDList,
sizeof(NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
&bytesreturned,
NULL) == 0)
{
return NULL;
}
else
{
return m_pBSSIDList;
}
If you have any idea of how can I solve my problems, or if you see that I forgot any important line- please let me know.
I am open to hear about completely new ways to do this. only requirement is that I will use VC++.
Thanks a lot,
--Amit.
|
|
|
|
|
This is for a PC app, not a mobile phone app, in VB.NET or C#. I am still assuming this is the best forum for the question.
What is the best way to go about writing a program using the .NET framework and free tools available to access information on a cell phone and transfer files in both directions? This is a broad question, since I would like to know whether Bluetooth or USB is the better way to go. I would also like to know which maker, among the largest (Nokia, Samsung) is easier to use in this way.
|
|
|
|
|
|
is this for Windows, then use the RAPI dll.
|
|
|
|
|
Hello everyone,
I have been working on an application prototype for couple of months now. The app is used frequently by the user throught the day and make extensive use of GPS for location aware functionality and communicates with server over GPRS/3G. It runs on Windows Mobile at present. We may eventualy want to use as much source code as possible to develop a version of this app for other mobile devices say Netbook/Notebook with a 3G card etc (this way we can re-use business logic and have different UI layer written which is specific to the device). The chosen development language so far has been C++ - MFC because we have been biased towards using C++ for performance reason. I have explored couple of cases to see what suits best for our app development moving forward
- C#/.NET compact framework or
- MFC or
- a Web application may be using Silverlight
Each have a positive and negative point for ex - MFC apps will have small memory footprint considering limited virtual memory on Window Mobile OS but development effort and complexity increases and it is not future proof. C# on the other hand is the choice moving forward because I believe MS will be want .NET CF and many .NET based technologies like Silverlight on Windows Mobile platform, Also you can run .NET CF applications on Desktop most of the time etc etc
My question is - do you know of any case where you made a decision of language and environment for similar application? do you have any advice based on your experiences so far on Windows Mobile development.
|
|
|
|
|
I'm biased towards C# for most applications because it is a rapid development language. The amount of effort taken to do most general task is highly reduced by the language facilities. Of course depending on how low level the functionality is that you use you may have to make extensive use of P/Invoking.
|
|
|
|
|
Thank you Joel. I work with C# and see the benefits but I need to find some case where it will really turn the decision in favor of managed code using .NET CF. I have a few cases with me but would like to see CPians view before finalizing (I have not made the decision yet and the views I read here will impact that)
On few forums I read posts which advice not to use managed code on Winmo because of performance, battery, and memory foot print issues with any code that requires runtime on mobile devices. What are your views on this?
|
|
|
|
|
Hi,
I am looking for a portible Email Client for Embedded OEM system.
Can someone help me?
Regards,
Kobi
|
|
|
|
|
I want to develope an application that can Run on Blackberry and aswell as
IPhone so plz guide me what r the tools for Supporting cross platform applications...
thx for Any suggestion
|
|
|
|
|
you can't. Blackberry is based on Java. iPhone is based on Objective-C.
|
|
|
|
|