[fpc-devel] FPC Wiki spam protection

2006-07-13 Thread Felipe Monteiro de Carvalho

Hello,

Every time I edit fpc wiki it will say I entered a new url, and I need
to type a number, even if no new url is entered. And it´s a little
annoying.

thank you very much,
--
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Vinzent Hoefler
On Thursday 13 July 2006 12:31, Jose Manuel wrote:
>>> The error code is: 193  0x00C1  N/A %1 is not a
>>> valid Win32 application.
>>>
>>> But that doesn't make sense.
[...]
>
> I guess FPC is creating the DLL with no relocation section in it.
> Another issue is that meaningless error. It should be "Abnormal
> process termination" or the like.. :-?

Uhuh. How come that this would make more sense? ;-)


SCNR,

Vinzent.

-- 
"An unexpected error occured." - Oh, all the other ones are *expected*?

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: Re[2]: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Felipe Monteiro de Carvalho

On 7/13/06, Sergei Gorelkin <[EMAIL PROTECTED]> wrote:

May be, for some reason DLLs are created without the relocation
information (or with malformed relocation info)?


Yes, you really guessed right =)

I found an explanation on the fpc documentation about it that says exactly that:

http://www.freepascal.org/docs-html/prog/progse53.html#x226-22800012.5

If I pass -WR option to generate the libraries, now they work.

I tryed to put that on my fpc.cfg to compile on Lazarus, but it
doesn´t work. I don´t know why the generated libraries won´t work. If
I go to the command line and pass the option, then it will work.

I will suggest making a checkbox for this option on Lazarus, and make
it default for libraries.
--
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Jose Manuel

> > The error code is: 193  0x00C1  N/A %1 is not a 
> valid Win32 application.
> > 
> > But that doesn?t make sense.
> 
> See if FPC has some directive for setting the DLL baseaddress 
> and set it,
> and see if that matters.


I guess FPC is creating the DLL with no relocation section in it.
Another issue is that meaningless error. It should be "Abnormal process 
termination" or the like.. :-?

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re[2]: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Sergei Gorelkin
Thursday, July 13, 2006, 4:04:05 PM, Felipe wrote:

FMdC> The error code is: 193  0x00C1  N/A %1 is not a valid Win32 
application..

FMdC> But that doesn´t make sense.

May be, for some reason DLLs are created without the relocation
information (or with malformed relocation info)? When you just compile
two DLLs from the same source, they will have the same base address.
Loading the first DLL will succeed if its base address is not occupied
by some other DLL. But after that attempting to load the second DLL
with the same base address would cause Windows to relocate it to another
address - and without correct relocation information that would fail.

If this is the scenario, then either you specify wrong compiler
options, or the compiler (or linker) really generates malformed DLLs.

-- 
Best regards,
 Sergei


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Jose Manuel
> The error code is: 1930x00C1  N/A %1 is not a 
> valid Win32 application.
> 
> But that doesn´t make sense.

Can you try indicating another address space to be loaded in the 2nd lib?

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Marco van de Voort
> > You might get a clue if you print last windows error.
> > (sysutils.getlastoserror) after the 2nd loadlib
> 
> The error code is: 1930x00C1  N/A %1 is not a valid Win32 
> application.
> 
> But that doesn?t make sense.

See if FPC has some directive for setting the DLL baseaddress and set it,
and see if that matters.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Felipe Monteiro de Carvalho

You might get a clue if you print last windows error.
(sysutils.getlastoserror) after the 2nd loadlib


The error code is: 193  0x00C1  N/A %1 is not a valid Win32 application.

But that doesn´t make sense.
--
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem loading 2 dlls created on Free Pascal

2006-07-13 Thread Marco van de Voort
> var
>   Lib, Lib2: HINST;
> begin
>   Lib := LoadLibrary('C:\Programas\Apache\pmodules\newlib.dll');
>   Lib2 := LoadLibrary('C:\Programas\Apache\pmodules\newlib2.dll');
>   WriteLn(Lib);
>   WriteLn(Lib2);
>   Sleep(5000);
>   FreeLibrary(Lib);
>   FreeLibrary(Lib2);
> end.
> 
> The WriteLn statements show that the first library is loaded
> successfully. The second will return zero.
> 
> If the second library being loaded is not created with Free Pascal (I
> tested with libhttpd.dll). The load will be successfull.

You might get a clue if you print last windows error.
(sysutils.getlastoserror) after the 2nd loadlib
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel