SHLoadImageFile API 不工作
正如标题中提到的,我面临 SHLoadImageFile API 的问题。 我正在尝试逐个加载一系列捕获的图像并尝试检索各自的图像属性。 API 不会返回高分辨率图像的有效句柄,而对于其余图像(分辨率降低),其工作正常。 谁能告诉我哪里错了??? 这是我的代码的样子
// 捕获图像的代码
hBmp = SHLoadImageFile(szFilePath); //szFilePath- refers to loaction of the image
if(!hbmp)
//error msg
current_bmp.Attach(hBmp);
current_bmp.GetBitmap(&hBmpInfo);
// 将图像宽度和高度复制到局部变量的代码。
一旦更高分辨率图像的位置作为参数发送,控件就会进入 if 块并显示错误消息。
As mentioned in the title I am facing problem with SHLoadImageFile API.
I am trying to load a series of captured images one by one and trying to retrieve the respective image properties. The API is not returning a valid handle for an image of higher resolution, for the rest of images (with decreasing resolution) its working fine.
Can anyone tell me where I am going wrong???
Here is my how my code looks
// Code to capture image
hBmp = SHLoadImageFile(szFilePath); //szFilePath- refers to loaction of the image
if(!hbmp)
//error msg
current_bmp.Attach(hBmp);
current_bmp.GetBitmap(&hBmpInfo);
//code to copy image width and height to a local variable.
As soon as the location of image of higher resolution is sent as parameter,the control entersto if block and displays error msg.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我记得当尝试加载执行的图像时,SHLoadImageFile() API 将失败
I remember that the SHLoadImageFile() API will be failed when try to load an image that exec