Software Development Network>> Smart Devicet>> how to call wince api
I want to call the Win32 API SetSystemPowerState
but not pass build.
the vs.net not know SetSystemPowerState.
why
This is because you are needing to call a native/import dll to execute that specific function, this is not built into the managed framework. You need to P/Invoke
you may need to import coredll.dll but im unsure....
check this:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceddk40/html/cxrefSetSystemPowerState.asp
http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceddk5/html/wce50lrfSetSystemPowerState.asp
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=541238&SiteID=1
example of invoking from C#
http://www.pinvoke.net/default.aspx/coredll/SetSystemPowerState.html
hope it helps!
hi ahmedilyas
yes, I want to import the coredll.dll
How to import it
Thank you
how to call wince api
Peter Gloor
ONeill
This is because you are needing to call a native/import dll to execute that specific function, this is not built into the managed framework. You need to P/Invoke
you may need to import coredll.dll but im unsure....
check this:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceddk40/html/cxrefSetSystemPowerState.asp
http://msdn.microsoft.com/library/default.asp url=/library/en-us/wceddk5/html/wce50lrfSetSystemPowerState.asp
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=541238&SiteID=1
example of invoking from C#
http://www.pinvoke.net/default.aspx/coredll/SetSystemPowerState.html
hope it helps!
laboremus
hi ahmedilyas
yes, I want to import the coredll.dll
How to import it
Thank you