#include "stdafx.h"
#include "device.h"
#include <windows.h>
#include<TlHelp32.h>
#define MAX_PATH 1024
char * setw(int w)
{
return "h";
}
MyClass::MyClass(string _root_name,string _real_path)
{
this->_root_name = _root_name;
this->_real_path = _real_path;
}
bool MyClass::createdisc()
{
BOOL rs2 = DefineDosDevice(DDD_RAW_TARGET_PATH, L"U:", L"\\GLOBAL??\\D:\\paper");
if (0)
{
rs2 = DefineDosDevice(DDD_REMOVE_DEFINITION, L"U:", NULL);
cout << "delete device" << endl;
return false;
}
return true;
}
callbackinfo MyClass::discwather()
{
callbackinfo info;
DWORD cbBytes;
char file_name[MAX_PATH]; //设置文件名
char file_name2[MAX_PATH]; //设置文件重命名后的名字
char notify[1024];
int count = 0;
#include "device.h"
#include <windows.h>
#include<TlHelp32.h>
#define MAX_PATH 1024
char * setw(int w)
{
return "h";
}
MyClass::MyClass(string _root_name,string _real_path)
{
this->_root_name = _root_name;
this->_real_path = _real_path;
}
bool MyClass::createdisc()
{
BOOL rs2 = DefineDosDevice(DDD_RAW_TARGET_PATH, L"U:", L"\\GLOBAL??\\D:\\paper");
if (0)
{
rs2 = DefineDosDevice(DDD_REMOVE_DEFINITION, L"U:", NULL);
cout << "delete device" << endl;
return false;
}
return true;
}
callbackinfo MyClass::discwather()
{
callbackinfo info;
DWORD cbBytes;
char file_name[MAX_PATH]; //设置文件名
char file_name2[MAX_PATH]; //设置文件重命名后的名字
char notify[1024];
int count = 0;