Hi, I am trying to create a directory from within my
program. I found the IO::Directory:: CreateDirectory
(filename) function, and used that but I get two errors
concerning CreateDirectory A (one that it takes two
parameters, the other that it is not in IO::Directory).
Did I miss something? I am including mscorlib.dll and
using the proper namespaces.
Thanks, Tim 5 2000
"Tim" <ar********@dis cussions.micros oft.com> wrote in message
news:06******** *************** *****@phx.gbl.. . Hi, I am trying to create a directory from within my program. I found the IO::Directory:: CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectory A (one that it takes two parameters, the other that it is not in IO::Directory). Did I miss something? I am including mscorlib.dll and using the proper namespaces.
I could be wrong, but I suspect that you are being interfered with by the
CreateDirectory macro in the Windows headers.
--
Jeff Partch [VC++ MVP]
Possibly, do you know how I can fix that?
-Tim -----Original Message----- "Tim" <ar********@dis cussions.micros oft.com> wrote in
messagenews:06******* *************** ******@phx.gbl. .. Hi, I am trying to create a directory from within my program. I found the IO::Directory:: CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectory A (one that it takes two parameters, the other that it is not in IO::Directory). Did I miss something? I am including mscorlib.dll and using the proper namespaces. I could be wrong, but I suspect that you are being
interfered with by theCreateDirector y macro in the Windows headers. -- Jeff Partch [VC++ MVP]
.
Hi, I undefined the CreateDirectory macro with "#undef
CreateDirectory " and it seemed to work. Thank you for
your help.
-Tim -----Original Message----- Possibly, do you know how I can fix that?
-Tim
-----Original Message----- "Tim" <ar********@dis cussions.micros oft.com> wrote in messagenews:06****** *************** *******@phx.gbl ... Hi, I am trying to create a directory from within my program. I found the IO::Directory:: CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectory A (one that it takes two parameters, the other that it is not in IO::Directory). Did I miss something? I am including mscorlib.dll and using the proper namespaces.
I could be wrong, but I suspect that you are being interfered with by theCreateDirecto ry macro in the Windows headers. -- Jeff Partch [VC++ MVP]
. .
<an*******@disc ussions.microso ft.com> wrote in message
news:05******** *************** *****@phx.gbl.. . news:06******* *************** ******@phx.gbl. .. Hi, I am trying to create a directory from within my program. I found the IO::Directory:: CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectory A (one that it takes two parameters, the other that it is not in IO::Directory). Did I miss something? I am including mscorlib.dll and using the proper namespaces.
I could be wrong, but I suspect that you are being interfered with by theCreateDirector y macro in the Windows headers.
Possibly, do you know how I can fix that?
One option would be to #ifdef/#undef CreateDirectory . Another might be to
move the function that calls IO::Directory:: CreateDirectory to a translation
unit that doesn't see Windows.h. Maybe someone else could suggest a better
option.
--
Jeff Partch [VC++ MVP]
Jeff Partch [MVP] wrote: <an*******@disc ussions.microso ft.com> wrote in message news:05******** *************** *****@phx.gbl.. . news:06******** *************** *****@phx.gbl.. . Hi, I am trying to create a directory from within my program. I found the IO::Directory:: CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectory A (one that it takes two parameters, the other that it is not in IO::Directory). Did I miss something? I am including mscorlib.dll and using the proper namespaces.
I could be wrong, but I suspect that you are being interfered with by the CreateDirectory macro in the Windows headers.
Possibly, do you know how I can fix that?
One option would be to #ifdef/#undef CreateDirectory . Another might be to move the function that calls IO::Directory:: CreateDirectory to a translation unit that doesn't see Windows.h. Maybe someone else could suggest a better option.
Those are about the only two. Sure would be nice if someday the Windows
group would produce a C++ friendly version of windows.h! (Overloaded inline
functions, anyone?)
-cd This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Frederico Caldeira Knabben |
last post by:
Hello,
I'm having a problem when trying to use the Directory.CreateDirectory()
method. It throws a DirectoryNotFoundException exception. I'll try to
illustrate it:
Suppose you have the following (existing) directory:
d:\Sites\MySite\
And you whant to create the following:
|
by: Daniel |
last post by:
If I call CreateDirectory(\\\\devDriveA\\foo\\bar\\a\\b\\c) and
\\devDriveA\foo\bar already exists then sub directories a\b\c don't get
created. When I use CreateDirectory on my own file system, e.g.
CreateDirectory("c:\\a\\b\\c"); it works fine. Is there something that I
must do to get CreateDirectory to work on network drives?
|
by: Eugene Vital |
last post by:
I am trying to create a directory to a folder in a Novell directory map
and it throws an error.
Directory.CreateDirectory(@"\\Karibe\karibe\dev\test");
C# Error Message
|
by: H.B. |
last post by:
Hi,
Is there a way to avoid conflicts between CreateDirectory() (from API) and
Directory::CreateDirectory(). The other functions from Directory class
works(Exists() as example). It seems to be caused by the inclusion of
"windows.h" ... but I need it.
I already tried the System::IO::Directory::CreateDirectory() typo.
Any ideas ?
|
by: Steve |
last post by:
Hi all,
I am referring to this article in MSDN :
http://msdn.microsoft.com/library/en-us/secauthn/security/logonuser.asp
While creating folder on the remote machine, we are specifying the UNC path
as per the example. But we get this error "could not find a part of the
path".
we are prefixing the path with @ symbol and also tried with the escaping the
"\\".
| |
by: Ross |
last post by:
Hi
I have an application using asp.net that I am running on my PC.
The web form has a text box where you can enter a name for a new Photo
category then click on the button.
The code is intended to create a new directory under Photos such as
"Relatives".
|
by: Dan Lorenz |
last post by:
When trying to use the function CreateDirectory on my local machine
everything works fine but when I upload the page to my webhost I get an issue
that it can't find path on D:\, though D:\ is what my website is found on.
This is an H-SPHERE web cluster host.
From my research I found that this issue is due to ASPNET account not having
read previdgeles on the root of the drive.
My question is what is the correct approach to solve this...
|
by: Edhy Rijo [Progytech] |
last post by:
Hi All,
I am very new to VB.NET and creating small project to that will copy all files from a DVD to a folder in the Hard Drive. While doing the copy around 30% I got the following error:
************** Exception Text **************
System.IO.IOException: Insufficient system resources exist to complete the requested service. at
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at ...
|
by: xenoix |
last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource.
My PC :-
Visual Studio 2005
.NET Framework 2
Component Factory Krypton Tools
Test PC :-
.Net Framework 2
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |