如何使用vc ++将图像文件保存在共享文件夹中? [英] How to save the image file in the shared folder using vc++?

查看:90
本文介绍了如何使用vc ++将图像文件保存在共享文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用vc ++将图像文件保存在共享文件夹中?我想将jpeg文件从我的系统保存到共享文件夹,其中图像是我的系统的屏幕截图.如何使用vc代码执行此操作?帮助我

How to save the image file in the shared folder using vc++? I want to save the jpeg file from my system to the shared folder in which the image is the screenshot of my system. How to perform this using vc code? help me

推荐答案

1.打开文件
2.写入数据
3.关闭文件

您在共享文件夹中写入文件的方式与在本地文件夹中完全相同.
1. open the file
2. write the data
3. close the file

You write a file in a shared folder exactly the same way as in a local folder.


正如markkuk所说,该过程与您要写入本地文件时的过程完全相同.话虽如此,您应该尝试将文件写入本地文件夹,然后将路径更改为一个远程目录(\\ server \共享文件夹\ xxx \ yyy \ zzz.aaa),如果远程路径为不可用,请记住这一点并进行测试...如果由于远程路径不存在而导致您的应用程序突然失败,那肯定是个问题.

以防万一...为了知道如何 ^ ] ...

希望这会有所帮助.
As markkuk say, the process is exactly the same than when you want to write to a local file. Being that said, you should try to write the file in a local folder and then change the path to one remote one (\\server\shared folder\xxx\yyy\zzz.aaa) of course it will fail if the remote path is not available so keep this in mind and test it... it would surely be a problem if your application fails suddenly because the remote path does not exists.

Just in case... and in order to know how to write files[^]...

Hope this helps.


这篇关于如何使用vc ++将图像文件保存在共享文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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