|
Good Day,
I have a Class Person, this class have members like Name, Age, Address and Picture.
I then have a List<person which contains 2 instance of Class Person. I serialized the list using XMLSerializer and was able to produce an XML file.
I then hosted the XML file on my local IIS. I created a simple Mobile Application to download the XML File. The XML file was downloaded and deserialized successfully. However, it took nearly 1.5 minutes to download a 213KB XML file via HttpRequest-HttpResponse.
So, I tried creating a web service. The webservice deserializes the XML file then returns the List.
[WebService]
public List<person> GetPersonData()
{}
This time, it was faster since it just took 29 seconds to get my data. However, 29 seconds is still too long for a 213KB file and I expect that the XML data will reach at least 1MB.
Is it slow because it is running in the Emulator? If not, what can you suggest to speed things up?
Basically, the XML File (Data) is stored in the server and the Mobile App needs to get the data from the server and process it.
Thanks!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
I am getting following error in my when build my project.
Error 1 Projects targeting .NET Compact Framework 1.0 require version 1.1 of the .NET Framework, which is not detected on this machine. SmartDeviceApplication
Please reply this soon.
|
|
|
|
|
Right click the Project then select "Upgrade Project".
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Thanks for your reply but it did not solve my problem.
There is no such option in Visual Studio 2005.
waiting for your reply.
|
|
|
|
|
Hi,
I am trying to build a test application which uses LDAP (WLDAP32.lib) functions. It is linking without any issues when I build it for the emulator (and running on it) but it is giving me Linker error when built for the Device (I have set the library wldap32.lib in Project settings for both configurations correctly). Details are given below.
Dev platform: eVC++4.0
Device: Symbol MC9060/Win CE
Error/Device/Linker/When wldap32.lib is set in project settings
---------------------------------------------------------------
Linking...
Creating library ARMV4Dbg/LDAPTest.lib and object ARMV4Dbg/LDAPTest.exp
LDAPTestDlg.obj : error LNK2019: unresolved external symbol ldap_bind_sW referenced in function "protected: void __cdecl CLDAPTestDlg::OnLogin(void)" (?OnLogin@CLDAPTestDlg@@IAAXXZ)
Tried giving extern "C" wrapping for #include <winldap.h>. Didn't help.
NoError/Emulator/When wldap32.lib is set in project settings
------------------------------------------------------------
Generating Code...
Linking...
LDAPTest.exe - 0 error(s), 0 warning(s)
Downloading files
Downloading file c:\ldaptest\ldaptest\emulatordbg\ldaptest.exe.
Downloading file c:\program files\windows ce tools\...\lib\x86\mfcce400d.dll.
Finished downloading.
Another Observation during trouble shoot (giving just as a FYI)
---------------------------------------
When I removed the wldap32.lib from Emulator Project settings, the Linker error message doesnot look same as the error message for Emulator (note the prefix __imp__).
Linking...
LDAPTestDlg.obj : error LNK2019: unresolved external symbol __imp__ldap_bind_sW referenced in function "protected: void __thiscall CLDAPTestDlg::OnLogin(void)" (?OnLogin@CLDAPTestDlg@@IAEXXZ)
My questions are - Why it is giving a Linker Error for Device where it does not give the error for Emulator? How to solve it?
|
|
|
|
|
Hello Everybody,
I have a handheld device for which I have to force the phone to work only when the device is in the cradle. The device is running windows mobile 5.0 and the SystemState.CradlePresent is not working. Does anyone knows how can i force the phone to run only in the cradle?
Thank you.
|
|
|
|
|
For a project we needed to have a label that is fixed-width, but the height was variable. Since the Compact Framework 2.0 doesn't have any support for this , we had to make our own implementation.
If anyone has a better solution for this problem or has a optimization for this code, please do say.
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace SmartDeviceProject3.CustomComponents
{
class FixedWidthLabel : Label
{
private Graphics g;
new public int Height
{
get
{
return base.Height;
}
}
new public int Width
{
get
{
return base.Width;
}
set
{
base.Width = value;
calculateHeight();
}
}
new public Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
calculateHeight();
}
}
new public string Text
{
get
{
return base.Text;
}
set
{
base.Text = value;
calculateHeight();
}
}
public FixedWidthLabel(Graphics g, int fixedWidth, string text)
: base()
{
this.g = g;
base.Text = text;
base.Width = fixedWidth;
base.Height = calculateHeight();
}
private int calculateHeight()
{
SizeF stringSize = g.MeasureString(base.Text, base.Font);
int rows = 1;
if (stringSize.Width > base.Width)
{
rows = (int)Math.Ceiling((double)stringSize.Width / base.Width);
}
return rows * (int)stringSize.Height;
}
}
}
|
|
|
|
|
Why is it supported in the Compact Framework when there appears to be no way to change the clip region
|
|
|
|
|
There is a way to change the clip region: set the Clip property of the Graphics object. Supported since .NET Compact Framework 1.0.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
I have written a program for sending SMS from my PC. But there is a small problem that is the message did not save in the inbox of the mobile phone. Pl help in this regard. The complete code is
Imports System.IO.Ports
Public Class Form1
Dim WithEvents serialport As New IO.Ports.SerialPort
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1
ComboBox1.Items.Add(My.Computer.Ports.SerialPortNames(i))
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If serialport.IsOpen Then
serialport.Close()
End If
Try
With serialport
.PortName = ComboBox1.Text
.BaudRate = 96000
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With
serialport.Open()
Catch ex As Exception
End Try
serialport.WriteLine("AT+CMGF=1" & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("AT+CMGS=" & Chr(34) & "destination" & Chr(34) & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("test message" & vbCrLf & Chr(26))
System.Threading.Thread.Sleep(200)
End Sub
End Class
|
|
|
|
|
Is there any library to easily implement fancy UI effects like zoomin/out, flipping,..etc ?
|
|
|
|
|
I have written a program for sending SMS from my PC. But there is a small problem that is the message did not save in the inbox of the mobile phone. Pl help in this regard. The complete code is
Imports System.IO.Ports
Public Class Form1
Dim WithEvents serialport As New IO.Ports.SerialPort
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1
ComboBox1.Items.Add(My.Computer.Ports.SerialPortNames(i))
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If serialport.IsOpen Then
serialport.Close()
End If
Try
With serialport
.PortName = ComboBox1.Text
.BaudRate = 96000
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With
serialport.Open()
Catch ex As Exception
End Try
serialport.WriteLine("AT+CMGF=1" & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("AT+CMGS=" & Chr(34) & "destination" & Chr(34) & vbCr)
System.Threading.Thread.Sleep(200)
serialport.WriteLine("test message" & vbCrLf & Chr(26))
System.Threading.Thread.Sleep(200)
End Sub
End Class
|
|
|
|
|
BaudRate = 96000?
try to set the BaudRate 9600 or 115200.
Or you can use "AT+CMGF=0\r" to try
|
|
|
|
|
hello, everybody
There's some problems bothers me, such as: change the Item height of ListView Control,ListView_GetItem macro can return TRUE, but Can't get Item properties!
this ListView is created by CreateWindow.
Another question:How can I attach HIMAGELIST to this ListView and display only one image in this imagelist?
can anybody help me?
thanks very much.
|
|
|
|
|
Hi,
I am programming for Windows CE 5.0 by using evc++ 4.0.I want to ask that how can I create a soft input panel.I am not so experianced so I want only to see the keyboard on the screen by the simplest way.Is that possible?
Thanks,
ibrahim
|
|
|
|
|
I'm not familiar with EVC++, but I supposed you are writing "a native code".
You can use CreateWindow. Look in the WM SDK help for class name of the SIP control
|
|
|
|
|
Hello Friends
My aim is to make a mobile application using C# dot net which will be used to send messages using twitter
I am having function's by calling which i can achieve requirements, problem is that those functions utilize System.Web Namespace which is not available with the C# windows mobile application so i added a reference to my project System.web.dll but now another problem is coming that is i need to execute a function which uses the below code
WebClient client = new WebClient()
This class can be used with desktop application
Please tell me how to start with this in a better way
If any links are known which can make a advantage with my work
please send me
thanks and regards
( '' Sorry is something Unnecessary is written NEW TO MOBILE APP DEVELOPMENT '')
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
I am developing Application using Wince.Net.
I want to remap the Keys.means we use the rotary switch for navigational purpose so i want to do that when i rotate the switch it act like left arrow key when press it it act like enter key pls help me
#include "stdafx.h"
#include "resource.h"
#include "Types.h" //Include All Global Variable And Function.
#include "tchar.h"
#define TIMER_DISPLAY 1
#include "CMonApp.h"
// Global Variables for Application
CMonApp oCMonApp;
void tempwave(HWND);
// Global Variables:
HINSTANCE ghInst; // current instance
HWND ghWnd; // Main Application Window, parent to all other windows.
wchar_t szTitle[STRTAB_STRINGSIZE]; // The title bar text
wchar_t szAppName[STRTAB_STRINGSIZE]; // The title bar text
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK MenuDlgProc(HWND,UINT,WPARAM,LPARAM);
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
SignalStarted(_wtol(lpCmdLine));
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_Wnd_Class_Name, (LPTSTR)szAppName, STRTAB_STRINGSIZE);
// Load the Application Name String from String Table.
LoadString(hInstance, IDS_TITLE, (LPTSTR)szTitle, STRTAB_STRINGSIZE);
// Load the Application Title String from String Table.
MyRegisterClass(hInstance); //Call function MyRegisterClass to Create Class of Main Application
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDS_TITLE);
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASS wc;
wc.style = 0;
wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = 0;
wc.hCursor = 0;
wc.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = 0;
wc.lpszClassName = (LPTSTR)szAppName;
return RegisterClass(&wc);
}
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
ghInst = hInstance; // Store instance handle in our global variable
ghWnd = CreateWindow((LPTSTR)szAppName,(LPTSTR)szTitle, WS_VISIBLE|WS_POPUP,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
if (!ghWnd)
{
return FALSE;
}
nCmdShow = SW_SHOWMAXIMIZED;
ShowWindow(ghWnd, nCmdShow);
ShowCursor(FALSE);
UpdateWindow(ghWnd);
return TRUE;
}
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
HWND hTray;
HFONT hFont;
static sicount;
//CDisplayResources oCDisplay;
switch (message)
{ // This message is sent when an application requests that a window be created by calling the CreateWindow
case WM_CREATE:
//Application Start-up Process
// Create various modules of the application.
// These objects have been created at run-time (instead of static allocation) to have run-time control on them.
oCMonApp.mpoDataCaputre = new CDataCapture;
oCMonApp.mpoDataStore = new CDataStore;
oCMonApp.mpoDataDisplay = new CDataDisplay( ghWnd);
// Setup various modules
// Register various modules with each other, where ever required
oCMonApp.mpoDataCaputre->RegisterFriends(oCMonApp.mpoDataStore);
oCMonApp.mpoDataDisplay->RegisterFriends(oCMonApp.mpoDataStore);
// All the modules are created and setup now.
// Start the process of data capture, display etc.
oCMonApp.mpoDataCaputre->StartDataCapture();
// Sample code for Trace calls.
CMonTrace1("Sample Trace1\n", 0, 0, 0, 0, 0);
CMonTrace2("Sample Trace2\n", 0, 0, 0, 0, 0);
CMonTrace3("Sample Trace3\n", 0, 0, 0, 0, 0);
//hTray=FindWindow(L"Shell_TrayWnd",NULL);
//ShowWindow(hTray,FALSE);
SetTimer(hWnd,TIMER_DISPLAY,10000,NULL);
break;
case WM_PAINT:
//MessageBox(NULL,TEXT("WE are in Paint"),TEXT("CMON.CPP"),MB_OK);
CMonTrace1("WndProc: WM_PAINT Msg\n", 0, 0, 0, 0, 0);
PAINTSTRUCT ps;
HDC hdc;
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
oCMonApp.mpoDataDisplay->DrawFreshDisplay();
break;
case WM_CMON_TICK: // Application defined message for Primary Time Tick
CMonTrace1("WndProc: WM_CMON_TICK Msg.\n", 0, 0, 0, 0, 0);
oCMonApp.mpoDataDisplay->UpdateDisplay();
break;
case WM_DESTROY:
// Delete all objects created during Start-up Process.
delete oCMonApp.mpoDataCaputre;
delete oCMonApp.mpoDataDisplay;
delete oCMonApp.mpoDataStore;
PostQuitMessage(0);
break;
case WM_KEYDOWN: // This message is posted to the window with the keyboard focus when a nonsystem key is pressed.
switch(wParam)
{
case VK_HOME:
DialogBox(ghInst,MAKEINTRESOURCE(IDD_MENU),hWnd,MenuDlgProc);
break;
case VK_END:
// Delete all objects created during Start-up Process.
delete oCMonApp.mpoDataCaputre;
delete oCMonApp.mpoDataDisplay;
delete oCMonApp.mpoDataStore;
PostQuitMessage(0); // This indicates to the system that a thread has made a request to terminate (quit).
break;
default:
break;
}
break;
//case WM_TIMER:
// //tempwave(hWnd);
// HDC hDc;
// HPEN hPen;
// RECT Rect;
// hDc=GetDC(hWnd);
// HBRUSH hBrush;
// hPen = CreatePen( PS_SOLID, 1,RGB(0,0,255));
// SelectObject( hDc, hPen);
// hBrush = CreateSolidBrush( RGB(0,0,0));
// SelectObject( hDc, hBrush);
// GetClientRect(hWnd,&Rect);
//
/*switch(wParam)
{
case TIMER_DISPLAY:
HDC hDc;
HPEN hPen;
RECT Rect;
hDc=GetDC(hWnd);
HBRUSH hBrush;
hPen = CreatePen( PS_SOLID, 1,RGB(0,0,255));
SelectObject( hDc, hPen);
hBrush = CreateSolidBrush( RGB(0,0,0));
SelectObject( hDc, hBrush);
GetClientRect(hWnd,&Rect);
for(int x=10;x<rect.right-150;x+> {
MoveToEx(hDc,x,20,NULL);
LineTo(hDc,x,Rect.bottom);
}
for(int y=20;y<rect.bottom;y+> {
MoveToEx(hDc,0,y,NULL);
LineTo(hDc,Rect.right-158,y);
}
}*/
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
/**********************************************************************************************
* Name : GetCMonInstance.
*
* Synopsis : Get the Global Instance.
*
* Return Value:
* ghInst-(HINSTANCE)Return Instance.
*************************************************************************************************/
HINSTANCE GetCMonInstance()
{
return( ghInst);
}
/**********************************************************************************************
* Name : GetCMonWindow.
*
* Synopsis : Get HANDEL of Window.
*
* Return Value:
* ghWnd-(HWND)Return Handle Of window.
*************************************************************************************************/
HWND GetCMonWindow()
{
return( ghWnd);
}
BOOL CALLBACK MenuDlgProc(HWND hWnd,UINT wMsg,WPARAM wParam,LPARAM lParam)
{
HMENU hMenuMain,hMenu;
//MapWindowPoints(hWnd,HWND_DESKTOP,&pt,1);
hMenuMain=LoadMenu(ghInst,MAKEINTRESOURCE(IDR_MENU2));
hMenu=GetSubMenu(hMenuMain,0);
int uError=0;
HANDLE hButton;
hButton=GetDlgItem(hWnd,IDC_BUTTON1);
TPMPARAMS tpm;
tpm.cbSize=sizeof(tpm);
GetClientRect(hWnd,&tpm.rcExclude);
switch(wMsg)
{
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_BUTTON1:
SendMessage((HWND)hButton,BM_SETSTATE,1,0);
uError=TrackPopupMenuEx(hMenu,TPM_LEFTALIGN|TPM_RETURNCMD|TPM_TOPALIGN,10,320,hWnd,&tpm);
if(uError==0)
{
MessageBox(NULL,TEXT("ERROR"),TEXT("BUT1"),MB_OK);
}
return TRUE;
}
break;
/* case WM_ENTERMENULOOP:
MessageBox(NULL,TEXT("Enter"),TEXT(""),MB_OK);
break;*/
}
return FALSE;
}
void tempwave(HWND hWnd)
{
HDC hDc;
HPEN hPen;
RECT Rect;
hDc=GetDC(hWnd);
HBRUSH hBrush;
hPen = CreatePen( PS_SOLID, 5,RGB(0,0,255));
SelectObject( hDc, hPen);
hBrush = CreateSolidBrush( RGB(0,0,0));
SelectObject( hDc, hBrush);
GetClientRect(hWnd,&Rect);
//// /////////////////////////////////
/*hPen = CreatePen( PS_SOLID, 5,RGB(0,0,255));
SelectObject( hDc, hPen);
hBrush=CreateSolidBrush(RGB(0,0,0));
hBrush=(HBRUSH) GetStockObject(WHITE_BRUSH);
hDc = GetDC(hWnd);
GetClientRect(hWnd,&Rect);
MoveToEx(hDc,Rect.right/2,0,NULL);
LineTo(hDc,Rect.top,Rect.bottom);*/
/////////////////////////////////
for(int x=10;x<rect.right-150;x+> {
MoveToEx(hDc,x,20,NULL);
LineTo(hDc,x,Rect.bottom);
}
for(int y=20;y<rect.bottom;y+> {
MoveToEx(hDc,0,y,NULL);
LineTo(hDc,Rect.right-158,y);
}
if (hBrush)
{
DeleteObject( hBrush );
}
// Delete your pen.
if (hPen)
{
SelectObject( hDc, hPen );
DeleteObject( hPen );
}
}
|
|
|
|
|
I'm not sure if I got your question, but here is some pseudo-code:
int RemapKey(int OldKey){
switch (OldKey){
case VK_LEFT: if (RotarySwitch = ...) return VK_RETURN
...
}
}
...
case WM_WMKEYDOWN:
int NewKey = (int)wParam;
if ( condition for remaping )RemapKey(NewKey);
switch (NewKey){
.... standart key handling
}
You need to keep RotarySwitch with a value, according to rotation.
You need to remap only keys that will change with rotation.
Of course the easiest way is to use a table for remaping, instead of long cases, but I wrote this just to illustrate the idea and the main logic.
|
|
|
|
|
thankes its really good solution i already tried this but how can i handle KEYDOWN event on dialog box.
|
|
|
|
|
unless you don't need some special key input (arrows, tab) it is simple:
BOOL CALLBACK MenuDlgProc(HWND hWnd,UINT wMsg,WPARAM wParam,LPARAM lParam)
...
switch(message) {
...
case WM_KEYDOWN:...
}
If you need the special keys ... well I don't know simple answer. The problem is that you will not receive WM_KEYDOWN message. The only answer that I know is to sub-class all controls inside ... but if you have more 2-3 controls ... it is ... not good.
If somebody knows easy way to make MenuDlgProc to receive this special keys ... please share it.
|
|
|
|
|
hello code project.
i have created an application
-receives sms
-process data
-update on public ip sql server connection
-reply confirmation that work is done with status
now if i start internet explorer GPRS/EDGE connection starts automatically and before the data connection ends (opened for browser) my application update in sql server perfectly, but if i send sms for data update on sql server , when data connection was somewhere ended up automatically. it doesnt start a data connection to connect over internet ip sql server, so connection fails and i get my error sms that could not open sql connection, since there was no data connection to web.
it should start GPRS, but do not anyway.
my question is. what is important to be connected over GPRS, when my application needs it.
i am stuck.
please help.
struggle boosts the wisdom
|
|
|
|
|
Is there a preferred size to try and keep 3rd party DLLs under? I'm trying to port the VCF over to Win CE, and I'm guessing the final size of all three core libraries will be ~3 Mb. Is this too much for WinCE? Are there things to do with build settings that help keep the DLL size down? I'm building with code generation set to Multi-Threaded DLL and the MinSize optimizations on.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
You need to understand the CE memory model[^]. This applies up to and including Windows CE 5.0, including all released versions of Windows Mobile. Windows CE 6.0 introduces a new virtual address space model, but Windows Mobile 6 is still based on CE 5.0.
I would strongly recommend making it available as static libraries, not DLLs. You're free to have as big an EXE as you like. Well, within the limit of whatever your device OEM left for you. That article doesn't illustrate it, but Windows Mobile has completely blown the new 32MB Slot 1 area for Execute-In-Place libraries. Devices generally ship with less than 16MB address space available. The Windows Mobile 5.0 Phone Edition VGA emulator shipped with Visual Studio 2005 has 18MB virtual address space free after a full reset; Windows Mobile 6's emulator raises this to about 25MB so they've clearly done some work on this.
Note that this only applies to native libraries; it doesn't apply to .NET DLLs as they are not loaded through the OS loader. They take up private process heap instead.
Working on large .NET applications, with a very large number of forms, it's very common to run into MissingMethodExceptions with an error message of "Can't find PInvoke DLL", which occurs simply because the address that the DLL would need to load into has already been taken by some other allocation.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
As a practical example, I'm just trying to package up our latest project. The handheld on which it runs, a ruggedised device with integrated barcode scanner, WiFi, GPRS and Bluetooth radios, has only 11.75MB of virtual address space free - and due to the number of device driver threads running, less than 1MB free in device.exe, so it's always right on the margin of failing.
On a previous device, we had to resort to stopping some drivers loading and removing some of the Today screen plugins to get a usable environment.
We're asking the OEM to replace the copy of .NET Compact Framework that's execute-in-place in the ROM with .NET CF 2.0 SP2. The customer is large enough, and ordering enough units, that they're considering it.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|