网络摄像头API常量问题 [英] Webcam API Constants problem
本文介绍了网络摄像头API常量问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个应用程序,我正在从VB.NET转换为C#。 该应用程序使用网络摄像头。 我设法使大部分代码正常工作,除了以下内容:
public const int WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41;
public const int WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42;
public const int WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43;
public const int WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44;
public const int WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45;
这五行抛出一个错误,说它不能隐式转换类型'long'键入'int。' 我该如何解决这个问题?
谢谢!
Jason
解决方案
< blockquote>
这意味着您之前有过这一行:
&NBSP; public const long WM_CAP_START;
更改"long" to"int"。
Hi all,
I have an application that I'm converting from VB.NET to C#. The application uses the webcam. I've managed to get most of the code working right, except for the following:
public const int WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41; public const int WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42; public const int WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43; public const int WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44; public const int WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45;
Those five lines throw an error saying that it can't implicitly convert type 'long' to type 'int.' How can I fix this?
Thanks!
Jason
解决方案
The implication is that you had this line earlier on:
public const long WM_CAP_START;
Change that "long" to "int".
这篇关于网络摄像头API常量问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文