Archive for the ‘CodeProject’ Category.
June 9, 2010, 19:00
For an actual project I needed a tftp server service for a Windows 2003 server. I looked around in internet and only found tftp servers running in user space, no real windows service. So I searched for source code applications I could use and found tftpUtil at sourceforge.net (http://sourceforge.net/projects/tftputil/). Although the short description states it would implement a service, it does not in reality. But the tftpUtil class was more or less easy to use and so I started to write a service ‘wrapper’ around it.
protected override void OnStart(string[] args)
{
AddLog("OnStart entered...");
StartTFTPServer();
...
}
Continue reading ‘Writing a tftp server windows service’ »
June 1, 2010, 19:55
Although there are well know ways to update the GUI from a background thread not running in the GUI thread, I looked for an easiest to use solution. After some experiments I got a background thread class that is very easy to use. No BeginInvoke or Control.Invoke needed any more to update a GUI element.
The final solution uses a MessageWindow inside a control based class with a worker thread. As the control and the MessageWindow is part of the GUI thread, there is no need to use Invokes.
Inside the thread I use SendMessage to transfer background thread informations to the control, which then fires an event you can subscribe in the GUI thread.
The test app attached shows three threads running independently and all update the GUI frequently without blocking the GUI.

Here is my try to visualize my idea and solution

Continue reading ‘Mobile Development: Easy to use background thread with GUI update’ »
Tags:
Background Thread,
C#,
Compact Framework,
DotNet,
event handler,
GUI thread,
Invoke,
MessageWindow,
Mobile Development,
SendMessage,
WM_COPYDATA,
WndProc,
Worker Thread Category:
CodeProject,
Programming |
Comments Off on Mobile Development: Easy to use background thread with GUI update
May 27, 2010, 15:41
Although you may find this combination useless, here is something that will transmit data from a Windows Mobile device to a PC and the PC will type (like a barcode scanner keyboard wedge) the transmitted data.
The workflow theory is:
- You scan a barcode or RFID TAG and the data is wedged into the SocketSend input textbox or you type some text into the textbox.
- You connect your mobile device to the network, where you have a Windows PC running SocketWedge.
- On the mobile within SocketSend you tap the transmit button and the data is send to SocketWedge.
- SocketWedge receives the data and puts it in the keyboard message queue of a defined application.
- The data is typed into the target application.
Continue reading ‘Transmit data from WinMo device to PC: SocketWedge and SocketSend’ »
April 27, 2010, 17:55
SetupDll_Zip
Update 14. sept 2010: fixed source code and template files, please use the new files only
Create windows ce cab files which install a complete directory structure onto a device. I created
this small tool, as I needed an easy to use tool to create a pseudo installation cab.
The DLL will unzip a archiv file with all dirs onto a device. To build a new cab use the directory
structure you will find below cabdir.

Continue reading ‘Windows CE and Mobile SetupDll with unzip support’ »
Tags:
7za,
batch,
cabwiz,
ce_setup.h,
iniutil,
patch,
sed,
setupdll,
unzip,
wince-zip-unzip-dll,
windows ce,
windows mobile Category:
CodeProject,
Programming,
Tools |
Comments Off on Windows CE and Mobile SetupDll with unzip support