MakeSureDirectoryPathExists

 

MakeSureDirectoryPathExists Function

 

Creates all the directories in the specified path, beginning with the root.

 

BOOL WINAPI MakeSureDirectoryPathExists(
  __in          PCSTR DirPath
);
Parameters
DirPath

A valid path name. If the final component of the path is a directory, not a file name, the string must end with a backslash (/) character.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

Each directory specified is created, if it does not already exist. If only some of the directories are created, the function will return FALSE.

This function does not support Unicode strings. To specify a Unicode path, use the SHCreateDirectoryEx function.

All DbgHelp functions, such as this one, are single threaded. Therefore, calls fr om more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

 

 

例子:

 

 

MSDN里说的头文件和库应该是有问题的!

 

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值