Help for Marshalling
Below is the unmanaged code written with evc++
-------------------------------------------------------------------------------------------------------------------------------
#include <windows.h>
#include <windowsx.h>
#include <aygshell.h>
#include <msgqueue.h>
#include <pnp.h>
#include <diskio.h>
#include <Pkfuncs.h>
#include <sdcardddk.h>
extern "C" _declspec(dllexport) void WINAPI OnRawRead(DWORD
memory_location,unsigned char* lpOutBuf)
{
// TODO: Add your control notification handler code here
HANDLE hDevice
=CreateFile(L"DSK1:",GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
SG_REQ lpInBuf;
DWORD dwDummy = 3;
//unsigned char *lpOutBuf;
lpOutBuf = (unsigned char *)malloc(512);
memset(lpOutBuf, 0x00, 512); // only to see the changes
lpInBuf.sr_start = memory_location;//0xFF;//0x0018555; //
physical sector to read
lpInBuf.sr_num_sec = 1; // read 1 sector
lpInBuf.sr_num_sg = 1;
lpInBuf.sr_status = 0; //ERROR_SUCCESS;
lpInBuf.sr_callback =NULL;// callbackDiskRead;
lpInBuf.sr_sglist[0].sb_buf = ((LPBYTE)
MapPtrToProcess(lpOutBuf,GetCurrentProcess()));
lpInBuf.sr_sglist[0].sb_len = 512 * lpInBuf.sr_num_sec;
BOOL bRet=DeviceIoControl(hDevice, // Handle to the device
IOCTL_DISK_READ, // IOCTL for the operation
&lpInBuf, // LP to a buffer (input data)
sizeof(lpInBuf), // Size in Bytes of input data
buffer
lpOutBuf, // LP to a buffer for output data
sizeof(lpOutBuf), // Size in Bytes of output buffer
&dwDummy, // LP to variable (size of data in out
buffer)
NULL);
CloseHandle(hDevice);
}
extern "C" _declspec(dllexport) void WINAPI OnRawWrite(DWORD
memory_location,unsigned char* pBuffer)
{
HANDLE hDevice1
=CreateFile(L"DSK1:",GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
SG_REQ lpInBuf1;
DWORD dwDummy1 = 3;
char *lpOutBuf1;
lpOutBuf1 = (char *)malloc(512);
memset(lpOutBuf1, 0x00, 512); // only to see the changes
strcpy(( char*)lpOutBuf1,( char *)pBuffer);
lpInBuf1.sr_start = memory_location; //0x0018555; // physical
sector
lpInBuf1.sr_num_sec = 1; // number of sectors sector
lpInBuf1.sr_num_sg = 1;
lpInBuf1.sr_status = 0; //ERROR_SUCCESS;
lpInBuf1.sr_callback =NULL;// callbackDiskRead;
lpInBuf1.sr_sglist[0].sb_buf = ((LPBYTE)
MapPtrToProcess(lpOutBuf1,GetCurrentProcess()));
lpInBuf1.sr_sglist[0].sb_len = 512 * lpInBuf1.sr_num_sec;
BOOL bRet=DeviceIoControl(hDevice1, // Handle to the device
IOCTL_DISK_WRITE, // IOCTL for the operation
&lpInBuf1, // LP to a buffer (input data)
sizeof(lpInBuf1), // Size in Bytes of input data
buffer
lpOutBuf1, // LP to a buffer for output data
sizeof(lpOutBuf1), // Size in Bytes of output buffer
&dwDummy1, // LP to variable (size of data in out
buffer)
NULL);
CloseHandle(hDevice1);
}
-------------------------------------------------------------------------------------------------------------------------------
The functions do some basic rawread and rawwrite on an SD card.
Now how can i use this code in the c# (managed code). Specifically i
need to know how to marshal "char *".
I did try out with the following code (the dll created by evc++ was
SD_card_dll.dll. But it doesnt seam to work.
[DllImport("SD_card_dll.dll")]
public static extern void OnRawRead(int memory_location,ref
IntPtr lpOutBuf);
[DllImport("SD_card_dll.dll")]
public static extern void OnRawWrite(int memory_location,ref
IntPtr lpBuffer);
}
Thanks and Regards,
Rithesh
Student
IIIT, Bangalore Tag: get the forms objects within my project ?? Tag: 77234
Cannot overwrite file open with FileShare.ReadWrite
Create a simple test app:
private void Form1_Load(object sender, EventArgs e)
{
FileStream fs = new FileStream(@"\sd card\test.txt",
FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
}
Try to copy another test.txt file over \sd card\test.txt and get error
message (file being used by another process).
Any ideas?
Thanks Tag: get the forms objects within my project ?? Tag: 77233
CF 2.0 install problem on Handheld device
Hi can anyone please help me out,
i need to install the latest CF2.0 cab files on the Handheld unit, i dont
know where to get those damn cab files, i've been banging my head against the
wall, no success, i had my Symbol 90xx-g working ok 2 months ago, i unplugged
the unit and the stuff went away and today i'm trying to re-install it and
the compact framework seems not to be installing on this unit i try to repair
the framework installer on the computer, it asks me if i want to install it
on the damn handheld i say yes, i pick the applications folder, and then when
i go into that folder the cab files are not there... god why is this
sooooooooooo hard? Tag: get the forms objects within my project ?? Tag: 77228
question re: Inputbox function
hi there,
im using the inputbox function for the user to enter a starting number, but
the WM5 keyboard covers the OK and Cancel buttons and the "Enter" button
doesnt work either so i have to hide the SIP and press the OK button
manually.
Is there any workaround this to make it more userfriendly without having to
create a custom form to do this?
thanks,
Paul Tag: get the forms objects within my project ?? Tag: 77227
A good place to start?
Hi all,
Is there a good website someone knows of from which I can download
complete CF applications to run/explore and study?
Thanks!
Steve Tag: get the forms objects within my project ?? Tag: 77226
Selecting a particular .NET framework version
Hi,
I just started developing applications on the .Net Compact Framework.
I've got .NET 1.1 and 2.0 installed on my machine along with VS 2005.
However, each time I deploy, it deploys it as a .NET 2.0 application.
How can I programmatically check and change the version of the framework
to use on the device. Basically I want to use v1.1. Any help would be
appreciated.
Thanks,
Steve Tag: get the forms objects within my project ?? Tag: 77221
Selecting a particular framework
Hi,
I just started developing applications on the .Net Compact Framework.
I've got .NET 1.1 and 2.0 installed on my machine along with VS 2005.
However, each time I deploy, it deploys it as a .NET 2.0 application.
How can I programmatically check and change the version of the framework
to use on the device. Basically I want to use v1.1. Any help would be
appreciated.
Thanks,
Steve Tag: get the forms objects within my project ?? Tag: 77220
problem manually adding items to a dropdown list
hi there,
im using a datatable to fill a combo box but when i try "dt.rows.add(new
object(){"",""}) all the items in the combo box say "system.data.datarow[]"
instead of their values.
How can i populate a combo box manually and assign the string and value to
how i want?
thanks,
Paul Tag: get the forms objects within my project ?? Tag: 77215
today screen example for visual studio 2005??
Hi there,
Can anyone provide me with some example code/project for adding or creating
a custom today screen item using VS2005 (C++ and vb/c#)?
i've seen the one on MSDN but its for VS2003 and the C++ project is done for
eVC.
thanks,
Paul Tag: get the forms objects within my project ?? Tag: 77210
determine if pocket pc 2003 device has been disconnected from the network
I currently have an app running on a pocket pc 2003 that connects to a
webservice to update information. The device is using gprs for
interconnectivity. In one particular module, data is sent to the server and
waits on a feedback from the server. However, sometimes the gprs service is
dropped and then the device hangs waiting on a response. The update is done
in a try catch block but the device apparently gets no error indicating that
the signal has been lost.
How can I prevent the device from freezing when the signal is dropped? Is
there a timeout setting I can set within my code that I can check to see if
a response has failed to come in within that time? If so, how do I do this?
I am using vb.net 2003.
Regards Tag: get the forms objects within my project ?? Tag: 77208
determine if a pocket pc device has been disconnected from the network
I currently have an app running on a pocket pc 2003 that connects to a
webservice to update information. The device is using gprs for
interconnectivity. In one particular module, data is sent to the server and
waits on a feedback from the server. However, sometimes the gprs service is
dropped and then the device hangs waiting on a response. The update is done
in a try catch block but the device apparently gets no error indicating that
the signal has been lost.
How can I prevent the device from freezing when the signal is dropped? Is
there a timeout setting I can set within my code that I can check to see if
a response has failed to come in within that time? If so, how do I do this?
I am using vb.net 2003.
Regards Tag: get the forms objects within my project ?? Tag: 77207
Predefined preprocessor for C#?
Hi,
are there any predefined preprocessor settings during compilation
of C# code like
CF1
CF2
DOTNET1
DOTNET2
WINCE42
which i can use in C# as
#if CF2
... using callback function pointer
#elif CF1
Uuuh ooh (Windows messages?)
#elif DOTNET2
... using UnmanagedFunctionPointer
#elif DOTNET1
... whatever may work here
#endif
thanks
Marcel Tag: get the forms objects within my project ?? Tag: 77205
Wait Cursor
The Wait Cursor is not visible in one of my devices
Can I change it in the settings somewhere
Thank you,
Samuel Tag: get the forms objects within my project ?? Tag: 77198
C# IntPtr with moved memory location, how to apply 'fixed'?
Hi,
i have an unmanaged C dll and i call a function from C#
which returns a pointer on a struct inside the C dll:
// C# code:
//member variable
IntPtr intPtr;
someMethod() {
intPtr = getStruct(); // calls C dll
}
when i later use the intPtr (passing it to C dll) it seems to point to another
memory location.
I have tried something like
fixed (void *p = intPtr.ToPointer()) {
...
}
but this does not compile:
"You cannot use the fixed statement to take the address of an already fixed expression"
How can i fix my memory location?
Thanks
Marcel Tag: get the forms objects within my project ?? Tag: 77196
How to open an email message
How can I open an email message?
I have tried using MessagingApplication.DisplayMessage() but it seems
like nothing is happening even though I'm getting the right ItemId.
Thanks! Tag: get the forms objects within my project ?? Tag: 77188
MessageBox .NET Compact Framework version 1.1
I want to associate mobile device ENTER key to "Yes" button and ESC key to
"No" button in a MessageBox with YesNo buttons. Can somebody provide a sample
code on how to do it?
Thanks, Tag: get the forms objects within my project ?? Tag: 77185
RDA Pull SQL Server versions
I've posted something very similar to this in the SQLServer CE area but but
just am not getting any response over there so I figured I'd tap the brain
trust over here!
Recently ported my VB.NET PPC app to VS2005. Also replaced my database (SQL
Server 2000) with the SQL Server 2005. I knew I'd probably have to install
a new server agent for the SQLserver2005 database to still be able to RDA
Pull from it.
Welp I tried and did not succeed in pulling using the new syntax (really I
just changed the agent dll name that was in the newly created IIS virtual
directory SSCE30.) Did any of the calling code change?
With rda
.InternetLogin = String.Empty
.InternetPassword = String.Empty
.InternetUrl = _strInternetURL
.LocalConnectionString = g_strlocalDataSource
.Pull("Users", strSQL, _strRemoteConnect,
System.Data.SqlServerCe.RdaTrackOption.TrackingOff)
End With
Anyway I went back to the old SSCE20 pointer and THAT actually works with
the new SQLServer 2005 database!!
Weird eh?
My general question is this: Apparently in debug run mode via ActiveSync,
it IS possible to use the old agent DLL sscesa20.dll to Pull data from a
SQLServer 2005 database. I've not been able to do this from the ethernet
cradled device running the same code. If my app might be paired with either
Windows 2000 SP3 OR SQLServer 2005, must I right different code to branch to
the appropriate agent? or is there an agent that I should use that is
compatible backwardly?
TIA
Harry Tag: get the forms objects within my project ?? Tag: 77183
File.Copy() crashes with very large files
When I try to copy a very large file (>8mb) using File.Copy() I get the
following error (may contain spelling errors, I typed it over):
=============================
OutOfMemoryException
IOException
at System.IO.__Errot.WinIOError()
at System.IO.File.InternalCopy()
=============================
How can I prevent those exceptions? What is sane to do? First check the
file size before copying? But what would be the maximum possible size?
I'm using:
WM5 PPC
.Net CF 2.0 Tag: get the forms objects within my project ?? Tag: 77177
Prevent light-off/key-lock/suspend/standby
My application has to upload quite some data, which takes a long time.
In the meantime the device goes into 'suspend' mode (at least the light
turns off and the keypad gets locked). The side-effect is that the
network connection is broken as well (at least the WiFi connection).
How to prevent 'suspend' can be found here:
http://msdn2.microsoft.com/en-us/library/z4k4wb9k(VS.80).aspx
But that didn't solve my problem. How can I prevent the screen from
going black and the keys from becoming locked? Tag: get the forms objects within my project ?? Tag: 77176
KeyPreview?
Hi,
We are developing a WinCE app for PocketPC 2003 (.net 2).
I am using KeyPreview = True in my forms to be able catch some keys and do
special processing in the forms (like shortcuts).
We have a main menu form that uses those shortcuts to call other forms. If
we have keypreview = true in the children forms when they are activated the
KeyUp event is called in the form (like the key was pressed for them, ie:
like pressing the key twice).
Any ideas?
Thanks... José Araujo Tag: get the forms objects within my project ?? Tag: 77169
CE5.0 poor Sql performance
Hi to all,
i have a CE5.0 device with CF 2.01 and SQL Mobile 5.0 (ce 3.0).
The SDF is located on a integrated Flash Fx disk and the initial size
is 57kb
I use a TableAdapters & XML typed dataset to queryng my database.
The insert time of 1 record in 1 table is 1/2 seconds !!!!
The same application, same database on a CE4.2 device with a Diskonchip
integrated device the insert time of 1 record in 1 table is 0.04
seconds !!!
Why this ?
Thanx in advance! Tag: get the forms objects within my project ?? Tag: 77166
CE 5.0 Video and Animation
I've searched this and other groups and haven't come up with an
acceptable solution.
We need to be able to display animated gifs and video (avi,wmv,mov...
any single format will be fine) within a control on a form.
We have Windows CE 5.0 platform with windows media player 9. It is not
pocket pc or windows mobile.
1. For the gifs, I've looked at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/animationcontrol.asp
and don't want to have to convert all of our gifs to this storyboard
format. Actually I don't know of a program that will do this for me.
Has anyone found a solution for this?
2. For the video, I understand that for WMP 10, I could build an
activex wrapper and use the activex version of WMP, but we currently do
not have WMP 10 available and I'm not sure if our supplier would be
able to add it to our devices.
Has anyone found/developed a non-wmp solution for diplaying video
within the compactframework? or are there other 3rd party solutions
available that I'm not finding?
Thanks, Tag: get the forms objects within my project ?? Tag: 77165
Install NETCFv2.wce4.ARMV4.cab in ROM
How can I do that? I have a WindowsCE 4.2 and every time I reset the machine
I must to reinstall it.
Any idea?
Thank you.
Catalin Tag: get the forms objects within my project ?? Tag: 77162
random problem using opennetcf connection manager
Hi there,
I've had this problem occur to me a number of times through the emulator and
yesterday for the first time on my test device (imate JAMin)
My code programatically makes a connection to the internet with whatever is
available (i guess in this order - activesync, wireless, gsm)
But during the initialization of the connection, the program just shut down
with no error message, so i cant catch where the problem could be except i
suspect it is in this function (not saying its a coding error, could be
something within the opennetcf connection manager class??):
i call the following line to initialize the connection to the internet
GPRS.Connect(True, "the internet")
and here is the function:
-------------------------------------------------------------------------------------------------------
Public Sub Connect(ByVal doconnect As Boolean, ByVal connectDesc As String)
ConnMgr = New ConnectionManager()
AddHandler ConnMgr.OnConnect, AddressOf Connected
AddHandler ConnMgr.OnConnectionFailed, AddressOf ConnectFailed
AddHandler ConnMgr.OnConnectionStateChanged, AddressOf ConnectionWaiting
AddHandler ConnMgr.OnDisconnect, AddressOf ConnectionDisconnect
DIF = ConnMgr.EnumDestinations()
is_connected = False
If ConnMgr.Status.ToString() <> "Connected" Then
Try
For Each di As DestinationInfo In DIF
If Trim(LCase(di.description)) = Trim(LCase(connectDesc))
Then
If doconnect = True Then
ConnMgr.Connect(di.guid, True,
ConnectionMode.Asynchronous)
Exit Sub
Else
Try
ConnMgr.Disconnect()
Catch ex As Exception
Finally
ConnMgr = Nothing
End Try
End If
End If
Next di
Catch err As SystemException
End Try
End If
End Sub
Sub Connected(ByVal sender As Object, ByVal e As System.EventArgs)
is_connected = True
End Sub
Sub ConnectFailed(ByVal sender As Object, ByVal e As System.EventArgs)
is_connected = False
MessageBox.Show("Could not connect, please try again later.")
End Sub
Sub ConnectionWaiting(ByVal sender As Object, ByVal e As System.EventArgs)
'trying to connect...
End Sub
Sub ConnectionDisconnect(ByVal sender As Object, ByVal e As
System.EventArgs)
is_connected = False
End Sub
-------------------------------------------------------------------------------------------------------
Has anyone else come this problem?
thanks,
Paul Tag: get the forms objects within my project ?? Tag: 77161
POP3 / SMTP Component
Hi
are there any POP3 / SMTP Components for PocketPC applications out there?
I'd like to integrate thisfeature in an applicaiton Tag: get the forms objects within my project ?? Tag: 77158
Windows mobile form layout question (hiding/unhiding controls)
Hi,
I am developing a wireless survey application. This application could
have three sets of controls: Radio buttons or Checkboxes and a text
area.
A question could "select only one" in which case I will show the radio
buttons and a textarea for any comments.
A question could be "select all that apply" in which I will show the
checkboxes and a textarea for any comments.
And a question could be "open-ended" in which case I will show just the
textarea for comments.
Now, I know that I can of course hide the control by setting the
visible property of the checkboxes. However, for open-ended questions,
I want the text area to move up where checkboxes and radio buttons
would have been so there is no break between where the question ends,
and the text area. If I just hide the radiobuttons/checkboxes, their
place is still designated on a windows form.
How can I actually move the textarea up to take up the hidden radio
buttons and checkboxes space?
Thanks.
AIK Tag: get the forms objects within my project ?? Tag: 77156
Callback function pointer on CF 2.0 from unmanaged C DLL -> NotSupportedException
Hi,
i'm not sure if this is a bug in the CF2, so here are the details:
I have
One Windows Mobile CE 5.1.195 (IPAQ hw6910)
One Windows CE 4.2 PDA with Arm XScale (Psion Teklogix)
On both i have installed compact framework .net 2.0 SP1
(cgacutil.exe shows 1.0.4292.2 and 2.0.6129)
I have compiled the C# exe and C dll code with VC++ 2005.
When i want to call a native unmanaged C dll with a callback
function pointer i get:
----------
NotSupportedException:
System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegateInternal
----------
During startup my System.Environment.Version.ToString()
reports CF 2.0.6129
Here is the code:
// C#
public delegate bool FPtr(int value);
public class LibWrap
{
[DllImport("test.dll")]
public static extern void TestCallBack(IntPtr cb, int value);
}
public static bool DoSomething( int value )
{
Console.WriteLine( "\n[C#]: Callback called: {0}", value );
return true;
}
And i call it like this:
// C#
FPtr cb = new FPtr(DoSomething);
IntPtr cbForDelegate = Marshal.GetFunctionPointerForDelegate(cb);
LibWrap.TestCallBack(cbForDelegate, 99); // throws exception!
The C test.dll header:
extern "C" {
typedef bool (CALLBACK *FPTR)( int i );
__declspec (dllexport) extern void TestCallBack( FPTR pf, int value );
}
The C test.dll source:
extern "C" void TestCallBack( FPTR pf, int value )
{
bool res;
printf( "\ndll: Received value: %i", value );
printf( "\ndll: Passing to callback..." );
res = (*pf)(value);
if( res )
printf( "dll: Callback returned true.\n" );
else
printf( "dll: Callback returned false.\n" );
}
I have tried to compile the dll with /TC or /TP (c++),
same result.
Can anybody shed some light on this?
Thanks
Marcel Tag: get the forms objects within my project ?? Tag: 77146
Sending Windows msgs: C# to C++
First off, thanks to everyone in all groups for helping in the past.
I'm developing an application that is a mixture of two types of
executables: the "parent" file is written in C# and the "child" is written
in C++. I need to have some basic communication from the parent to the
child. I've looked into calling SendMessage and PostMessage, but I just
can't seem to find exactly what I'm looking for. And, unfortunately (as
usual), I need to have it yesterday. Here's what I'm trying to do.
The child app is started automatically upon a reboot of the device. Then,
the parent app is started. The child app is a specialized communication
system that, at this point, must be written in C++ (using eVC4). The parent
app (written in VCS2003) contains a button ([File Transfer]) that packages
the data in an XML file and adds it to a "queue". Then, it starts the comm
process (child app) if it isn't already running. All of this takes place
when the device is docked in a special cradle.
I need to be able to:
1) Get the "application" handle of the child, if it exists; or create the
process and get the handle (starting a child app seems to work with no
problem). The message functions require an HWND, which I believe is the
same as an IntPtr, but I'm unable to properly convert/use it.
2) Send a message to the child app to tell it to minimize or maximize. In
other words, I want it to "sleep" in the background until it's needed, and
then become visible.
Caveats:
I am doing this with Windows CE Pocket PC version 4.20. I'm also using CF
1.0. I also have OpenNETCF 1.4 available. I can't seem to get CF 2.0 to
work on this hardware/OS.
Can someone...anyone...explain to me how this is done, or point me to a
resource? Tag: get the forms objects within my project ?? Tag: 77144
MSMQ HTTP queues in Windows Mobile 5
Hi.
Not sure if this should be in this group or the msmq group.
We are developing a windows mobile 5 application using VB.NET CF2.0,
VS2005, that is to send messages using MSMQ to a client server. the
client will only accept this if we connect using HTTP queues.
I've seen postings & weblogs relating to this which initially said HTTP
wasnt supported in MSMQ in WM5, then it was but there was was a bug in
it. I've not seen any subsequent postings to indicate if the bug is
fixed.
Can someone please point me in the right direction to an answer?
Thanks. Ian. Tag: get the forms objects within my project ?? Tag: 77143
POOM
I remember something like Pocket Outlook Object Model
Does it really exists, is it supplied with VS 2005
And does it compare to the desktop version
Thank you,
Samuel Tag: get the forms objects within my project ?? Tag: 77141
System.Security.Cryptography and OpenNETCF.Security.Cryptography
Hi,
I would like to use the ProtectedData.Protect() and Unprotect() features to
securely store sensitive info on the pda. I noticed that these methods are
not available for the compact framework. So ofcourse I went looking into the
OpenNETCF namespaces and fortunately I found them there.
A few questions:
- Daniel Moth mentions in his blog
(http://blog.opennetcf.org/dmoth/PermaLink,guid,29233388-f9a9-4056-bc97-2b90035cf542.aspx)
that the OpenNETCF.Security.Cryptography.* types are dropped due to
enhancements in CF 2.0. However, I still see them. Should I use them or not?
- I tried to use the Protect and Unprotect methods from OpenNETCF, but
whatever I do, the Unprotect method keeps throwing a CryptographicException.
Does anybody have a working example on how to use these? I basically do the
following:
Encrypt:
ApplicationSettings["EncryptedPassword"] =
Convert.ToBase64String(ProtectedData.Protect(Encoding.UTF8.GetBytes(value),
null, DataProtectionScope.LocalMachine));
Decrypt:
byte[] arrDecrypted =
ProtectedData.Unprotect(Convert.FromBase64String(ApplicationSettings["EncryptedPassword"]),
null, DataProtectionScope.LocalMachine);
The exception occurs when I try to Unprotect it. I tried it with and without
the entropy bytes.
Also, how does the enum DataProtectionScope apply to the compact framework?
MSDN says that with the CurrentUser enum the data is associated with the
current user. Only threads running under the current user context can
unprotect the data. For LocalMachine, any process can unprotect the data.
I'm not sure how this would work on a pda. Is there something like a current
user context and a machine context?
Thanks,
--
Jeffry van de Vuurst
CWR Mobility
www.cwrmobility.com
-- Tag: get the forms objects within my project ?? Tag: 77135
How to share a xsd dataset between a CF app and a desktop app
Hi,
I'm looking for a smart way to share a strongly typed dataset (xdf file and
its generated code) between a CF 2.0 SP1 application and a .Net 2.0 desktop
application (in the same solution).
If I duplicate the xsd file in the two projects, I need update both xsd
files each time I update the dataset.
If I add the same dataset as a linked file, code generated file is linked
too, and the CF format of this file differs from the desktop one.
Do you have any solution that share the xsd file between the two projects,
keeping both CF generated code and desktop generated code ?
Thanks,
Steve Tag: get the forms objects within my project ?? Tag: 77133
Embedd maps in CF application
Hi group,
I have started similar threads other times, but I don't receive many
suggestions, that's why I'm back here again. I hope this time all you
discuss with me the current mapping capabilities on mobile devices. I
think this kind of thread deserves a little bit activity.
Well, to the point: I want add mapping capability to my CF application,
that is, show the user a map pinpointing his exact location.
What are the options? I've already tried VE Mobile but latest source
code is not available. Available source code does not work because MS
has changed its tile server logic.
Google Maps: is not correctly rendered in IExplorer of most devices and
I don't want to launch IExplorer from my application; I want to embedd
maps into my CF application. Thus, what are the options (free and not
free) to deal with maps in CF applications? Mappoint?
I'm sure somebody has dealt with this before.
Thanks very much in advance. Tag: get the forms objects within my project ?? Tag: 77131
CF Web Reference
Hi all
I'm writing a compact framework app. This app needs to receive a large
binary (zip file) from a webservice. The problem is that the byte[] will be
retrieved into RAM before I can save it to my external memory card.
I am concerned that as the size of this zip file grows my PPCs will no
longer have enough RAM to receive all of the response. Is there any way I
can retrieve the binary data directly to a FileStream instead of into
memory?
Thanks
Pete Tag: get the forms objects within my project ?? Tag: 77130
a question of logic regarding updating database structure with software update.
Hi there,
i've got a client app that supports software updates over the internet.
For now, most changes have just been code related and didnt require adding
tables/fields to the sql database.
However now i have come to this issue whereas with new version i need to add
new table(s) or add field(s) to existing table.
What i currently do is this:
with my app i have a file called db.xml which holds the tables that are
generated on first program use, looks something like this:
<?xml version="1.0" encoding="utf-8" ?>
<db>
<version>2.0.0</version>
<sql>CREATE TABLE Users (userIDINT PRIMARY KEY,Ime NVARCHAR(50),Password
NVARCHAR(50))</sql>
<sql>CREATE TABLE Partner(PartnerID INT PRIMARY KEY, Partner NVARCHAR(50),
Adres NVARCHAR(50), TelF NVARCHAR(35), Email NVARCHAR(50), Contact
NVARCHAR(50))</sql>
<sql>...... and so on
So this is where i'm at - eg.. user A has a software program with database
version 1.0, but my app just upgraded and the database version requires db
script version 2.0
Instead of dropping all the tables like i do now, regenerating with the new
script, i'd ideally like to apply only the tables/fields that are missing.
Can anyone give my some pointers to the best way i could implement this -
providing i still use my db.xml file?
thanks,
Paul Tag: get the forms objects within my project ?? Tag: 77129
ErrorProvider in CF
Hi there
are there anywhere some classes to get an errorprovider like in the full
framework ?
I'd really like to get one for my application Tag: get the forms objects within my project ?? Tag: 77128
udp communication from device emulator to desktop pc
Have developed c# code for udp communication. My udp client is on the Pocket
PC emulator and server is on the desktop pc.
Am unable to send or receive data.
The code works if both-client and server reside on the desktop pc.
As an attempt to get the code working with the client on device emulator,
have
installed Virtual Switch Driver and VMware. Enabled virtual machine services
on VMWare adaptor and LAN. Yet the code does not work.
Please help. Tag: get the forms objects within my project ?? Tag: 77123
calling Microsoft application from my app
Hello all,
i am making a replacement for the Wi-Fi wizard application (under
Settings->Connections->Wi-Fi application) on a WM 5.0 smartphone, my
application will have the following menu options
1)Wi-Fi : this will allow u to connect to Access point, edit a
connection, etc
2) Wi-Fi Power modes: will allow the user to select power modes for the
driver (turn off Wi-Fi if no activity... etc)
now i have implemented option #2 in C#, option #1 already is done by
Microsoft (its part of the Settings->Connections-->Wi-Fi application) i
want a way to launch this Wi-Fi wizard from my C# application when the
user clicks on option #1 from my menu above, I don't want to
re-create option #1 in C#, i just want to use what MSFT has done,
problem is I don't know the name of that Wi-Fi wizard app
and whether its a .exe or a COM object referencing a DLL somewhere (i
have no idea how those Settings app work)
How can i obtain such info? I look into the processes running on the
phone, I c the "Settings.exe" running, but that's the full Settings app
and not just the Wi-Fi part.
thanks in advance for help
Cheers Tag: get the forms objects within my project ?? Tag: 77121
is it possible to programmatically get focus to mainmenu?
Hi,
I need to bring the focus to mainmenu items when the user hits
down key on the rocker. Neither the mainmenu nor menuitems provide the
focus() method. And mainmenu also does not exist in the controls
collection of the form. Is there any such possibility that i can put
focus on the first menuitem of the mainmenu through code? ThanX
- Hari Tag: get the forms objects within my project ?? Tag: 77120
how to use DirectShow on dotnet platform
Is it possible to use DirectShow interface or just get data from DirectShow
Render filter?If it is possible which way is easier and how to do?
Thanks for any reply. Tag: get the forms objects within my project ?? Tag: 77119
Multiple cab files and the .ini file
I have searched Goggle, MSDN and live.com for how to deploy multiple cab
files at a shot using the .ini file to specify each. I have tried many
downloaded examples, along with my own application and all that ever happens
is that it installs the first cab, and that is all. All the documentation
says to provide a comma separated list, with no spaces, and CeAppMgr will
deploy each one, however it does not happen that way.
Here is an example:
[CEAppManager]
Version = 1.0
Component = MyApp
[MyApp]
Description = MyApp
CabFiles=MyApp.CAB,NETCFv2.wm.armv4i.cab,System_SR_ENU_wm.cab,symbol.all.arm.cab
Anyone know how to accomplish this?
Thanks in advance for your help. Tag: get the forms objects within my project ?? Tag: 77117
Encryption for the CF
Hi everyone,
I am looking for encryption class.component for the Compact Framework
Thanks,
Samuel Tag: get the forms objects within my project ?? Tag: 77110
generate a 'click' sound?
How can I generate a click-sounds when a user clicks on one of my
controls? Is there something like system beeps?
WM5
.NETCF2.0 Tag: get the forms objects within my project ?? Tag: 77096
SIP Button showing in a fullscreen WM5 app
Hi,
I writing an app to be run on Windows Mobile 5 using C# and the .Net
Compact Framework 2.0 which hides both the start menu bar at the top of
the screen and the button bar / sip bar at the bottom of the screen in
order to maximise the amount of screen space available. This has been
achieved using the SSHFullScreen function found in Aygshell.dll, and
seems to work fine.
However, I also need keyboard input from the SIP panel, but when I
enable the panel through Microsoft.WindowsCE.Forms.InputPanel by
setting its enabled property to true, the sip button shows up in the
middle of the screen at the bottom.
I Dont want this button to show up on activating the SIP as I use my
own button for this purpose, how can I prevent this from happening?
Thanks. Tag: get the forms objects within my project ?? Tag: 77095
udp communication from device emulator to desktop pc
Have developed c# code for udp communication. My udp client is on the Pocket
PC emulator and server is on the desktop pc.
Am unable to send or receive data.
The code works if both-client and server reside on the desktop pc.
As attempt to get the code working with the client on device emulator, have
installed Virtual Switch Driver and VMware. Enabled virtual machine services
on VMWare adaptor and LAN. Yet the code does not work.
Please help. Tag: get the forms objects within my project ?? Tag: 77090
Problem with Input panel on the main menu panel
Hello,
I am facing a interesting rather stupid problem. I have a few
text boxes on a form. I have done a few validations to check if these
textboxes are empty when the OK button is clicked. If there any any
unfilled textbox i display a message in the MessageBox. However after
this the Inputpanel (where we select the keyboard/Letter
Recognizer/....) the right bottom end on the menu panel just
disappears. Could someone point out what could the reason be and how to
overcome this??
Regards,
Rithesh
Student
IIIT, Bangalore Tag: get the forms objects within my project ?? Tag: 77087
Preview (still/thumbnail) of a video?
Is it possible to capture one frame (or a 'still') from a video?
Similar to the thumbnail of a video you get in the filebrowser.
Using:
WM5 PPC
.Net CF 2.0 Tag: get the forms objects within my project ?? Tag: 77086
Mobile TAPI Question
using the following pseudo sample code
[DllImport("coredll", SetLastError = true)]
public static extern int lineMakeCall(IntPtr hLine, out IntPtr
lphCall, string lpszDestAddress, int dwCountryCode, byte[] lpCallParams);
[DllImport("coredll", SetLastError = true)]
private static extern LineErrReturn lineGenerateDigits(IntPtr hCall,
int dwDigitMode, String lpszDigits, int dwDuration);
IntPtr pCall;
//make first call
lineMakeCall(m_line, out pCalll, "numbertodial",1,null);
//issue hook flash
lineGenerateDigits(pCall, (int)DigitMode.Dtmf, "!,,\0",0);
// I now hear a dial tone on the device, but when I issue another
lineMakeCall, the first call disconnects. Has anyone ever done this, the
device supports it, because you can do it with the hard phone buttons. The
device is a Sprint PPC 6700. Tag: get the forms objects within my project ?? Tag: 77084
Pocket PC 2005 C++ Managed Class Library
Hi All,
I want to create a smart device C++ managed class library (for Pocket
PC 2005). Is this possible? If yes, how?
I want to wrap a C++ unmanaged Dll to be used in a C# application.
Thanks in advance!
Hassan Tag: get the forms objects within my project ?? Tag: 77078
hi there,
can someone give me small example or point me in the right direction to loop
through all the forms objects in my project?
thanks,
Paul.