compact framework 2.0 on wondows ce 4.2
I´ve develop an application using Visual Studio 2005 and compact framewotk 2.0.
Could be ruun on windows ce 4.2 system?
thanks Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87391
Map Control
Hello,
Can anybody recommend a .NET Compact Framework control to display a
roadmap in a mobile app, similar to Google Maps? Free or commercial
is OK. I have looked quite a bit, but have only found a few options,
and they all have some issues. I was surprised; it seems like this
would be a common control to want, and I expected the big mapping
providers to have a high-quality drop-in GUI component for sale, but
they didn't seem to.
Thanks for any advice!
----Scott. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87390
Launching instant messenger
Hello,
I'm wondering if there's a way to programatically launch a user's
mobile instant messaging client. We have a list of users and their
contact information, including IM providers and usernames, and we'd
like to provide links to start sending an IM to those users, as we
currently do to call them or send them email.
On the desktop with AOL Instant Messenger installed I can launch an
"aim:" URL to bring up AIM and start sending a message to a particular
user. ICQ supports a similar protocol, as does Google Talk.
On Windows Mobile, I can launch a "mailto:" link to start sending a
message, or use the telephony API to start a call to somebody, but
"aim:" and other protocols don't seem to be registered.
Is there a somewhat standard way to find out if a user has an IM
client for a particular service installed and tell it to start a
message to another user? If not, does anybody happen to know tricks
to do this with some of the more common mobile IM clients?
Thanks for any thoughts!
----Scott. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87389
Message constant values or magic numbers? (C#)
I didn't find any namespace for some Windows constants when I working in .NET
CF and C# (e.g. WM_PAINT or any other message constants).
I can use direct values of these message-constants but I don't like use any
"magic number" in my source codes.
It would be better if I used a namespace-constant (e.g.
System.Windows.Forms.MessageValue.WM_PAINT or somethink like this).
I can create this namespace but I think that it should exists in .NET
Compact Framework library.
Using values from standard windows.h (winuser.h) header file can make a
mistake because some constants in CE differ from constants in other
Windows versions (e.g. see WH_KEYBOARD_LL windows hook message).
The questions are:
1. Are there any namespaces to enumerate these constant values?
2. If not, how can I find a correct values for Windows messages instead of
using "magic numbers"?
LPeter Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87383
Memory stick dismount from software
How can I dismount a memory stick (from software) to save some
unwritten/cached data and any mailfunction after using? Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87382
[Semi OT] client telnet
Hi.
I'm wondering where i can find a free telnet client (VT100/VT220) for
pocketPC /Windows Mobile 5/6 ?
Thanks a lot. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87373
Panel
I am having issues with SelectNextControl when there is a panel that contains
multiple controls that have tab stops. I played with the tabindex in the
editors and things still do not work. So in my constructor of my form I
forced tabindex of my panels, but then I get a warning VSD101 saying the
method is unsupported. But if I create a temporary control variable then it
is fine. Is this a compiler error?
// This compiles fine
Control tmpCtrl;
tmpCtrl = DSetBtnPnl;
tmpCtrl.TabIndex = 50;
// This gives the following warning
//warning VSD101: Members not supported by the device platform should not be
called: System.Windows.Forms.Panel.set_TabIndex is not a supported method in
this platform
((Control)DSetBtnPnl).TabIndex = 50;
Everything runs fine on the device. I figured if I casted the panel to a
control, it should treat it as a control.
--
Thanks,
Juan Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87370
book on CF 2.0 or 3.5
Can someone suggests me a good book about compact framework 2.0 or 3.5?
Thanks
Dar Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87366
Making Video Capture library using Direct Show for windows mobile
Hi all,
I am developing an application in C# to record video. For that i am making a
WINCE Dynamic Link Library in Embedded Visual C++ 4.0 which I can call from
my C# application.
I am developing this application for ARMV4I.
In eVCPP 4.0 following is my directory setting:
C:\Program Files\Windows CE Tools\wce400\STANDARDSDK\Include\ARMV4
C:\Program Files\Windows CE Tools\wce400\STANDARDSDK\mfc\include
C:\Program Files\Windows CE Tools\wce400\STANDARDSDK\atl\include
E:\PROGRAM FILES\WINDOWS CE TOOLS\WCE500\WINDOWS MOBILE 5.0 POCKET PC
SDK\INCLUDE\ARMV4I
Following is my stdafx.h file
#include <windows.h>
#include <winbase.h>
#include <atlbase.h>
#include <streams.h>
#include <dmodshow.h>
#include <dshow.h>
#include <dmoreg.h>
#include <wmcodecids.h>
#include <uuids.h>
When I compiled my dll project I am getting following errors.
c:\wince500\pbworkspaces\rabicalc\reldir\unmanaged\unmanaged.h(35) : error
C2065: 'IImageSinkFilter' : undeclared identifier
c:\wince500\pbworkspaces\rabicalc\reldir\unmanaged\unmanaged.h(35) : error
C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\windows ce
tools\wce400\standardsdk\atl\include\atlbase.h(724) : see declaration of
'CComPtr'
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(33) : error
C2065: 'DEVMGR_DEVICE_INFORMATION' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(33) : error
C2146: syntax error : missing ';' before identifier 'di'
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(33) : error
C2065: 'di' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(43) : error
C2228: left of '.dwSize' must have class/struct/union type
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(45) : error
C2065: 'FindFirstDevice' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(45) : error
C2065: 'DeviceSearchByGuid' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(45) : error
C2440: '=' : cannot convert from 'int' to 'void *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(46) : error
C2228: left of '.hDevice' must have class/struct/union type
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(51) : error
C2065: 'StringCchCopy' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(51) : error
C2228: left of '.szLegacyName' must have class/struct/union type
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(93) : error
C2065: 'CLSID_VideoCapture' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(158) :
error C2065: 'CLSID_IMGSinkFilter' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(161) :
error C2784: 'long __cdecl ATL::CComPtr<struct IBaseFilter>::QueryInterface(
** ) const' : could not deduce template argument for ' ** ' from 'class
ATL::CComPtr *'
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(174) :
error C2065: 'm_handle' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(174) :
error C2109: subscript requires array or pointer type
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(174) :
error C2440: '=' : cannot convert from 'void *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(205) :
error C2660: 'QueryInterface' : function does not take 1 parameters
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(264) :
error C2660: 'QueryInterface' : function does not take 1 parameters
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(290) :
error C2065: 'IAMVideoControl' : undeclared identifier
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(290) :
error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\windows ce
tools\wce400\standardsdk\atl\include\atlbase.h(724) : see declaration of
'CComPtr'
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(290) :
error C2133: 'pVideoControl' : unknown size
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(290) :
error C2512: 'CComPtr' : no appropriate default constructor available
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(290) :
error C2262: 'pVideoControl' : cannot be destroyed
C:\WINCE500\PBWorkspaces\RabiCalc\RelDir\Unmanaged\Unmanaged.cpp(297) :
fatal error C1903: unable to recover from previous error(s); stopping
compilation
Anyone know whats wrong in my project setting?
Thanks Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87360
How to create PocketPC/Smartdevice/Mobile Web Project in VS 2008 or
hi to all fellows.
i m very sorry if i m posting this in wrong forum. but please intsruct
me where to post if it is wrong.
i have an question as all know in VS 2003 we can create Mobile web
application. it has a seperate project. but i can't able to find how
can i do that in VS 2008. can anyone please anyone guide me.
regards
Hassan Mushtaq Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87349
Voice Command Managed Wrapper
Does any one remember the demonstration of the Voice Command API
(http://channel9.msdn.com/showpost.aspx?postid=303900 , skip 15 minutes into
the video)?
That was demoed about a year ago, but I've not seen the API made public yet.
has any one else seen it?
Joel Johnson Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87347
Auto-detecting SD card insertion
Hello all,
Can someone point me in the direction to some c# code for auto-detecting
when a user inserts an sd card into a device?
--
Noble D. Bell
www.noblesoftware.com Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87345
Screen size on different device
Hi group,
Usually, i work on different device, and have to make my programs work
on all, with (if possible) the same look, and the same code.
i bored about write code to know where is the main menu (in top or
bottm), if it is counted or not in the client size, if the start menu
if to or bottom and so on.
from CE 5, there is also screen of the same physical size, with
resolution X 4 (width X 2, and Height X 2), i sure you know ....
Today i have a (yes it is old) CE 4.2, and a PPC 2005, and i manage
without succes to having the same result screen. I search somewhere to
start, with this ?
some factory of screen or something ?
Romain TAILLANDIER Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87342
MissingMethodException when i load 1.1 dll from 2.0 application
Hi all,
I have an application running on CF 1.1. I want to upgrade this
application to 2.0 but one of the referenceses is outsourced and
written in delphi 2005 so I can't get 2.0 version of that. I tried to
load this dll from 2.0 application but I get
System.MissingMethodException. Is it possible to load 1.1 managed dll
from 2.0 application.
Thanks. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87339
Start process remotely and wait for execution
Hi All,
Is it possible to get return code from remotely started process? Wait
until process stops execution?
Thanks, Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87337
Connection to GPRS with P/Invoke
hello
i m using VS 2003 with C# in CF 1.0.
i have made application of chatting client. my requirement is when
user bind to any socket it first made connection of GPRS. so can some
one give me code of how to connect to GPRS in CF 1.0/
i have following code. but it is not working.
public class GPRSConnection
{
const int S_OK = 0;
const uint CONNMGR_PARAM_GUIDDESTNET = 0x1;
const uint CONNMGR_FLAG_PROXY_HTTP = 0x1;
const uint CONNMGR_PRIORITY_USERINTERACTIVE = 0x08000;
const uint INFINITE = 0xffffffff;
const uint CONNMGR_STATUS_CONNECTED = 0x10;
static Hashtable ht = new Hashtable();
static GPRSConnection()
{
ManualResetEvent mre = new ManualResetEvent(false);
mre.Handle = ConnMgrApiReadyEvent();
mre.WaitOne();
CloseHandle(mre.Handle);
}
~GPRSConnection()
{
ReleaseAll();
}
public static bool Setup(Uri url)
{
return Setup(url.ToString());
}
public static bool Setup(string urlStr)
{
ConnectionInfo ci = new ConnectionInfo();
IntPtr phConnection = IntPtr.Zero;
uint status = 0;
if (ht[urlStr] != null)
return true;
if (ConnMgrMapURL(urlStr, ref ci.guidDestNet, IntPtr.Zero) != S_OK)
return false;
ci.cbSize = (uint) Marshal.SizeOf(ci);
ci.dwParams = CONNMGR_PARAM_GUIDDESTNET;
ci.dwFlags = CONNMGR_FLAG_PROXY_HTTP;
ci.dwPriority = CONNMGR_PRIORITY_USERINTERACTIVE;
ci.bExclusive = 0;
ci.bDisabled = 0;
ci.hWnd = IntPtr.Zero;
ci.uMsg = 0;
ci.lParam = 0;
if (ConnMgrEstablishConnectionSync(ref ci, ref phConnection,
INFINITE, ref status) != S_OK &&
status != CONNMGR_STATUS_CONNECTED)
return false;
ht[urlStr] = phConnection;
return true;
}
public static bool Release(Uri url)
{
return Release(url.ToString());
}
public static bool Release(string urlStr)
{
return Release(urlStr, true);
}
private static bool Release(string urlStr, bool removeNode)
{
bool res = true;
IntPtr ph = IntPtr.Zero;
if (ht[urlStr] == null)
return true;
ph = (IntPtr)ht[urlStr];
if (ConnMgrReleaseConnection(ph, 1) != S_OK)
res = false;
CloseHandle(ph);
if (removeNode)
ht.Remove(urlStr);
return res;
}
public static void ReleaseAll()
{
foreach(DictionaryEntry de in ht)
{
Release((string)de.Key, false);
}
ht.Clear();
}
[StructLayout(LayoutKind.Sequential)]
public struct ConnectionInfo
{
public uint cbSize;
public uint dwParams;
public uint dwFlags;
public uint dwPriority;
public int bExclusive;
public int bDisabled;
public Guid guidDestNet;
public IntPtr hWnd;
public uint uMsg;
public uint lParam;
public uint ulMaxCost;
public uint ulMinRcvBw;
public uint ulMaxConnLatency;
}
[DllImport("cellcore.dll")]
private static extern int ConnMgrMapURL(string pwszURL, ref Guid
pguid, IntPtr pdwIndex);
[DllImport("cellcore.dll")]
private static extern int ConnMgrEstablishConnectionSync(ref
ConnectionInfo ci, ref IntPtr phConnection, uint dwTimeout, ref uint
pdwStatus);
[DllImport("cellcore.dll")]
private static extern IntPtr ConnMgrApiReadyEvent();
[DllImport("cellcore.dll")]
private static extern int ConnMgrReleaseConnection(IntPtr
hConnection, int bCache);
[DllImport("coredll.dll")]
private static extern int CloseHandle(IntPtr hObject);
}
so please help me
regards
Hassan Mushtaq Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87327
Vibrate Windows Mobile 5.0 with P/Invoke
hello to all fellows
i am using VS 2003 with CF 1.0 and C#. i have pocket PC (Windows
Mobile 5.0). my task is to vibrate a pocket pc with p/invoke. i have
found a solution but it is not working in my favour. it gives me
exception Missing Method Exception
my code is
[DllImport("aygshell.dll")]
private static extern int Vibrate(int cvn,IntPtr rgvn,bool
fRepeat,uint dwTimeout);
public static bool Play()
{
int result = Vibrate(0, IntPtr.Zero, true, 0xffffffff);
if(result!=0)
{
return false;
}
return true;
}
[DllImport("aygshell.dll")]
private static extern int vibrateStop();
public static bool Stop()
{
int result = vibrateStop();
if(result!=0)
{
return false;
}
return true;
}
but when i call play() for vibration MissingMethod Exception occurs.
can anyone give me solution
regards
Hassan Mushtaq Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87326
Accessing files in mobile device programmatically from a PC
Hi guys,
I have a number of mobile devices which will be connected, one at a
time, to a PC. (USB connection + ActiveSync.) I need to run a program
(C#) in the host PC that can access each device's memory in turn and
exchange files with them.
Here's the catch; I'd like to *not* have to run a program from each
device as I place it on the cradle, relying instead on the included
ActiveSync features. I.e., it should be as easy as placing the next
device and pressing a key in the host PC.
I'm having trouble getting to the appropriate folder. Using the
"Explore" button in ActiveSync gives me the "Mobile Device" folder,
from where I can navigate to the appropriate drive -- but I can't get
there any other way. If I use an OpenFileDialog it never shows me the
device in My Computer, even though Windows Explorer does.
Any hints?
Thanks in advance!
Cheers,
Pedro. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87305
vb.net
Hello,
Just want to ask about text parsing in vb.net.... I have a textfile and i
want to get the decimal number.. when i to get the 1.52 i can get the right
result but when the digit become 10.26 i only get the 0.26... is there a code
that will recognized if the place value changes? Or can i get a length of
text and a code will determine the numbers so that i will only get numbers
not the whole text??
Thanks
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-compact-framework/200803/1 Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87298
Application crashes when user receives incoming call
Hello Friends,
I am facing one problem. I have one timer in my application which sends job
refresh request to server at regular interval. Now when user is using this
application and if there is any incoming call, application crashes.
Now my question is, is it something related with this interval? I call web
service when timer elapses..?
Please help me..
Viral Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87291
SLOW bitmap from Stream
Hi,there
i 'm writing an application about bitmap displaying.But i find it
works not very well because of the terrorable performance .
here's my code
/// <summary>
/// Get BMP according to the FrameNumber,then display
/// </summary>
/// <param name="FrameNo"></param>
/// <param name="FandR_Flag">direction</param>
/// <returns></returns>
public Bitmap createImage(int FrameNo, int FandR_Flag)
{
string xustr;
byte[] xutest;
xustr = "CAM";
//find image,cost about 1ms
xutest = ri.Fun_GetSpeData(xustr, FrameNo, FandR_Flag);
//read byte[] into memostream,cost about 1ms
MemoryStream ms = new MemoryStream(xutest, 0, xutest.Length);
//here cost 423ms to construct an bmp, what happened
here?!!!!!!!!!!!!!!!!!!!!!!!!
Bitmap bmp = new Bitmap(ms);
xutest = null;
ms.Close();
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
return bmp;
}
Any suggestion?
Thanks in advance~
Regards,
Freesc Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87290
Download Mobile Redistributable 3.5
Hi Community,
as written in the Subject, i am looking for a download for
the Redistrubutible SQL mobile 3.5 f.i. as cab.
I do not want tha a customer of mine will install it via active sync
the whole package (23MB) that is shown here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=38ED2670-A70A-43B3-87F3-7AB67B56CBF2&displaylang=en
I am looking for a smaller Redistributable that
runs only on the PocketPC
Rainer Borchmann Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87288
TimeSpan calculation error
Hi,
Assuming dt1 and dt0 (DateTime structs) represent times about or less than
one second apart, then using:
(dt1 - dt0).TotalSeconds (or TotalMilliSeconds, or dt1.Subtract (dt0))
returns 0.0 *or* 1.0 whereas on the desktop, .NET can return any value
between 0.0 and 1.0.
Is this a known issue?
Hilton Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87287
Failed HttpWebRequest to an HTTPS server takes 100% of CPU
We have a CE 5.0 application (.NET CF 2.0) that we use to download files from
both secure and non-secure servers over HTTP and HTTPS. When making a request
to a misconfigured server over HTTPS, we noticed that the CPU on our device
would jump to 100% and stay there indefinately. We traced this to a thread
that appears to be created when calling HttpWebRequest.GetResponse().
It appears that when we make a request to this specific server, the TCP
connection gets established and the client sends its "Client Hello" message
to the server. The server immediately closes the connection (you can see the
FIN-ACK from the server over Wireshark). Here is where the problem occurs:
If you are making this request from a client PC using the full .NET
framework, the client completes the handshake by sending its own FIN and the
connection is closed. HttpWebRequest.GetResponse() returns immediately with
an error stating that the server closed the connection.
However, if you are making this request from a CE 5.0 client running the
compact framework, the connection never gets closed from the client side.
Instead, HttpWebRequest.GetResponse() does not return until the specified
timeout expires. In addition to this, even after calling Abort() on the
request object, a thread is leftover that seems to spin forever and takes up
100% of the CPU.
This does not appear to happen when making non-HTTPS requests, nor when
making requests to a properly configured server or a server that is not
listening on port 443 at all.
I was able to recreate this easily by writing a simple test server that runs
on Windows XP (in C++) and test client for CE in C#. The test server listens
for a TCP connection on a port, accepts a connection, receives one packet and
then closes the socket. The test client simply creates an HttpWebRequest
object for the specified server and port and calls GetResponse(). Every time
(repeatable on more than one device and more than one computer hosting the
server) the call to GetResponse() will result in a spawned thread that eats
up the CPU. Again, calling Abort() on the request object does not seem to
clean things up.
Does anyone have any ideas? I have pasted the code below, but can send the
solution files if required.
================================================
SimpleTCPServer (C++ Win32)
================================================
#include <winsock2.h>
#include <windows.h>
#include <stdio.h>
#define LISTEN_PORT 9091
int _tmain (int argc, TCHAR* argv[])
{
WSADATA wsaData;
SOCKET sock = INVALID_SOCKET;
sockaddr_in local;
SOCKET client;
sockaddr_in from;
int fromlen=sizeof(from);
char buf[512];
// initialize WinSock
if(WSAStartup(MAKEWORD(2,2), &wsaData))
{
printf("WSAStartup() failed\r\n");
return 0;
}
while(true)
{
// create socket
local.sin_family=AF_INET;
local.sin_addr.s_addr=INADDR_ANY;
local.sin_port=htons((u_short)LISTEN_PORT);
sock = socket(AF_INET, SOCK_STREAM, 0);
if(sock == INVALID_SOCKET)
{
printf("socket() failed\r\n");
WSACleanup();
return 0;
}
// bind
if(bind(sock, (sockaddr*)&local, sizeof(local))!=0)
{
printf("bind() failed\r\n");
closesocket(sock);
WSACleanup();
return 0;
}
//listen
if (listen(sock, 5) != 0)
{
printf("listen() failed\r\n");
closesocket(sock);
WSACleanup();
return 0;
}
// accept the connection
printf("Waiting for client to connect on port %d...\r\n", LISTEN_PORT);
client = accept(sock, (struct sockaddr*)&from, &fromlen);
printf("Accepted TCP connection from %s\r\n", inet_ntoa(from.sin_addr));
// receive the first packet
int bytes = recvfrom(client, buf, sizeof(buf), 0, (struct
sockaddr*)&from, &fromlen);
printf("Received %d bytes from client\r\n", bytes);
// close the connection
printf("Closing connection\r\n\r\n", bytes);
closesocket(client);
shutdown(sock, SD_BOTH);
closesocket(sock);
}
WSACleanup();
return 0;
}
================================================
SSLClient (CE 5.0, .NET CF 2.0) (just a blank form with a "Send" button on it)
================================================
...
private const string SERVER = "192.168.1.92";
private const int PORT = 9091;
private void SendSSLRequest()
{
HttpWebRequest request = null;
HttpWebResponse response = null;
try
{
request = (HttpWebRequest)(WebRequest.Create("https://" +
SERVER.ToString() + ":" + PORT.ToString() + "/"));
request.Timeout = 5000;
request.ReadWriteTimeout = 5000;
response = (HttpWebResponse)request.GetResponse();
}
catch (Exception ex)
{
}
finally
{
if (response != null)
{
response.Close();
response = null;
}
if (request != null)
{
request.Abort();
request = null;
}
}
} Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87282
Enum property of custom control does not appear in VS2005/2008 (C#
Hi,
I created a .NET CF custom control with a standard type (int) property and a
custom one (enum) like this:
public enum EnumTest
{
Value0,
Value1,
Value2
}
When
a./ I use an import method using [DllImport()] or
b./ I declare any other device-specific field (e.g. field from
Microsoft.WindowsCE.Forms.MessageWindow)
the enum property of my custom control class does not appear in the Visual
Studio property editor.
There is not necessary to use the imported method or anything from the
MessageWindow field.
In addition, there is no error/warning message about VS's problem.
Otherwise, the standard typed property (int) appears correctly in this case.
My questions are:
1. How can I make visible my custom typed (enum) property in the designer?
2. Enum is not a device-specific part of my control but the VS does not
display it. Why?
I would appreciate it if anybody would help me. Thanks! Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87281
Debug a CF application on a PC
Hi
I know its possible to run a CF application on a normal PC. But is it
possible to debug it?
I would like to start writting my application on a PC first. Its
faster and much easier to debug the functionality on the PC.
When I uses a normal projekt it uses the full framework and I have to
dobbel check if I have used som function not in the CF.
I have added reference to the CF version of System.Windows.Forms,
System.* etc instead of those from the full framework. If I then uses
some unsupported function I get compile errors.
But the problem i, that when I edit the dialog or add new controls,
unsupported functionality is added by Visual Studio 2005.
If I create a CF projekt, Visual Studio launches an emulator instead
and I cant debug on the PC
Is it possible to make Visual Studio not launching an emulator when
debugging of a CF application?
Is it possible to tell VS, just to add/use CF compatible functions on
controls?
/Thomas Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87279
NETCFv35.Messages.xx.wm.cab for dutch WM?
"An error message is available for this exception but cannot be displayed
because these messages are optional and are not currently installed on this
device. Please install 'NETCFv35.Messages.EN.wm.cab' for Windows Mobile 5.0
and above or 'NETCFv35.Messages.EN.cab' for other platforms. Restart the
application to see the message."
I installed NETCFv35.Messages.EN.wm.cab but I still get the above error.
My HTC P6300 has WM5 - dutch version.
It might be a language problem. But I don't find a dutch version of
NETCFv35.Messages in C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\Diagnostics.
Who can help? Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87268
Assembly conversion to Pocket Pc format
Hi,
I want to convert windows assemblies to Pocket PC format. Is it possible ?
If so how to do that ? Do we have any tools to convert as have tools for
converting video and audio files to Pocket PC format ?
Thanks in Advance
Harsha. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87262
How to write IExtenderProvider control for .NET CF?
Hi,
I searched all over the net and I can't find no info how to do this,
other then this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158930&SiteID=1.
I would like to rewrite this example
http://msdn2.microsoft.com/en-us/library/system.componentmodel.iextenderprovider.aspx
for Compact Framework, and I would like to do it VS2005 way.
VS2005 suggests to use .xmta file which will produce
*.PocketPC.asmmeta.dll file. The article I found also suggests to
create yet another library where the designer would be.
Does this mean that now instead of distributing two libraries (one for
runtime one for design time) I have to distribute three (an extra
*.PocketPC.asmmeta.dll)?
I have a hard time to believe it.
Can anyone shed some information on this?
Thank you.
Rastio. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87258
Memory problem with SqlCeEngine.Compact
Hi all,
We are having a memory leak, in our application. The problem
is that we only can reproduce it 3 times. And we cannot find the
pattern of this bug.
In our application when the user finishes one special section, an
automatically full backup is executed (If the users setup it in this
way).
Our backup does this:
///close all DReaders, Dcomad's, and connections to de DB
SqlCeEngine engine = new SqlCeEngine("Data Source = DB.sdf"));
engine.Compact("Data Source='"DBBK.sdf ";");
engine.Dispose();
/// open connection again to the DB.sdf
The error we log is this:
Error Message:
Not enough storage is available to complete this operation.
Stack Trace:
at System.Data.SqlServerCe.SqlCeEngine.ProcessResults()
at System.Data.SqlServerCe.SqlCeEngine.Repair()
at System.Data.SqlServerCe.SqlCeEngine.Compact()
at Backup.CompactDatabaseBackUp()
at Backup.CreateBackUp()
at BackUpControl.DoBackUp()
We are using CF 2.0, and the bug was reproduce with a 3 MB DB.
As I tell you before, this happens occasionally. So I don't know what
to do, I call the GC.Collect or GC.WaitForPendingFinalizers always
before SqlCeEngine.Compact is call?, or do I have any way to know how
memory is at the moment, and if is necessary I call GC.Collect ?
Thanks,
Mariano Vicario
www.ranu.com.ar Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87257
Establishing TLS 1.0 between .Net Framework and .Net CD on CE 6
I need to establish a secure socket connection between my .Net 3.5 Framework
applcation and a CE 6.0 R2 .Net CF device using TLS 1.0. ANy assistance would
be appreciated. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87256
.net CF C# Writing to Exif
Hi!
I've spent about a week diving into this problem and I've found some
solutions on c++ (via opennetcf.com).
I'm not able to use this solution on c# because of IntPtr & Marshal
I'm not able to use
Marshal.PtrToStructure(IntPtr, ImageCodecInfo); -- this is not working
because of struct is not sequential.
which I need to iterate through installed codecs.
This(http://www.eggheadcafe.com/articles/20030706.asp) is great
article about the subject, but I'm not able to use it in CF because of
lack of methods in Drawing.Imaging in CF. I've tried to use this
solution and edit it to use OpenNetCF framework with no success(I'm
just not able to read ImageCodecInfo from OpenNetCF).
Is there any way how to work(write/read) with Exif in .net CF C#?
I'm desperately looking for some solution for my diploma thesis.
If you have any information regarding this issue please let me know.
Thanks in advance for any help.
I enclose some other website which I've found usefull.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=553938&SiteID=1
- here is incomplete solution
--------------------------------------------------------------------------------
Ondrej Paulicek, MCP, MCTS Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87253
.net CF C# Writing to Exif
Hi!
I've spent about a week diving into this problem and I've found some
solutions on c++ (via opennetcf.com).
I'm not able to use this solution on c# because of IntPtr & Marshal
I'm not able to use
Marshal.PtrToStructure(IntPtr, ImageCodecInfo); -- this is not working
because of struct is not sequential.
which I need to iterate through installed codecs.
This(http://www.eggheadcafe.com/articles/20030706.asp) is great
article about the subject, but I'm not able to use it in CF because of
lack of methods in Drawing.Imaging in CF. I've tried to use this
solution and edit it to use OpenNetCF framework with no success(I'm
just not able to read ImageCodecInfo from OpenNetCF).
Is there any way how to work(write/read) with Exif in .net CF C#?
I'm desperately looking for some solution for my diploma thesis.
If you have any information regarding this issue please let me know.
Thanks in advance for any help.
I enclose some other website which I've found usefull.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=553938&SiteID=1
- here is incomplete solution in c++
--------------------------------------------------------------------------------
Ondrej Paulicek, MCP, MCTS Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87252
Text to speech
I must develop TTS functionality in my application, so I'm looking
for samples or 3rd party SDK products.
Any idea?
marcello Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87251
microsoft.windowsmobile.telephony
Hi
I am new to the Mobile development. I have installed windows SDK 5.0, i want
to microsoft.windowsmobile.telephony.dll. I guess this assembly is part of
Windows Mobile SDK 5.0. But it is not showing in the add refe windows.
anyone got any idea? Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87248
Save Bitmap as PNG with transparency?
Hi!
Windows Mobile 6.0, CF 3.5
I noticed that Bitmap.Save(xxx, ImageFormat.Png) (and Gif) does not
preserve transparency when inspecting the image in for example PhotoShop.
I even tried to run through each pixel before the save by executing
if (bmp.GetPixel(x, y) == Color.White)
bmp.SetPixel(x, y, Color.Transparent);
(debug showed that the SetPixel statement was executed)
Does anyone have some solution on how to save a bitmap as PNG (or gif)
where white is made total transparent?
--
Bjorn Brox Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87247
Mobile 6 classic emulator - cant hard reset
Hi,
I've been using the Mobile 6 emulator for a while now and have been unable
to Hard Reset it. When I Hard Reset it, its the equivalent of doing a Soft
Reset. Anyone else experienced this? Does anyone know of a way i can force a
Hard Reset on this emulator? I'm using VS2005.
Thanks,
Dav Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87245
CF 3.5 development in VS2005?
Hello,
I´m new to Wm Development and I´m wondering if it is possible to
develop CF3.5 Solutions in Visual Studio 2005?Or is it only possible
in Visual Studio 2008?
Thanx for youre answers
thomas
--
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87241
Is the TypeConverter attribute supported in CF 2.0?
Does anybody know if the TypeConverter attribute is suppored in CF
2.0? I have found an example of a person using it claing to be in the
CF world... But I get a compile error that TypeConverter is not an
attribute class. MSDN seems to show that it isn't supported which
would back up the compiler error.
Here is a link to the example that I found:
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/52fe4d21322edafb/4d3059ecce1ed73d?lnk=gst&q=typeconverter#4d3059ecce1ed73d
What I'm trying to do is databind an object without using the Parse
and Format methods. In the full framework we have implemented this by
creating a class derived from TypeConverter and all of our Business
Objects specify this class by using the TypeConverter attribute. Does
anybody know how I can convert a string to my Business Object in the
business layer (textbox binding). Right now I have to do it in the UI
layer using code like this...
private void orderNumberBinding_Parse( object sender, ConvertEventArgs
e )
{
e.Value = new OrderNumber( e.Value as string );
}
Any help is appreciated. Thank you!
Jerod Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87240
How do you check to see if a hand-held device's power is on or not
I would like to know if there is an easy way, through WM 6 SDK, that I can
check to see if my PPC's power is on or if it is in sleep mode. I would like
to try and find some code in c# if possible. Any help would be great.
Thanks in advance,
--
Noble D. Bell
www.noblesoftware.com Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87238
ListBox.UseTabStops
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C87E02.7AFEEA60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Env.: VS2008, WM6, .NET CF 3.5
Hi All,
I need to display columns in a listbox. Although VS's forms designer =
lets you think embedding \t works, it actually doesn't :-(
Is there any way to add this behaviour to the ListBox? Actually, what I =
need is ListBox.UseTabStops for CF.
I don't use a ListView for this reason: Some items have text splitted =
into 3 columns but some just display one chunk of text accross the width =
of the control, such as this (assuming formatting of this post is =
preserved):
Lorem ipsum dolor sit amet
consectetuer adipiscing elit.
Lor 12345687 ipsum
Lorem 987654321 ipsum
Lore 654789123 ipsum
I considered using a monospaced font but it looks ugly.
Any solution will be warmly welcome.
TIA,
Serge.
------=_NextPart_000_000A_01C87E02.7AFEEA60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16609" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Env.: VS2008, WM6, .NET CF =
3.5</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hi All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I need to display columns in a listbox. =
Although=20
VS's forms designer lets you think embedding \t works, it actually =
doesn't=20
:-(</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is there any way to add this behaviour =
to the=20
ListBox? Actually, what I need is ListBox.UseTabStops for =
CF.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I don't use a ListView for this reason: =
Some items=20
have text splitted into 3 columns but some just display one chunk of =
text=20
accross the width of the control, such as this (assuming formatting of =
this post=20
is preserved):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Lorem ipsum dolor sit =
amet</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>consectetuer adipiscing =
elit.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Lor =
12345687 =20
ipsum</FONT></DIV>
<DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>Lorem 987654321 =20
ipsum</FONT><FONT size=3D2></FONT></DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3D"Courier New" size=3D2>Lore 654789123 =20
ipsum</FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I considered using a monospaced font =
but it looks=20
ugly.</FONT></DIV>
<DIV> </DIV>
<DIV>Any solution will be warmly welcome.</DIV>
<DIV> </DIV>
<DIV>TIA,</DIV>
<DIV> </DIV>
<DIV>Serge.</DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_000A_01C87E02.7AFEEA60-- Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87232
Upgrade project from PPC2003 to Mobile 5
Hi,
I have a project written for Pocket PC 2003. It has been written in VS2005.
Is there a quick way to upgrade the project to target Mobile 5? My app will
run on Mobile 5 but I was wanting to upgrade the entire project to target
Mobile 5 if possible.
Cheers,
Dav Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87230
What to use dataset or xml in compact framework
I have to develop the win application for handheld. i m using
webservice for all bussiness logic or for data transfer.
i want to ask which is the best to get from web service XML or
dataset.
is it best to get return result in XML or dataset from webservice. i
have a major performance issue. so which is best so the performance is
good.
i also have to manipulate some information on handheld application.
So please suggest me what is best to use or xml or dataset. Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87229
Creating a shell link (CF3.5 C#)
Hi!
Using compact framework 3.5, C#
Could anyone tell me how I create a shell shortcut to a file within a C#
program (Form button action)?
I am in a need of add or remove a link to an exe file to the
\\windows\\startup folder.
--
Bjørn Brox Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87224
Create patch deployment package
Hi,
Can someone tell me how one can create a patch installation package(cab) for
a c# application targetted for Windows CE platform? For desktop windows/web
applications we use microsoft's Orcas tool to create a patch installation.
Does Microsoft provide something similar available for Windows CE
applications? What are the third-party tools that can be used to build a
patch?
Thnx Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87223
Drawing an Image at Full Screen
I want to draw an image at full screen (use the full 320x240 screen
dimensions).
Ideally, I'd like to be able to show the image such that my
application's form remains focused --
eg. Display the image within a control within my form; have a 'Go
FullScreen' menu option which then would paint the image at full
screen; and then if the user presses one of the menu keys, the image
go back to 'windowed' mode and the menu action takes place as if it
were in 'windowed' mode.
So step one is drawing the image at full screen. Is there any way for
a control to draw itself outside of its bounds? How does the media
player control go into full screen? Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87222
Determine software version
How do I programatically determine the version of executables on Mobile 5 and
6 devices from a seperate executable?
I'm running an app on mobile 5 and I want that app to determine the version
of other excutables that are sitting on the same PDA.
Thanks!
Eric Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87212
newbie question
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C87D59.78CB7460
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
New to non-desktop world.
When I try to create a Smart Device application, the VS 2005 gives the =
following options:
PocketPC 2003
Smartphone 2003
WinCE 5.0
I can understand to select WinCE as that is my target, but what is the =
difference between these? Sorry, I am a long long time desktop =
developer. New to this wonderland.
Also, what is the latest WinCE? how do i load it?=20
Help on this will be greatly appreciated.
------=_NextPart_000_0006_01C87D59.78CB7460
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>New to non-desktop =
world.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>When I try to create a Smart Device =
application,=20
the VS 2005 gives the following options:</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>PocketPC 2003</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Smartphone 2003</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>WinCE 5.0</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>I can understand to select WinCE as =
that is my=20
target, but what is the difference between these? Sorry, I am a long =
long time=20
desktop developer. New to this wonderland.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Also, what is the latest WinCE? how =
do i load it?=20
</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Help on this will be greatly=20
appreciated.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0006_01C87D59.78CB7460-- Tag: Compact framework 2.0 on wondoes ce 4.2 Tag: 87197
there are any version of compact framework 2.0 dor windoes ce 4.2?