0

I have the folowing "general meta" problem.

I will describe what I remember of doing.

I work with Delphi XE7.

  1. Yesterday all my code function corect. a. I compiled 2 programs deployed at clients an work ok.

  2. After that I installed (if I remember corect) one package from CleverComponents to compare firebird database.

  3. After open some samples I decided to postpone the samples and get back to 1 program to fix a problem that i received.

the program suddenly does not work anymore.

The component that is problematic is TclDownLoader from Clever Internet Suite.

when I use the TclDownLoader to download something, the component enter in the following code:

FMapHandle := CreateFileMapping(AFileHandle, nil, p, h, l, nil);
if (FMapHandle = 0) then begin
  raise EclStreamError.Create('TODO ' + IntToStr(clGetLastError()));
end;

the error = 8; (message is show TODO 8);

After several trying to clean up dcu, reinstall the Internet suite, delete newest instaled package, clear any trace of what I installed I dont hane any ideeas left.

I'm sure that there is no code problem only some "colision" of the version or who knows.

Any ideea on how to fix this problem?

bummi
  • 27,123
  • 14
  • 62
  • 101
Popa Ovidiu-Razvan
  • 475
  • 1
  • 5
  • 22
  • 1
    Use your revision control system to go back to code that works. Then move forward until you find the change that introduced the problem. Then try to work out why the code is failing. – David Heffernan Oct 22 '14 at 18:51
  • 2
    What are the values of `p`, `h`, and `l`, and what is the size of the file, when the error is raised? According to MSDN: [Common File Mapping Problems and Platform Differences](http://support.microsoft.com/kb/125713): "On Windows NT only, if PAGE_WRITECOPY is specified for the fdwProtect parameter, the file will not automatically be grown. This will cause CreateFileMapping() to fail, and GetLastError() will return ERROR_NOT_ENOUGH_MEMORY (8). To set the size of the file before calling CreateFileMapping(), use SetFilePointer() and SetEndOfFile()." – Remy Lebeau Oct 22 '14 at 19:52
  • To David: I dont have a version control. :(. Your ideea is correct but cannot be putted in practice. I also make a new project using the CreateFileMapping function and result is the same. not work at all. – Popa Ovidiu-Razvan Oct 23 '14 at 17:32
  • To Remy: the code work normal for xx days and after that the same code not worked anmore. the problem is not the function itsef, or parameters or anything else. somehow i "crippled" the IDE, the packages or something else. – Popa Ovidiu-Razvan Oct 23 '14 at 17:38
  • You need to start using revision control immediately. – David Heffernan Oct 24 '14 at 06:09

0 Answers0