2022年5月31日 星期二

delphi DataSource TDataSetProvider local data

 MyBaseを試してみる。(フィールド作成編): Delphi-fan

http://hiderin.air-nifty.com/delphi/2011/09/mybase-dcff.html 

http://delphi.ktop.com.tw/board.php?cid=30&fid=66&tid=51084

 


https://blog.karatos.in/a?ID=00200-12c89300-5e82-48ad-ada0-aab6e1319adf

https://stackoverflow.com/questions/67149100/how-to-detect-user-either-in-dbgrid-or-clientdataset-has-deleted-data-in-a-cell

https://www.delphipower.xyz/guide_6/working_with_data_using_a_client_dataset.html


delphi DataSource TDataSetProvider  Advanced Data TableGram ADTG

https://docwiki.embarcadero.com/Libraries/Sydney/en/Data.Win.ADODB.TPersistFormat

https://torry.net/quicksearchd.php?String=dataset&page=6

https://github.com/osmanatam/delphi-foundations

 https://github.com/osmanatam/delphi-foundations

 https://github.com/zhugecaomao/DelphiSourceCodeCollection

FMX Utilities
Tweaks to TClipboard code to compile with newer FMX versions
 
Misc/Generics.Defaults if done with metaclasses
 
XE2 book 
01. Language basics
02. Enums, numbers, dates and times
04. Classes and records
05. String handling
06. Arrays, collections and enumerators
07. Basic IO
08. Streams
Cleaned up source for fuller visual control demo
09. ZIP, XML, Registry and INI files
10. Packages
11. Dynamic typing and expressions
12. RTTI
13. Native APIs
Make comment more precise
14. Dynamic libraries
15. Multithreading
Another little FileSearchThread.pas thing

delphi image TResourceStream standard Microsoft SDK resource compiler

  standard Microsoft SDK resource compiler

 https://github.com/graphics32/GR32PNG

 RC.EXE, the Microsoft SDK Resource Compiler

https://forum.lazarus.freepascal.org/index.php?topic=12312.0
https://www.wireshark.org/docs/wsdg_html_chunked/ChToolsMSChain.html

https://support.microsoft.com/en-us/topic/an-updated-resource-compiler-for-the-windows-sdk-for-windows-server-2008-and-for-the-net-framework-3-5-is-now-available-a716ac6a-19a7-5b45-b5df-55980cd4cdb4
https://archicadapi.graphisoft.com/documentation/graphisoft-resource-compiler-4
https://docs.microsoft.com/zh-tw/windows/win32/menurc/resource-compiler
https://en.wikibooks.org/wiki/Windows_Programming/Resource_Scripts

Var

   jpg: TJPEGImage;
 resStream: TResourceStream;

begin
  jpg := TJPEGImage.Create;
  resStream := TResourceStream.Create(HInstance, 'testJpg', 'jpgtype');
  jpg.LoadFromStream(resStream);
  Image1.Picture.Assign(jpg);
  jpg.Free;
  resStream.Free;
end;

//RC: testBmp bitmap res\test.bmp
Image1.Picture.Bitmap.LoadFromResourceName(HInstance, 'res\test.bmp');
//RC: testBmp bmptype res\test.bmp
var
  resStream: TResourceStream;
begin
  resStream := TResourceStream.Create(HInstance, 'testBmp', 'bmptype');
  Image1.Picture.Bitmap.LoadFromStream(resStream);
  resStream.Free;
end;

http://melander.dk/reseditor/

https://wiki.freepascal.org/Lazarus_Resources

https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/menurc/resource-compiler.md
 Microsoft platform SDK Resource Compiler
https://docwiki.embarcadero.com/RADStudio/Sydney/en/RC.EXE,_the_Microsoft_SDK_Resource_Compiler

 https://delphi.cjcsoft.net/viewthread.php?tid=43646
Title: Extracting Resource Data from an Exe
Question: Article 832 mentions how one can put Files into an Exe. This shows you how you can get it out
Answer:
I've written a simple function that does this for you, just cut and paste (some detail is below)

procedure ExtractToFile(Instance:THandle; ResID:Integer; ResType, FileName:String);
var
  ResStream: TResourceStream;
  FileStream: TFileStream;
begin
  try
    ResStream := TResourceStream.CreateFromID(Instance, ResID, pChar(ResType));
    try
      //if FileExists(FileName) then
        //DeleteFile(pChar(FileName));
      FileStream := TFileStream.Create(FileName, fmCreate);
      try
        FileStream.CopyFrom(ResStream, 0);
      finally
        FileStream.Free;
      end;
    finally
      ResStream.Free;
    end;
  except
    on E:Exception do
    begin
      DeleteFile(FileName);
      raise;
    end;
  end;
end;

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Classes.TResourceStream

https://github.com/osmanatam/delphi-foundations/tree/ea2c878f01107146674bd92ea518908d8f3e185d/XE2%20book/08.%20Streams/TResourceStream