Re: [windows] Can't delete a closed file?

2019-05-10 Thread Rumbu via Digitalmars-d-learn
On Friday, 10 May 2019 at 19:10:05 UTC, Machine Code wrote: Well, I've had similar issue. The error message says "access denied" which I believe refers to the tmp directory; i.e, the user that is running your executable has no permissions to delete that file. Well, this has nothing to do

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Machine Code via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Friday, 10 May 2019 at 15:06:46 UTC, Temtaime wrote: Lol, you don't have to load and unload the curl dll. std.net.curl have its own lazy libcurl loader. But i'm not sure if it tries to find the dll in the temp directory. If it is the case, then it simply doesn't unload the dll when you have

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Temtaime via Digitalmars-d-learn
Lol, you don't have to load and unload the curl dll. std.net.curl have its own lazy libcurl loader. But i'm not sure if it tries to find the dll in the temp directory. If it is the case, then it simply doesn't unload the dll when you have called some function from it.

Re: [windows] Can't delete a closed file?

2019-05-10 Thread wjoe via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Seb via Digitalmars-d-learn
On Friday, 10 May 2019 at 08:07:32 UTC, Cym13 wrote: Which C runtime are you using? The old and buggy DigitalMars one or the official MS one? I really don't know, how can I find out? I litterally just used dmd on the script above with no special options then ran the resulting exe. Yeah,

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Friday, 10 May 2019 at 07:09:45 UTC, Seb wrote: On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: [...] You could try to use the find handle function in Process

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 15:05:10 UTC, Andre Pany wrote: Can you reproduce the issue with other Dlls or is it only reproducible with curl dll? Does the issue with curl dll also exists if you do not call the curl function? Kind regards Andre I didn't have the time to test with another dll

Re: [windows] Can't delete a closed file?

2019-05-10 Thread Seb via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: [...] You could try to use the find handle function in Process Explorer to figure out what process has the file open:

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux with the exact same end result. For reference my windows system

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux with the exact same end result. For reference my windows system is a 64b windows 10.

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:07:53 UTC, Andre Pany wrote: On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:11:56 UTC, Rumbu wrote: Since deploying a dll is a suspect behaviour outside a normal installation process, most probably you have a lock on the file put by windows defender or an antivirus if installed. Thanks for your input but I'm absolutely certain that it's

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Rumbu via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and