?
Solved

Creating or opening, writing, and closing a file from a dll

Posted on 2003-03-26
11
Medium Priority
?
165 Views
Last Modified: 2010-05-18
Hi, i have an exe who call a dll, this dll should create a file (no problem with that)
writing data (access denied) and closing the file (no problem).

I set the file mode to read write and deny none, i try the way with a file var, or by a handle,
and i have the read/write rights on the directory (i'm administrator on this machine).

i never had this problem from an exe.

Why can't i write data to a file from a dll ?
0
Comment
Question by:Bazz_The_Cat
[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
  • 5
  • 3
11 Comments
 

Author Comment

by:Bazz_The_Cat
ID: 8211656
i could solve it with a call back function, but i want to know about writing from a dll ...
0
 
LVL 3

Expert Comment

by:emadat
ID: 8211698
Right click on the DLL and check the security tab to see what rights are granted to whom.
0
 

Author Comment

by:Bazz_The_Cat
ID: 8211832
i have all rights on exe, dll, and folder
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Bazz_The_Cat
ID: 8211840
i mean full rights :-)
0
 

Author Comment

by:Bazz_The_Cat
ID: 8212514
In fact, the file is writed personnal directory (my documents) even if i use setcurrentdir...
The only way who works is to give the path with the file name to assign the file.

Is it possible that setcurrentdir does'nt work ?
if i set the current dir when i load the dll, it is changed, but go to my documents when i write.
If i use setcurrentdir just before assigning the file, it does'nt work...
0
 
LVL 3

Expert Comment

by:emadat
ID: 8212661
Can you post the code?
0
 

Author Comment

by:Bazz_The_Cat
ID: 8223444
Ok, sorry, it works, but in fact, the problem is that it create the file at the right place ... i have to search a bit more to find why ... if you can help ...
I have to make a clean code here, i don't want to put all the code, i have to work on it.
0
 
LVL 3

Accepted Solution

by:
emadat earned 100 total points
ID: 8224938
You mean it creates the file at the wrong place?
If yes, then show me just the code by which you define the file name and path.
I think something wrong is there.
0
 

Expert Comment

by:CleanupPing
ID: 9316591
Bazz_The_Cat:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Industry Leaders: 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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

764 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