Thank you YES this looks like what i need to do but in C# ??
The furthest i got is:
[DllImport("Kernel32.dll", SetLastError = false, CharSet =
CharSet.Auto)]
public static extern bool DeviceIoControl(
Microsoft.Win32.SafeHandles.SafeFileHandle hDevice,
EIOControlCode IoControlCode,
[MarshalAs(UnmanagedType.AsAny)]
[In] object InBuffer,
uint nInBufferSize,
[MarshalAs(UnmanagedType.AsAny)]
[Out] object OutBuffer,
uint nOutBufferSize,
ref uint pBytesReturned,
[In] ref System.Threading.NativeOverlapped Overlapped);
i think now i need to populate some structures but i cannot find any example
on google or anywhere?
Anymore ideas?
Marina
"Cor Ligthert[MVP]" wrote:
Marina,
There is a complete description in C++ for this how to handle this, should
be rather easy to tranform.
http://msdn.microsoft.com/en-us/libr...69(VS.85).aspx
Cor
"Marina" <Ma****@discussions.microsoft.comschreef in bericht
news:AE**********************************@microsof t.com...
Thank you but my mistake i meant to say:
DeviceIoControl using IOCTL_BATTERY_QUERY_STATUS (NOT CE)
Any ideas, life is hard
Marina
"Cor Ligthert[MVP]" wrote:
Hi Marina,
Assuming that you are our Marina then how is the baby going?
Did you try it already in the newsgroup
microsoft.public.dotnet.languages.compactframework
It is and has always been a rather active newsgroup
http://groups.google.com/group/micro...rch+this+group
Cor
"Marina" <Ma****@discussions.microsoft.comschreef in bericht
news:7F**********************************@microsof t.com...
Does any know any sample of how to do a basic DeviceIoControl with
something
like IOCTL_BATTERY_GETSYSTEMPOWERSTATUSEX2 in C#
I have been stuck all week :(
and google doesnt yield anything of use.
Please help me, thanks
Marina