G
Giuseppe
Hi all, I'm novice with winCE and i'm writing a C# code to access to the
memory.
I'm using ceddk.dll functions:
....
public struct PHYSICAL_ADDRESS{
long lowPart;
long highPart;
public PHYSICAL_ADDRESS(long lPart,long hPart){
lowPart=lPart;
highPart=hPart;
}
}
[DllImport("ceddk.dll", EntryPoint="READ_REGISTER_ULONG")]
public static extern ulong READ_REGISTER_ULONG(ulong pulongAddress);
[DllImport("ceddk.dll", EntryPoint="MmMapIoSpace")]
public static extern unsafe void* MmMapIoSpace(PHYSICAL_ADDRESS
pucharAddress, ulong nbytes,bool cacheEnable);
private void button1_Click(object sender, System.EventArgs e)
{
unsafe
{
ulong* pmem;
PHYSICAL_ADDRESS pAdd;
pAdd= new PHYSICAL_ADDRESS(0x80920000,0x00);
pmem= (ulong*)MmMapIoSpace ( pAdd, 0x10, false );
}
}
....
This code raise an exception, please could you help me with a piece of
code?
Thank you
Giuseppe
memory.
I'm using ceddk.dll functions:
....
public struct PHYSICAL_ADDRESS{
long lowPart;
long highPart;
public PHYSICAL_ADDRESS(long lPart,long hPart){
lowPart=lPart;
highPart=hPart;
}
}
[DllImport("ceddk.dll", EntryPoint="READ_REGISTER_ULONG")]
public static extern ulong READ_REGISTER_ULONG(ulong pulongAddress);
[DllImport("ceddk.dll", EntryPoint="MmMapIoSpace")]
public static extern unsafe void* MmMapIoSpace(PHYSICAL_ADDRESS
pucharAddress, ulong nbytes,bool cacheEnable);
private void button1_Click(object sender, System.EventArgs e)
{
unsafe
{
ulong* pmem;
PHYSICAL_ADDRESS pAdd;
pAdd= new PHYSICAL_ADDRESS(0x80920000,0x00);
pmem= (ulong*)MmMapIoSpace ( pAdd, 0x10, false );
}
}
....
This code raise an exception, please could you help me with a piece of
code?
Thank you
Giuseppe