CreateDirectory problem

I am trying to create a directory using

CreateDirectory(strDirName, NULL);

However, when I try to write a file into the created directory I cannot do
so, it gives a security error;
 I do have the Administrator privileges onto the computer and so on.
does anyone has any sample code that sorts out the security issue, or just
some sample code with respect to the Security Descriptor creation and the
rest of the protocol.


0
PRG9798 (12)
8/20/2004 3:35:01 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1020 Views

Similar Articles

[PageSpeed] 59

Try to get the error while you are creating the directory
"GetLastError".
or try a sample application which would help in getting the cause of
Privileges error.

 
"PRG" <PRG@abc.abc> wrote in message news:<cg55h3$e39$1@yeppa.connect.com.au>...
> I am trying to create a directory using
> 
> CreateDirectory(strDirName, NULL);
> 
> However, when I try to write a file into the created directory I cannot do
> so, it gives a security error;
>  I do have the Administrator privileges onto the computer and so on.
> does anyone has any sample code that sorts out the security issue, or just
> some sample code with respect to the Security Descriptor creation and the
> rest of the protocol.
0
jakir (35)
8/23/2004 11:35:07 PM
Show the exact code you are using. As already pointed out in another answer, if this is
CE, you MUST provide the complete path to a file because there is no "working directory".
					joe

On Sat, 21 Aug 2004 01:35:01 +1000, "PRG" <PRG@abc.abc> wrote:

>I am trying to create a directory using
>
>CreateDirectory(strDirName, NULL);
>
>However, when I try to write a file into the created directory I cannot do
>so, it gives a security error;
> I do have the Administrator privileges onto the computer and so on.
>does anyone has any sample code that sorts out the security issue, or just
>some sample code with respect to the Security Descriptor creation and the
>rest of the protocol.
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/24/2004 4:02:08 AM
Reply:

Similar Artilces:

2002 vs 2007 MS Office Excel has encountered a problem and needs t
I have an Excel file with VBA code that was running fine in version 2002. When I switched to version 2007, it now gives me intermittent "Microsoft Office Excel has encountered a problem and needs to close." My choices are to Send Error Report or Don't Send. It also has a check box for recovering the file. I posted this issue before and it was decided that perhaps the file was corrupted, so I rebuilt the file in the new version from scratch. No change in the problem...ouch! So I'm going to post this code again in hopes somebody will have an idea about how t...

Access Problem
Hi I am running MS ACCESS XP and i cannot open anything when i create a new database, nothing happens when i click create table by wizards, design etc. the same applies to forms. I have tried eveerything including reinstalling, any ideas i there anyway to completely unistall office from my computer because i believe i have a corrupted installion that may be causing the problem thanks for your time On Sun, 2 Dec 2007 14:29:31 -0800 (PST), Mikejack2007uk@googlemail.com wrote: You can start uninstall using the setup program. After that, additional cleanup is possible. For example these arti...

Outlook calendar printing problem
I am running Outlook 2003 on Win98 and I cannot get a weekly calendar to print starting on Sunday. I have gone to Tools->Options->Calendar Options, selected all days of the week and selected Sunday as the first day of the week. In the weekly style print setup I select left to right for arrangement and yet the printout still starts the week on Monday. If I change the first day of the week to any other day in the options menu the weekly calendar prints starting with that day of the week. For example, if I select Wednesday as the first day of the week, the printed weekly calendar sta...

Simple xpath expression problem
I am trying to use a simple xpath expression, the code looks like this: Dim xdoc As New System.Xml.XmlDocument Dim xnode1 As System.Xml.XmlNode Dim xlist As System.Xml.XmlNodeList xdoc.LoadXml(Application("MenuXML")) xlist = xdoc.DocumentElement.SelectNodes("//MenuItem[@User=1]") For Each xnode1 In xlist xnode1.ParentNode.RemoveChild(xnode1) Next the xml document looks like this: <?xml version="1.0" encoding="utf-8" ?> <MenuRoot> <Page ID="101"> <M...

CRM Data Migration Framework Problems
Hi, I am having some difficulties migrating my existing data across to CRM (1.2) and would really appreciate any help or advice. I have taken great pains to populate the CDF, and have checked and rechecked the data to ensure that it is correct. However, when I run the tool, I get messages indicating that there is a problem with the relationship data to do with the primary contact for each account: ERROR SHOWING WHEN MIGRATING ACCOUNT ENTITY 21/01/2004 - 11:29:20 PM -- Creating object 21/01/2004 - 11:29:20 PM -- [ERROR] Failed to migrate object: <description>The specified object was ...

Problem restoring Outlook 2003 PST file
I recently lost my pc in a power outage. Luckily, I was able to salvage the hard drive and copied the outlook.pst file to a CD. I am having trouble with Outlook recognizing my Contacts. Here is what I did: I opened up Outlook 2003 for the first time and receive the normal �welcome� email. I then go to File\Open\Outlook Data File and opened up the outlook.pst file. When I �click� on Contacts, I do see my address book, however a) if I try to add a new contact, it adds it to another contact list b) if I edit a contact, the custom categories that I created on my old pc, ...

Exchange 5.5 email problem
I have an Active Directory network with an Exchange 5.5 server running on a Windows NT box. I am hosting 3 email domains on that box. For example lets call them mydomain1.com, mydomain2.com and mydomain3.com. All external emails come in and work just fine except for the mydomain3.com emails. My internal Active Dirctory domain is mydomain3.com. Currently my Exchange server on the NT box is pointing at the internal DNS server that forwards requests to the outside. I was thinking my problem is that and that I might need to have the NT box with Exchange on it use our ISP DNS servers instead. ...

Problem upgrading to Office 2004
Hi, I'm trying to upgrade a Powerbook from Office v.X to Office 2004. It installed without any problems, but when I try to start any of the applications, the window comes up to accept the license agreement, and I accept it and then click Next, the application just closes. The old version still works properly. Any ideas what the problem might be? Thank you. Peter I see that a couple other people have reported these symptoms in the last couple of months, but neither reported a solution. The machine is a Powerbook Ti, running 10.4.2, with plenty of disk space, and 1Gb RAM. Office...

H&S to Business install problem
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel A Mac I am working on had Office 2008 H&amp;S. I tried to install the upgrade edition of 08 Business edition which did not work. I then purchased the full Business edition and removed the current version and the .plist files as explained in the entourage.mvps site. I installed the full Business edition from a downloaded .dmg file and installed it from the provided key from the purchase page. After the install of that it shows this error when launch any of the office apps: &quot;This software is an upgrade to ...

I'm having some problems with the MoneyCentral Portfolio...
I used to use the MoneyCentral Portfolio a lot, but I haven't gone there in many months. When I accessed it yesterday, it started creating files on my hard drive... By the time I stopped it, it had created 1519 files, all same size (3732 KB), for a total of 5.4 GB. All files are named "my portfolioXXXX.mny". My hard drive is getting full, so I didn't want to let it run forever. Does anyone know what these files are? and why they got created? I remember there is a support option once you get in the portfolio application, but since I can't get in... Please hel...

problem with mail database
Thank you all who have assisted with my troubles. I have now rescued all but a couple of mail boxes - those with odd names - more exeriments necessary I guess. Neil ...

Office 2007 Multi Language install problem 12-15-09
Hi, I want to apply an Office 2007 language pack to an existing Office 2007 (English) installation. I've followed all steps as described here: http://technet.microsoft.com/en-us/library/cc179145.aspx#section2 * I've copied all the Dutch folders (access.nl-nl, excel.nl-nl, ...*.nl-nl) to a seperate folder * edited the OMUI.nl-nl\config.xml file as described (see attachment) * start the setup from the office 2007 setup-folder (setup.exe /config c:\mui\nl\OMUI.nl-nl\config.xml) the setup runs successfully. When I want to select Dutch as the interface language via St...

DPM 2010 beta tape library Dell TL2000 problem
Hi, I have problem with Dell tape library TL 2000 (aka IBM 3573-TL). Tape library is full = tapes in all slots #1-23, but in DPM UI wrote -> slot #16 is empty. I have in registry this: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Agent] "RSMCompatMode"=dword:00000008 Thanks, L. After I second run detail inventory in DPM UI is correct information about tapes in library slots. "Ladislav Rudisar" wrote: > Hi, > I have problem with Dell tape library TL 2000 (aka IBM 3573-TL). Tape > library is full = tapes in ...

Exchange Problem #6
I have a person that sends us email regularly, since i have put 2003 exchange sp2 on my server, that person which is a verizon.net email address ,his emails get caught in the local deleivery!! Any ideas?? i dont think im using IMF!! ...

File Attachment Problem in Vista
Hi, We are using Vista OS and browser is IE 7. When we are trying to attach more than 100MB to application, getting error as 'Page cannot be displayed'. and we are using the SAP is the backend system with OS is HP-UX and we set the parameters at max allowable attachment is 200MB in SAP system. So Kindly can help me on this issue and is there any limit by using Vista OS. Note: when we tried with this XP OS, its successfully attached the 110 MB file to the application. So facing the problem with Vista only. Please do the needful. Thanks & Regards, Raja...

CRM 3.0 Mapping Problem
HI, Sorry now I am at the computer and I can give a more detailed account of the mapping issue. When you create a Contact within an Account, the accountid maps to parentcustomerid in Contact. What I am trying to do it take that value and put it into a attribute called CFSAccount Name to hold that value so it is mappable. When then create an Opportunity, Quote, or Order from that Contact I would then want to map: Contact Opportunity CFSAcount Name >>CFSAccountName Contact Quote CFSAccountName >> CFSAccountName Contact ...

Date and Time Problem
I need to have the current day autofill a cell but it needs to be base on a time change at 0700 hrs. What I need is to be able to fill out m form, have the current date display in the cell but when the syste clock changes to 0700 the date will roll up to the next day. 0100 hrs 4/18/06 0600 hrs 4/18/06 0900 hrs 4/19/06 2059 hrs 4/19/06 0100 hrs 4/19/06 0500 hrs 1/19/06 0705 hrs 1/20/0 -- JDBARNES6 ----------------------------------------------------------------------- JDBARNES63's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3363 View this thread: http://www.e...

Problem in ListCtrl
Hi All, I am having list ctrl with images and text underneath of the image. We are able to display images and text. I have two queries which is as follows 1. we have a requirement of drawing a rectangle when an item is selected using key or mouse click. Border should be of similar size. If we use GetItemRect( ) it does not give the same size for all the image. It varies depends on the text length. If we use our own RECT size that is 120X120 size then also it doesnot work properly. Since some times the currect rect intersects with the next image...

RowToCopy problem
Hello, I'm trying to automate a worksheet. I have a command button that calls a module, (Module2), the code selects a range of cells (Range("A7:I7") and copies that range to the next empty row of worksheet2 in the workbook. I can only get cell A7 to copy correctly, none of the remaining Range(B7:I7), copy over. The code is as follows: Option Explicit Sub movedata() Dim S2Row As Long Dim Paul As Integer Dim RowToCopy As Integer RowToCopy = 1 S2Row = Worksheets("sheet2").Range("A1").End(xlDown).Row For Paul = 1 To RowToCopy Worksheets("sheet2&...

Installing problems for Publisher 2002
I have installed my old Publisher 2002 on my new computer, but don't have the registration code from the CD cover. Can anyone suggest how I can get Pub installed without the registration number, or give me a registration number that will work? Thanks if you can help me. The Beav wrote: > I have installed my old Publisher 2002 on my new > computer, but don't have the registration code from the > CD cover. > Can anyone suggest how I can get Pub installed without > the registration number, or give me a registration number > that will work? > Thanks if you can hel...

Problem in restricting users from sending/receving internet email
I have found a helpful articel here: http://www.msexchange.org/tutorials/MF009.html I read it through couple times but I would like to ask some questions before I start the work on our Exchange 2000 server. 1. The "group" I am going to create for adding users into the restricting list, will it be a Security group or Distribution group? What group scope should I give it? 2. Under the section of "Restricting Users from Sending Internet Base Email", the article tells us to create a *new* SMTP connector and add the group into the "Dilivery Restriction" page. Will ...

Creation of MDE causing problem
I have a form that works fine in MDB database until I create an MDE file. Once I have done that, both in the MDE and the MDB, whenever the form is closed I get a dialogue box asking to Enter Parameter Value for the 1st field on the form - which is a short date field. If you answer "OK" or "Cancel" it will close fine. If I go into design mode and save the form, everything is fine in the MDB then - until I create an MDE again and then I get the message back. I have checked everything that I can think of but with no success - it is driving me crazy! (And I am sure tha...

#DIV/0! Problem
I'm sure there is a simply fix but I don't know what it is. My formula reads: =SUM(B4:W4)/SUM(B3:W3). If I have no values entered within the specified range I get the #DIV/0! error. How should I write the formula to have the cell show a 0 (zero) until values are entered? Thanks =IF(SUM(B3:W3)=0,0,SUM(B4:W4)/SUM(B3:W3)) -- Kind Regards, Niek Otten Microsoft MVP - Excel "Michael Keene" <bayview04@hotmail.com> wrote in message news:908ecb5a.0406191315.24696c49@posting.google.com... > I'm sure there is a simply fix but I don't know what it is. My formula ...

Problem due to Worker Threads?
Hi This is my first emcounter with multithreaded application. I have created 7-8 worker threads in my application. After running the application for some time my application gives me a run time error. The location where the error arises is not fixed.It can come any where. I dont understand y is this happening. I am facing such a problem for the first time. I think it has got something to do with multi threading. Waiting for suggestions Regards Davinder wrote: > This is my first emcounter with multithreaded application. > I have created 7-8 worker threads in my application. >...

screen view mode problem
Money started appearing recently only in full Maximize view; the Restore view does not work. The program will Minizize the view, but not Restore to a partial screen frame view. Can anyone help with this problem? Thanks, Russell Maybe. Try this: Hit Alt+[spacebar] Hit M Use the cursor keys to move the window down and right. Now see if you can grab the upper left corner with your mouse and resize it. "Russell" <rpottharst(deletethis)@earthlink.net> wrote in message news:HaudnbkIr7H_LAPdRVn-tw@comcast.com... > Money started appearing recently only in full Maximize view...