如何在C#中使用SetBitmapBits函数? [英] How can i use SetBitmapBits function in C#?

查看:223
本文介绍了如何在C#中使用SetBitmapBits函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于在VC ++中具有SetBitmapBits函数,因此我需要在C#中使用相同的功能.
感谢您的帮助.

Since in VC++, SetBitmapBits function is there, same thing i need to use in C#.
Any help is appreciated.

推荐答案

您可以使用PInvoke来使用API​​函数:

You can use PInvoke to allow you to use the API function:

[DllImport("gdi32.dll")]
static extern int SetBitmapBits(IntPtr hbmp, uint cBytes, byte [] lpBits);




供以后参考,这是.Net Windows API使用的"*"站点:

pInvoke.Net主页 [ ^ ]




For future reference, here is *the* go-to site for Windows API usage in .Net:

pInvoke.Net Home Page[^]


这篇关于如何在C#中使用SetBitmapBits函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆