Jump to content

limelect

Members
  • Content Count

    775
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by limelect


  1. I cannot communicate with my SSL site

    I cannot communicate to any HTTPS://

    What am I doing wrong?

     

    function GetUpDate(Link: string): string;
    var
      S: string;
      IdHTTP: TIdHTTP;
      SSL: TIdSSLIOHandlerSocketOpenSSL;

     

    begin
      IdHTTP := TIdHTTP.Create(form1);
      try
        SSL := TIdSSLIOHandlerSocketOpenSSL.Create(IdHTTP);
        with SSL.SSLOptions do
        begin
          Method := sslvTLSv1_1;  <<<< I tried them all
          Mode := sslmBoth;
          SSLVersions := [sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1, sslvTLSv1_1,
            sslvTLSv1_2];

         end;
          IdHTTP.IO.Handler := SSL;
         //    S := IdHTTP.Get(Link);
          S := IdHTTP.Get('https://limelect.com/UpDate/document-projects.txt');

          result := S;
      except
        result := '';
        ShowMessage('Could not get VERSION information from the INTERNET');
      end;
      IdHTTP.Free;
      SSL.Free;
    end;

     

    I do not want to use any DLL plz.
     

    Screenshot - 30_01_2024 , 10_14_07.jpg


  2. Sorry guys to bother

    .I came to a conclusion that it is Embarcadero's problem or mine.

    as it is in __init__.py

          if 'DelphiVCL' in fname:
            return os.path.join(sdir, os.path.basename(fname))
        raise ValueError("DelphiVCL module not found. Try to reinstall the delphivcl package.")
    
    why ? i do not know. so I hop one of thos Delphi guys will see this

    All the package portions are there and in GUIPY it finds it

    but not as an execution.

    I single step to see this.

    Thanks


  3. I wonder if someone can help.

    I made this Python to EXE with Delphi

    https://limelect.com/downloads/python-2-execute/

    It works BUT

    when I use it on Delphi Py the first line does not find it.

     

    from delphifmx import *
    from parent_window import Parent_Form

    def main():

     

    Running this script on GUIPY with no problem

    The  line I am using is

    pyinstaller.exe --windowed D4P_export_demo.py --onefile --paths=C:\Users\LimElect\anaconda3\Lib\site-packages\delphifmx --name D4P_export_demo 

    I have tried all combinations and could not find something.

    -paths=C:\Users\LimElect\anaconda3\Lib\site-packages\delphifmx

    is the path to the library. But GUIPY finds it with no problem

     

    P.S. I have asked this question on the Python platform with no answer.

    StackOverflow rejected my question I do not understand why

     so you are left.

    One more thing pip list shows the package

     

    Screenshot - 13_12_2023 , 11_41_14.jpg

  4. dspack


    @FPiettea  Now i have compilation version problems

    I have to clean up things

    GDIPAPI was compiled with a different version of DirectDraw.IDirectDrawSurface7

    I am trying to find my DirectDraw.dcu that does the problem

  5. dspack


    @FPiette i Missed it but it also gives me an error

     

        Hr := MPC.GetOverlaySurfaceColorControls(Tmp);

    [dcc32 Error] DSPack.pas(3967): E2033 Types of actual and formal var parameters must be identical

    tmp is supposed to be TDDColorControl which is  Tmp        : TDDColorControl;

    I fixed 1 now I have another

         hr := FMediaEventEx.GetEvent(Event, Param1, Param2, 0);
    Now I have a different problem of compile ver

  6. dspack


    D10.2.3

    Does anyone have a link/source

    to DPACK component that compiles and used

    perfect on my Delphi

    All  the links I have have problems


  7. I found this project

    https://github.com/jpalbert/webcam-settings-dialog-windows

    I changed the bat to

    chcp 65001 > nul
    ffmpeg -f dshow -show_video_device_dialog true -i video="Integrated Camera"
    and it works

    however, doing the same with Delphi does not work

    as I have GetDosOutput that does not do the job

    Any idea how to do this with Delphi?

    GetDosOutput works when I read info from a program

    I tried to delete the repeat section

    Any other Dos reading?

     

    procedure TForm1.GetDosOutput(CommandLine: string);
    const
      ReadBuffer = 32768; // 32kb buffer

    var
      SA: TSecurityAttributes;
      SI: TStartupInfo;
      PI: TProcessInformation;
      StdOutPipeRead, StdOutPipeWrite: THandle;
      WasOK: Boolean;
      Buffer: array[0..ReadBuffer] of AnsiChar;
      BytesRead: Cardinal;
      Handle: Boolean;
      Apprunning: DWord;
      //  T: Ttime;
      TotalBytesRead,
        ExitCode: DWORD;

      BytesLeftThisMessage,
        TotalBytesAvail: integer;
      par_s: string;
    begin
      //  Result := '';
      Application.ProcessMessages;

      with SA do
      begin
        nLength := SizeOf(SA);
        bInheritHandle := True;
        lpSecurityDescriptor := nil;
      end;
      CreatePipe(StdOutPipeRead, StdOutPipeWrite, @SA, 0);
      try
        with SI do
        begin
          FillChar(SI, SizeOf(SI), 0);
          cb := SizeOf(SI);
          dwFlags := STARTF_USESHOWWINDOW or STARTF_USESTDHANDLES;
          wShowWindow := SW_HIDE;
          hStdInput := GetStdHandle(STD_INPUT_HANDLE);
          // StdOutPipeRead; don't redirect stdin
          hStdOutput := StdOutPipeWrite;
          hStdError := StdOutPipeWrite;
        end;
        try
          UniqueString(CommandLine);
          Handle := CreateProcess(nil,
            PChar(CommandLine),
            @SA,
            @SA,
            true,
            (CREATE_NEW_CONSOLE) or (REALTIME_PRIORITY_CLASS),
            //   NORMAL_PRIORITY_CLASS,
            nil,
            //    PChar(WorkDir),
            nil,
            sI,
            PI);
        except
        end;
        CloseHandle(StdOutPipeWrite);
             begin
          repeat
            Apprunning := WaitForSingleObject(PI.hProcess, 100);
            Application.ProcessMessages;
          until (Apprunning <> WAIT_TIMEOUT) { or (stop2)};
          repeat
            if PeekNamedPipe(StdOutPipeRead, @Buffer[0], ReadBuffer, @BytesRead,
              @TotalBytesAvail, @BytesLeftThisMessage) then
              if BytesRead > 0 then
              begin
                //      ReadFile(ReadPipe,Buffer[0], ReadBuffer,BytesRead,nil) ;
                WasOK := ReadFile(StdOutPipeRead, Buffer[0], BytesRead, BytesRead,
                  nil);
                if BytesRead > 0 then
                begin

                  Buffer[BytesRead] := #0;
                  OemToAnsi(Buffer, Buffer);
                  par_s := StrPas(Buffer);
                  if par_s <> '' then
                    Memo1.Lines.Add(par_s);
                end;
              end;
          until (BytesRead > 0) {or (stop2)}; // < ReadBuffer) ;

        end;
      finally
        // stop2 := false;
        CloseHandle(PI.hThread);
        CloseHandle(PI.hProcess);
        CloseHandle(StdOutPipeRead);
        //    GoToFirstLine;
      end;

    end;
     

     

×