Re: RasSetEntryProperties sample
- From: Sergey Bogdanov <sergey.bogdanov@xxxxxxxxx>
- Date: Sat, 19 Jan 2008 21:00:11 +0200
I'm passing RasEntry as an array of bytes and using the field offsets to fill the values. The part of sample RasEntry and declaration for RasSetEntryProperties. This method works well for CF1.0+.
public class RASENTRY
{
public RASENTRY()
{
this.data = new byte[3276];
this.dwSize = 3276;
}
public byte[] Data
{
get
{
return this.data;
}
}
public int dwSize
{
get
{
return BitConverter.ToInt32(this.data, 0);
}
set
{
BitConverter.GetBytes(value).CopyTo(this.data, 0);
}
}
...
private byte[] data;
private const int dwCountryCodeOff = 12;
private const int dwCountryIDOff = 8;
private const int dwOptionsOff = 4;
private const int dwSizeOff = 0;
}
[DllImport("coredll")]
internal static extern int RasSetEntryProperties(string lpszPhoneBook, string szEntry, byte[] lpbEntry, int dwEntrySize, byte[] lpb, int dwSize);
HTH,
S.
--
Sergey Bogdanov
http://www.binitex.com
Catalin Lungu wrote:
Hi all,.
Someone has a sample application that how to use RasSetEntryProperties function in C#, with RasEntry struct?
Ceers,
Catalin
- Prev by Date: Re: Using window panels instead of windows.forms
- Next by Date: Re: html in pocket pc application
- Previous by thread: Re: Setting Date/Time for daylight savings using Opennetcf Ver 2.0
- Next by thread: How do I Gradient Fill A Polygon the Compact Framework way?
- Index(es):
Relevant Pages
|