2022年5月11日 星期三

delphi message queue registing Window procedure AllocateHWnd

 delphi message queue registing Window procedure AllocateHWnd RegisterWindowMessage DeallocateHWnd

https://zarko-gajic.iz.hr/receive-windows-messages-in-your-custom-delphi-class-nonwindowed-control-object/

  Window procedure 

https://stackoverflow.com/questions/36079268/bringing-tcallbackthunk-to-64-bit-via-anonymous-function

http://computer-programming-forum.com/31-pascal/a8757a5d056efcad.htm

https://www.programmersought.net/article/334918782.html

https://edn.embarcadero.com/article/10323


 TWndMethod
 TWinControl.MainWndProc
 TWinControl.WndProc
 TControl.WndProc
 TObject.Dispatch
 TWinControl.DefaultHandler
 TControl.Perform
 TWinControl.Broadcast
 TWinControl.WMPaint
 TWinControl 

https://blog.actorsfit.com/a?ID=00200-873e72f4-0375-4905-a5ba-9f1d7cdb85b4

TranslateMessage
DispatchMessage
PostMessage
GetMessage
PeekMessage

https://stackoverflow.com/questions/50041183/properly-overriding-wndproc

https://docwiki.embarcadero.com/RADStudio/Sydney/en/The_WndProc_Method

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerwindowmessagea

https://docwiki.embarcadero.com/RADStudio/Sydney/en/Declaring_a_New_Message-handling_Method

TApplicationEvents RegisterWindowMessage  Message Event

https://www.codeproject.com/Articles/546/Message-Management#Registered%20Window%20Messages

https://edn.embarcadero.com/article/38447

https://stackoverflow.com/questions/52380172/sendmessage-fail-using-registerwindowmessage-api

Adventures in Delphi 6 Messaging

https://www.informit.com/articles/article.aspx?p=27217&seqNum=9

Reactive extension for Delphi Reactive Extensions

 https://github.com/Purik/RxDelphi

system.loadlibrary JNI_OnLoad Embarcadero.Jni

 https://stackoverflow.com/questions/48670592/invoke-jni-onload-from-delphi

 https://developer.android.com/training/articles/perf-jni

https://community.embarcadero.com/article/technical-articles/1040-using-the-android-jni-bridge-to-open-a-pdf

 Using the Android JNI bridge to open a PDF

Delphi   ZeroPlayer Library  Android dynamic library 

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.IOUtils.TPath.GetLibraryPath

 uses
   ..., Embarcadero.Jni

const
  LIBNAME = 'libtest.so';

function try_load_dll: THandle;
var
  libPath: string;
  OnLoadFunc: TJNI_OnLoad;
  hlib: THandle;
begin
  Result := 0;
  libPath := TPath.Combine(TPath.GetLibraryPath, libname);
  hlib := LoadLibrary(PChar(libPath));
  if hlib = 0 then Exit;
  @OnLoadFunc := GetProcAddress(hlib, 'JNI_OnLoad');
  if not Assigned(OnLoadFunc) then
  begin
    FreeLibrary(hlib);
    Exit;
  end;
  OnLoadFunc(PJavaVM(System.JavaMachine), nil);
  Result := hlib;
end;

https://question-it.com/questions/3417717/vyzov-jni_onload-iz-delphi

LIBNAME = 'libtest.so';
function try_load_dll:integer;
var libPath:system.string;
begin
  _status:= 0 ;
  libPath:=TPath.Combine(tpath.GetLibraryPath,libname);
  _status := LoadLibrary(PChar(libPath));
  result:=_Status;
  if( _status= 0 )then exit;
end;

JNI_OnLoad 


https://coderoad.ru/48670592/%D0%92%D1%8B%D0%B7%D0%B2%D0%B0%D1%82%D1%8C-JNI_OnLoad-%D0%BE%D1%82-Delphi



https://arophix.com/2017/12/01/android-jni/

https://www.programmersought.net/article/329130475.html

https://programmer.ink/think/jni_ndk-advanced-programming-guide-part-2.html

JNI_NDK Advanced Programming Guide Part