.net下所有DLL(API)查询,转换C#代码
地址:
http://www.pinvoke.net/default.aspx/coredll.SetDevicePower
实例:


coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for SetDevicePower in other DLLs exists, click on Find References to the right.
Summary
C# Signature:
[DllImport("coredll.dll", SetLastError=true)]
private static extern int SetDevicePower(
string pvDevice,
int dwDeviceFlags,
DevicePowerState DeviceState);
VB Signature:
<DllImport("coredll")> _
Private Shared Function SetDevicePower(ByVal pvDevice As String, ByVal dwDeviceFlags As Integer, ByVal DeviceState As DevicePowerState) As Integer
End Function
User-Defined Types:
public enum DevicePowerState : int
{
Unspecified = -1,
D0 = 0, // Full On: full power, full functionality
D1, // Low Power On: fully functional at low power/performance
D2, // Standby: partially powered with automatic wake
D3, // Sleep: partially powered with device initiated wake
D4, // Off: unpowered
}
private const int POWER_NAME = 0x00000001;
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
This turns the backlight off
SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D4);
This holds the backlight on until the device turns off
SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D0);
Alternative Managed API:
Do you know one? Please contribute it!
Documentation
Please edit this page!
Do you have...
- helpful tips or sample code to share for using this API in managed code?
- corrections to the existing content?
- variations of the signature you want to share?
- additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

.net下所有DLL(API)查询,转换C#代码的更多相关文章
- 深入Delphi下的DLL编程
深入Delphi下的DLL编程 作者:岑心 引 言 相信有些计算机知识的朋友都应该听说过“DLL”.尤其是那些使用过windows操作系统的人,都应该有过多次重装系统的“悲惨”经历——无论再怎样小心, ...
- MFC下的DLL编程学习
1.DLL库与LIB库对比: 静态链接库Lib(Static Link Library),是在编译的链接阶段将库函数嵌入到应用程序的内部.如果系统中运行的多个应用程序都包含所用到的公共库函数,则必然造 ...
- InfluxDB学习之InfluxDB的HTTP API查询操作
在 InfluxDB学习 的上一篇文章:InfluxDB学习之InfluxDB的HTTP API写入操作 中,我们介绍了使用InfluxDB的HTTP API进行数据写入操作的过程,本文我们再来介绍下 ...
- 汇编Ring 3下实现 HOOK API
[文章标题]汇编ring3下实现HOOK API [文章作者]nohacks(非安全,hacker0058) [作者主页]hacker0058.ys168.com [文章出处]看雪论坛(bbs.ped ...
- oracle查询转换_inlist转换
oracle的optimizer会对一些sql语句进行查询转换,比如: 合并视图 子查询非嵌套化 inlist转换 下面讲讲遇到的in list转化优化的案例: create table test( ...
- 使用聚合数据API查询快递数据-短信验证码-企业核名
有位朋友让我给他新开的网站帮忙做几个小功能,如下: 输入快递公司.快递单号,查询出这个快件的所有动态(从哪里出发,到了哪里) 在注册.登录等场景下的手机验证码(要求有一定的防刷策略) 通过输入公司名的 ...
- windows下编写dll
dll的优点 简单的说,dll有以下几个优点: 1) 节省内存.同一个软件模块,若是以源代码的形式重用,则会被编译到不同的可执行程序中,同时运行这些exe时这些模块的二进制码会被重复加载到内存中.如果 ...
- windows下多字节和宽字节转换
先简单说下什么是多字节和宽字节. 多字节是指使用多个字节(1-3)表示一个字符.比如gbk使用英文占一个字节,中文占2个,这个就是多字节了.utf-8是使用1-3个字节表示字符.还有big5等等. 宽 ...
- 免费手机号码归属地API查询接口和PHP使用实例分享
免费手机号码归属地API查询接口和PHP使用实例分享 最近在做全国性的行业分类信息网站,需要用到手机号归属地显示功能,于是就穿梭于各大权威站点之间偷来了API的接口地址. 分享出来,大家可以用到就拿去 ...
- Linux下将UTF8编码批量转换成GB2312编码的方法
Linux下将UTF8编码批量转换成GB2312编码的方法 在sqlplus中导入UTF8编码的sql脚本就会出现乱码错误,这时就需要将UTF8编码转换成GB2312编码,下面为大家介绍下在Linux ...
随机推荐
- 在Ubuntu 18.04上安装Tensorflow
我们将经历几个阶段,安装cuda-9.0,cudnn和tensorflow cpu以及tensorflow gpu版本.最后我们将用cuda-9.0安装pytorch.在MARVEl电影中黑寡妇的“我 ...
- s3c2440中U-boot移植时执行cp.b提示:Flash not Erased【转】
本文转载自:https://blog.csdn.net/baiyang139/article/details/79054415 版权声明:本文为博主原创文章,未经博主允许不得转载. https://b ...
- Windows10下用Anaconda3安装TensorFlow教程【转】
本文转载自:https://www.cnblogs.com/HongjianChen/p/8385547.html 1. 安装好Anaconda3版本 (1) 注:可以发现最新版本是Anaconda5 ...
- zoj 3747 递推dp
Attack on Titans Time Limit: 2 Seconds Memory Limit: 65536 KB Over centuries ago, mankind faced ...
- 使用javascript模拟常见数据结构(二)
四.链表 每种语言都实现了数组.这种数据结构非常方便,提供了一个便利的[]语法来访问它的元素.然而,这种数据结构有一个缺点:(在大多数语言中)数组的大小是固定的,从数组的起点或中间插入或移除项的成本很 ...
- SpringBoot.资料
1.du 搜 "springboot 视频" 2.SpringBoot视频教程_哔哩哔哩 (゜-゜)つロ 干杯_-bilibili.html(https://www.bilibil ...
- 【Docker】Segmentation Fault or Critical Error encountered. Dumping core and abort
背景 CentOS7 安装Docker后,load镜像时出现以下错误: Segmentation Fault or Critical Error encountered. Dumping core a ...
- redhat7下mysql5.7.12重启电脑后起不来问题
环境介绍: 64位reahat7 mysql5.7.12 初次安装后mysql运行是正常的,重启操作系统后检查mysql运行状态如下: [root@localhost ~]# systemctl st ...
- js 函数对象
函数是进行模块化程序设计的基础,编写复杂的Ajax应用程序,必须对函数有更深入的了解: javaScript中的函数不同于其他的语言,每个函数都是作为一个对象被维护和运行的,通过函数对象的性质,可以很 ...
- delphi向SQL Server2005中存取图片
SQL Server2005中,我用image类型来存取图片,首先把数据库表设置好 例如我的pic表有如下两列:时间,图片. delphi中,我用ADOQuery来连接数据库,但是数据库中有好几张表, ...