2023年11月15日 星期三

Create Manifest for Vista UAC if Not Running Under Administrative Rights vista uac Windows Vista User Account Control

 http://talkdelphi.blogspot.com/2009/04/create-manifest-for-vista-uac-if-not.html

  Create Manifest for Vista UAC if Not Running Under Administrative Rights
From a developer perspective Windows Vista's UAC can be problematic for some parts of your Delphi application, if the application is not being run by an administartor. One such operation is writing to the Registry database.

Learn how to "request admin rights" by creating an application manifest file....

Windows Vista - User Account Control
User Account Control is a security component in Windows Vista. UAC enables users to perform common tasks as non-administrators, called standard users in Windows Vista, and as administrators without having to switch users, log off, or use Run As.
To help prevent malicious software from silently installing and causing computer-wide infection, Microsoft developed the UAC feature.

From a developer perspective the following UAC features are important:


From a developer perspective Windows Vista  s UAC can be problematic for some parts of your Delphi application   if the application is not being run by an administartor   One such operation is writing to the Registry database  
Learn how to   request admin rights   by creating an application manifest file        
Windows Vista - User Account Control
User Account Control is a security component in Windows Vista   UAC enables users to perform common tasks as non-administrators   called standard users in Windows Vista   and as administrators without having to switch users   log off   or use Run As  
To help prevent malicious software from silently installing and causing computer-wide infection   Microsoft developed the UAC feature  
    var
    sKey  string  
    Section  string  
    const
    ApplicationTitle =   Your Application TITLE    
    begin
    if  bRunOnce   then
    sKey      Once  
    else
    sKey         
    Section      Software\Microsoft\Windows\CurrentVersion\Run  + sKey + #0  
    with TRegIniFile  Create         do
    try
    RootKey    HKEY_LOCAL_MACHINE  
    if Remove then
    DeleteKey  Section   ApplicationTitle  
    else
    WriteString  Section   ApplicationTitle   sCmdLine     
    finally
    Free  
    end  
    end  

On Vista, if the user running the application does not have admin rights the above code would fail, due to UAC!
Faking UAC Rights - How to Request Execution Level
Even if the user running the above code is n


    Create XML file with following content:
          ?xml version=  1  0   encoding=  UTF-8   standalone=  yes  ?  
          assembly xmlns=  urn:schemas-microsoft-com:asm  v1   manifestVersion=  1  0]
          assemblyIdentity version=  1  1  1  1  
        processorArchitecture=  X86  
        name=  YourApplicationExeName  
        type=  win32      
          description  elevate execution level    description  
          trustInfo xmlns=  urn:schemas-microsoft-com:asm  v2]
          security  
          requestedPrivileges  
          requestedExecutionLevel level=  requireAdministrator   uiAccess=  false      
            requestedPrivileges  
            security  
            trustInfo  
            assembly  
    1 24   YourApplicationName  manifest  
    brcc32 YourApplicationName  RC -foYourApplicationName  REC
    {$R YourApplicationName  REC}
How to Automate the Above   Create Manifest   Process

 

Direct database access is the single most important key-feature of NativeDB

 Direct database access is the single most important key-feature of NativeDB

Direct database access is the single most important key-feature of NativeDB. NativeDB skips both the Borland Database Engine (BDE), the Microsoft's Open Database Connectivity (ODBC) and OLEDB layers. Thus make it easy to deploy, install and configure your end-user application. Instead it connects

Generic Methods and Type Inferencing

  Generic Methods and Type Inferencing

http://talkdelphi.blogspot.com/2009/04/generic-methods-and-type-inferencing.html

In other words - as I understand it - Tiburón/Delphi 2009 will not (initially at least) support type inferencing. To my mind this dramatically reduces the attractiveness of Generic Methods.

What Is Type Inferencing?

As the term suggests, (in this context at least) it is the ability of the compiler to infer the type of some symbol (variable or parameter etc) from the context or code around it.

Storing Resource (WAV, MP3, ...) into Delphi Executables Resource Files (.RES)

 http://talkdelphi.blogspot.com/2009/04/storing-resource-wav-mp3-into-delphi.html

StegaImage - Steganography with Delphi Steganography with Delphi - Hide Data Inside Images

http://talkdelphi.blogspot.com/2009/04/steganography-with-delphi-hide-data.html

https://en.wikipedia.org/wiki/Steganography

“big integer” math support. Type support classes now expose methods to convert a type from an to a Variant. delphi some

 http://talkdelphi.blogspot.com/2009/04/dehl-03-is-out.html

 http://talkdelphi.blogspot.com/2009/04/dehl-03-is-out.html
https://delphi.cz/post/DeHL-Library.aspx
centralized and OOP-ish Date/Time support,
 generic collection classes
 “big integer” math support.
Type support classes now expose methods to convert a type from an to a Variant.


https://delphi.cz/post/Nekolik-poznamek-ohledne-upgrade-mezi-verzemi-Delphi.aspx
https://delphi.cz/post/Spoluprace-Delphi-a-NET-via-JCL.aspx
https://delphi.cz/post/Delphi-DLL-plugin.aspx
https://delphi.cz/post/OXml-The-next-generation-XML-library-for-Pascal.aspx
https://delphi.cz/post/KOL-Key-Objects-Library.aspx
https://delphi.cz/post/Nahodne-vykriky-45.aspx

https://synopse.info/forum/viewtopic.php?id=253
Open Source SynTaskDialog unit for XP,Vista,Seven (Page 1) / Other components / mORMot Open Source

DDevExtensions 2.82 and IDE Fix Pack 5.7 released ddevextensions-2-82-and-ide-fix-pack-5-7-released/

https://code.google.com/archive/p/delphilhlplib/wikis/UsingNullable.wiki
https://code.google.com/archive/p/delphilhlplib/wikis/FeatureList.wiki

https://github.com/pavkam/DeHL

DeHL

DeHL (Delphi Helper Library) is discontinued starting with 09.01.2012. You can reuse parts of this project for whatever particular needs you have. The source code is BSD licensed.

The most important features of DeHL for now are:

    A set of generic collections classes (TList, TDictionary, THashSet, TMultiMap, TPriorityQueue and etc).
    Linq-like extensions (called Enex) for collections which allow writing queries on collection classes.
    Date/Time functionality all combined in a few structures (somehow equivalent to .NET's DateTime structure)
    Type Support concept that defines a set of default "support classes" for each built-in Delphi types (used as defaults in collections). Custom "type support" classes can be registered for your custom data types.
    BigCardinal and BigInteger data types.
    BigDecimal for infinite precision Decimal calculus
    Scoped objects in Delphi.
    Nullable types in Delphi.
    Tuples
    Array extensions and utilities.
    Wide charset implementation.
    OOP TString type.
    Full generic serialization for all included types and collections.
    Type conversion system with custom conversion support.
    ... and more!

https://www.appsloveworld.com/coding/delphi/6/key-value-collection-that-maintains-order
 

Continuous Integration & Automated Software Builds finalbuilder

 https://www.finalbuilder.com/

 

 

 Automated Builds for Delphi FinalBuilder & Delphi. Automating your Delphi Build Process is ...

FinalBuilder is an automated build and release management solution for Windows software developers and SCM (Software Change Management) professionals.

delphi file record delphi data storage data file delphi data storage in recfile record

 browser local db storage

10 client-side storage options and when to use them

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Structured_Types_(Delphi)

delphi recfile Seek(recFile,FileSize(recFile));. recPos := FilePos( recFile );. FilePosLabel.Caption := IntToStr( recPos );. FILESIZE IN DELPHI AND LAZARUS. There are two ... https://docwiki.embarcadero.com/radstudio/alexandria/en/internal_data_formats_(delphi)
https://docwiki.embarcadero.com/radstudio/alexandria/en/approaches_to_file_i/o
https://github.com/shusaura85/TDataFile
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Internal_Data_Formats_(Delphi)
Database: Optimal Approaches for Data Storage in Delphi
https://copyprogramming.com/howto/which-is-the-best-method-to-save-data-in-delphi
delphi data storage data file

 version of the compiler.
File Types

File types are represented as records. Typed files and untyped files occupy 592 bytes on 32-bit platforms and 616 bytes on 64-bit platforms, which are laid out as follows:

 type
   TFileRec = packed record
     Handle: NativeInt;
     Mode: word;
     Flags: word;
     case Byte of
       0: (RecSize: Cardinal);
       1: (BufSize: Cardinal;
           BufPos: Cardinal;
           BufEnd: Cardinal;
           BufPtr: _PAnsiChr;
           OpenFunc: Pointer;
           InOutFunc: Pointer;
           FlushFunc: Pointer;
           CloseFunc: Pointer;
           UserData: array[1..32] of Byte;
           Name: array[0..259] of WideChar; );
  end;

Text files occupy 730 bytes on Win 32 and 754 bytes on Win64, which are laid out as follows:

 type
   TTextBuf = array[0..127] of Char;
   TTextRec = packed record
     Handle: NativeInt;
     Mode: word;
     Flags: word;
     BufSize: Cardinal;
     BufPos: Cardinal;
     BufEnd: Cardinal;
     BufPtr: _PAnsiChr;
     OpenFunc: Pointer;
     InOutFunc: Pointer;
     FlushFunc: Pointer;
     CloseFunc: Pointer;
     UserData: array[1..32] of Byte;
     Name: array[0..259] of WideChar;
     Buffer: TTextBuf; //
     CodePage: Word;
     MBCSLength: ShortInt;
     MBCSBufPos: Byte;
     case Integer of
       0: (MBCSBuffer: array[0..5] of _AnsiChr);
       1: (UTF16Buffer: array[0..2] of WideChar);
   end;


http://mc-computing.com/languages/delphi/delphifileio.htm

File I/O Commands
Open File for I/O     FileOpen(const FileName: string; Mode: Integer): Integer;
AssignFile(F, OpenDialog1.FileName);
Rewrite(var F: File [; Recsize: Word ] );
Append(var F: Text);
Get File Mode     F.Mode or (F as TFileRec).Mode
Write to File     FileWrite(Handle: Integer; const Buffer; Count: Integer): Integer;
Write to TextFile     Writeln, Write
Write to File     BlockWrite()
Read From TextFile     Read, Readln
Read From File     BlockRead()
Set Current Location    Seek(var F; N: Longint);
Get Current Location    FilePos(var F)
Length of File     FileSize(var F)
End of File     while not Eof(F1) do
Close File     FileClose(Handle: Integer)
CloseFile(F1);
Closes All Files     Not available in Delphi

https://www.tek-tips.com/viewthread.cfm?qid=1527339
File IO - Embarcadero: Delphi - Tek-Tips
procedure TForm1.InsertBlockNumbersClick(Sender: TObject);
Var
    infile, outfile: TextFile;
    inBuffer,outBuffer: array[1..65536] of char;
begin
    AssignFile(Infile, FullFileName);
    reset(infile);
    System.SetTextBuf(infile, inBuffer);
    System.SetTextBuf(outfile, outBuffer);
    AssignFile(outfile, FullFileName);
    rewrite(outfile);

    writeln(outfile, '(Tests InsertBlockNumbers.)');
        while not eof(infile) do
            begin
              //Do Something
            end;
    CloseFile(infile);
    CloseFile(outfile);
end;

http://delphibasics.50webs.com/NameSpace/Name/System.IO/Part/FileAccess.html
 System.IO
    
  BinaryReader      Class
  BinaryWriter      Class
  BufferedStream      Class
  Directory      Class
  DirectoryInfo      Class
  File      Class
  FileAccess      Enumeration
  FileAttributes      Enumeration
  FileInfo      Class
  FileMode      Enumeration
  FileShare      Enumeration
  FileStream      Class
  FileSystemWatcher      Class
  MemoryStream      Class
  Path      Class
  SeekOrigin      Enumeration
  StreamReader      Class
  StreamWriter      Class
  StringReader      Class
  StringWriter      Class

var
  LogFile: string = 'c:\log.txt';

// Append a message to a log file. See the example with the Array
// Keyword for the other overloaded Log procedure.
procedure Log(const Msg: string); overload;
var
  F: TextFile;
begin
  AssignFile(F, LogFile);
  // Try to append to the file, which succeeds only if the file exists.
{$IoChecks Off}
  Append(F);
{$IoChecks On}
  if IOResult <> 0 then
    // The file does not exist, so create it.
    Rewrite(F);
  WriteLn(F, Msg);
  CloseFile(F);
end;

https://www.drbob42.com/books/htmldata.htm

delphi embarcadero file class
https://blogs.embarcadero.com/loading-bitmaps-and-cursors-from-res-files/
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_Streams_to_Read_or_Write_Data
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_File_Streams
https://docwiki.embarcadero.com/Libraries/Sydney/en/System.Classes.TFileStream.Create
https://docwiki.embarcadero.com/CodeExamples/Sydney/en/ReadWriteFile_(Delphi)

delphi File Of Record_Type

https://github.com/graphics32/graphics32/blob/744df8aa07251e3457553abd3f039d2352d37aa8/Source/GR32.ImageFormats.TBitmap.pas

delphi bitmap header record "file of"
 bitmap header fpc
https://lazarus-ccr.sourceforge.io/docs/lcl/graphics/tbitmap.html
https://github.com/edivando-fpc/BGRABitmap/blob/master/bgragraphics.pas

winapi tresourcestream resources rcdata file delphi kernel32 system FindResourceA LoadResource WindowsBase

 winapi  resources rcdata  WinBase.h resource.h kernel32.dll" "system"   FindResourceA
winapi tresourcestream resources rcdata
delphi kernel32  system FindResourceA LoadResource WindowsBase

https://github.com/search?q=repo%3Amicrosoft%2Fwindows-rs%20FindResourceA&type=code

FindResource MAKEINTRESOURCE
https://learn.microsoft.com/zh-tw/windows/win32/menurc/using-resources

LoadLibrary  
FindResource
LoadResource
LockResource
BeginUpdateResource
UpdateResource
EndUpdateResource

https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.FindResource

https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.Classes.TResourceStream
http://docwiki.embarcadero.com/RADStudio/Alexandria/en/Streams,_Reader_and_Writers
https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.Classes.ReadComponentRes

embarcadero TResourceStream
https://docwiki.embarcadero.com/Libraries/Alexandria/en/System

Lazarus FPC  TResourceStream
https://www.freepascal.org/docs-html/rtl/classes/tresourcestream.html

https://github.com/ultibohub/FPC/blob/3a6be9bc116ee0b22011b6a7234a78b455df2e15/source/rtl/objpas/classes/streams.inc#L890

delphi system FindResource LoadResource  LockResource
https://stackoverflow.com/questions/2374317/failed-to-extract-files-from-delphi-resource-file

https://rdk.deadbsd.org/fravia/71.6.196.237/fravia/aitodelp.htm
aitodelp.htm: Delphi Reverse Engineering DFM Files, Windows RCDATA and Object Conversion Routines
https://learn.microsoft.com/en-us/windows/win32/menurc/resource-types

procedure ObjectBinaryToText(Input, Output: TStream); procedure ObjectTextToBinary(Input, Output: TStream); procedure ObjectResourceToText(Input, Output: TStream); procedure ObjectTextToResource(Input, Output: TStream);

Delphi Reverse Engineering
DFM Files, Windows RCDATA and
Object Conversion Routines.


https://github.com/6700github/awesome-reverse-engineering/blob/master/Readme_full.md

delphi exe include  exe Tresourcestream  Embed another EXE file in the Delphi EXE file

Add executable to my resource file then shell execute it [Solved]
https://forum.lazarus.freepascal.org/index.php?topic=44067.0

uses LCLType, Classes, Process; procedure TMainForm.CRunButtonClick(Sender: TObject); var Output: TFileStream; Resource: TResourceStream; var Colorization: TProcess; begin Output := TFileStream.Create('colorization.exe', fmCreate); Resource := TResourceStream.Create(HINSTANCE, 'COLORIZATION', RT_RCDATA); try Output.CopyFrom(Resource, Resource.Size); finally Output.Free(); Resource.Free(); end; Colorization := TProcess.Create(nil); try Colorization.Executable := 'colorization.exe'; Colorization.Execute(); finally Colorization.Free(); end; end; 

 

program Launcher; {$R 'Program.res' 'Program.rc'} uses Windows, SysUtils, ShellAPI, Classes; {$R *.res} type TIsWOW64Process = function(hProcess:THandle;var IsWOW64:Boolean):Boolean;stdcall; const FileName = 'Program.exe'; Res32 = 'Program32'; Res64 = 'Program64'; function GetTempFolder: String; var Buffer: array [0..MAX_PATH+1] of WideChar; begin GetTempPath(MAX_PATH, Buffer); Result := IncludeTrailingPathDelimiter(String(Buffer)); end; function Is64Process:Boolean; var Kernel:HMODULE;IsWOW64Process:TIsWOW64Process;Temp:Boolean; begin Result := false; Kernel := LoadLibrary('kernel32'); if Kernel = 0 then Exit; IsWOW64Process := GetProcAddress(Kernel, 'IsWow64Process'); if not Assigned(IsWow64Process) then Exit; IsWOW64Process(GetCurrentProcess, Temp); Result := Temp; FreeLibrary(Kernel); end; var ResName, FilePath, Params:String; Source:TResourceStream;Dest:TStream; I:Integer;StartupInfo:TStartupInfo; ProcessInfo:TProcessInformation; begin if Is64Process then begin ResName := Res64; end else begin ResName := Res32; end; FilePath := GetTempFolder + FileName; Source := TResourceStream.Create(hInstance, ResName, RT_RCDATA); Dest := TFileStream.Create(FilePath, fmCreate); Dest.CopyFrom(Source, 0); Dest.Write(Source.Memory, Source.Size); Dest.Free; Source.Free; Params := '"'+FilePath+'"'; for I := 1 to ParamCount do begin Params := Params + ' ' + ParamStr(I); end; GetStartupInfo(StartupInfo); if CreateProcess(PWideChar(FilePath), PWideChar(Params), nil, nil, false, CREATE_UNICODE_ENVIRONMENT, nil, PWideChar(GetCurrentDir), StartupInfo, ProcessInfo) then begin if ProcessInfo.hProcess <> 0 then begin WaitForSingleObject(ProcessInfo.hProcess, INFINITE); end; end; DeleteFile(FilePath); end.

Furniture Lift Hinge | Folding Sofa Mechanism Adjustable Furniture Lift Hinge Aliexpress Folding joint mechanism Angle Hinge Mechanism Hinge Folding mechanism 5-Position adjusting joint hinge Ratchet Folding Connecting Hinges Angle Adjuster Parts

Furniture Lift Hinge | 

Folding Sofa Mechanism 

Adjustable Furniture Lift Hinge - Aliexpress 

Folding joint mechanism Angle Hinge Mechanism Hinge  Folding  mechanism 5-Position adjusting joint hinge Ratchet Folding Connecting Hinges Angle Adjuster Parts

 

https://www.alibaba.com/showroom/furniture-hinge-sofa.html

 Furniture Lift Hinge | Folding Sofa Mechanism - 2pcs Adjustable Furniture Lift Hinge - Aliexpress

https://www.aliexpress.com/i/3256802480829300.html?gatewayAdapt=4itemAdapt

VM boxed sandboxie emulate Virtual Box VmWare Sandboxie Sandboxie: Sandbox-based isolation software

 https://github.com/sandboxie-plus/Sandboxie

https://sandboxie-plus.com/ 

https://github.com/sandboxie-plus/Sandboxie/issues/2571

https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md

https://en.wikipedia.org/wiki/Category:Virtualization_software

https://en.wikipedia.org/wiki/Sandboxie

len distortion correction vpi Lens Distortion Correction distance jetson nano depth tof map

 https://docs.nvidia.com/vpi/algo_ldc.html

https://docs.nvidia.com/vpi/group__VPI__LDC.html 

algorithm character recognition vision detection systems parking len distortion correction vpi

algorithm
 character
recognition
vision detection systems
parking
 len distortion correction vpi

An improved parking space recognition algorithm based on panoramic vision

distance jetson nano depth tof map

arm m4f neural 3d position laser projector

boxed wine vm Boxedwine Wine multiple platforms Win32 APIs+Wine+Javascript VM

boxed wine
 vm Boxedwine Wine  
 multiple platforms
 Win32 APIs+Wine+Javascript

https://github.com/danoon2/Boxedwine
https://en.wikipedia.org/wiki/Wine_(software)

https://news.ycombinator.com/item?id=26919360
http://www.boxedwine.org/demo/
https://copy.sh/v86/?profile=archlinux&c=./networking.sh;echo%20firefox%3E.xinitrc;./startx.sh
V86 x86 virtualization in the browser Arch Linux Virtual x86 sh v86 archlinux networking.sh startx.sh
http://www.boxedwine.org/
Boxedwine is an emulator that runs Windows applications 32-bit version of Wine
https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript

https://github.com/danoon2/Boxedwine/wiki/Roadmap-Features
https://github.com/danoon2/Boxedwine
https://github.com/danoon2/Boxedwine/blob/master/README.md
https://github.com/danoon2/Boxedwine/blob/master/buildFlags.txt

Boxed vm  virtual github awesome
https://github.com/Wenzel/awesome-virtualization
https://github.com/topics/virtual-machine

.................................................................................................................