Solved

How to create directory in wide character ?

Posted on 2001-07-24
7
299 Views
Last Modified: 2010-05-18
Hi !

I want to create a directory with wide characters (wstring or wchar_t).

The "_wmakepath" function don't let me to create network dir because I have to specify the drive letter and the "_wcreat" function don't let me to create directory (just file).

Can someone help me plz ?

tk

PS: I'm Ms Visual C++ 6.0
0
Comment
Question by:yota1998
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 6314487
Did you try _wfullpath() function?
0
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6314490
>>PS: I'm Ms Visual C++ 6.0

Use

wchar_t* pwszDir = L"\\\\server\\share\\dir";

CreateDirectoryW ( pwszDir, NULL);

Feel free to ask if you need more information or encounter problems!
0
 
LVL 86

Expert Comment

by:jkr
ID: 6314498
Ooops, sorry Axter.

BTW: 'CreateDirectory()' is the 'official' Win32 API for that purpose. The version that takes a UNICODE string is called 'CreateDirectoryW()'
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:Axter
ID: 6314506
jkr,
>>'CreateDirectory()' is the 'official' Win32 API
You're right
0
 
LVL 2

Expert Comment

by:antoinebf
ID: 6314548
Hi,
BTW _wfullpath() is to convert a relative path (with ..\..\) to an absolute path (\temp\blabla\). I don't think it will create a dir, just expand the path...

0
 
LVL 11

Expert Comment

by:griessh
ID: 7021839
Dear yota1998

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jkr"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7040355
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question