Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-12

Question about DLL handler

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Manfred

Hello,

i am new on the list. /waves to everybody

i was hoping to get some help with DLL handler.

This is how it would look like in Delphi:

------------------------B<--------------------------

procedure DLLEntry(dwReason: Integer);
begin
  if dwReason = DLL_PROCESS_DETACH then
  begin
    // do something
  end
  else
  if dwreason = DLL_PROCESS_ATTACH then
  begin
   // do something else
  end;
end;
//Main
begin
  DLLProc := @DLLEntry;
  DLLEntry(DLL_PROCESS_ATTACH);
end.

------------------------B<--------------------------

I am quite new to Lazarus / Freepascal. What i have learned so far is, that DLLProc is not defined in Freepascal.

I have read this not on bugtracker also
http://bugs.freepascal.org/view.php?id=15014
Now i am completely confused...

Would someone please post a few lines of code to show me how this is done proper in Freepascal ?

() Gruesse / Regards /\ Manfred

Reply by email