DefineDosDevice
#include <windows.h>
int main(int argc, char* argv[])
{
printf("DefineDosDevice!\n");
//set
BOOL rs =DefineDosDevice(DDD_RAW_TARGET_PATH,"U:","\\??\\D:\\DHCP");
if (0)
{
rs =DefineDosDevice(DDD_REMOVE_DEFINITION,"U:",NULL);
}
printf(" rs= %d",rs);
return 0;
}
int main(int argc, char* argv[])
{
printf("DefineDosDevice!\n");
//set
BOOL rs =DefineDosDevice(DDD_RAW_TARGET_PATH,"U:","\\??\\D:\\DHCP");
if (0)
{
rs =DefineDosDevice(DDD_REMOVE_DEFINITION,"U:",NULL);
}
printf(" rs= %d",rs);
return 0;
}
本地用户下创建 盘符会在用户注销后消失 winobj在session中看到符号链接
如果用在system下创建 即可一直保存 winobj在global中看到