Code Monkey home page Code Monkey logo

gpdelphiunits's People

Contributors

arvur avatar gabr42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gpdelphiunits's Issues

GpCommanLineParser sometimes gives "EListError"

I am trying to reproduce this issue but I can't.
I think I am doing something wrong but I am missing what (clearly...).

This is my TCommandLine class:

   TCommandLine = class
   public
      [CLPName('silent'), CLPDescription('Service installation silent', '<silent>')]
      property silent: Boolean read Fsilent write Fsilent;
      [CLPName('install'), CLPDescription('Service installation', '<install>')]
      property install: Boolean read Finstall write Finstall;
      [CLPName('uninstall'), CLPDescription('Service installation', '<uninstall>')]
      property uninstall: Boolean read FUninstall write FUninstall;
      [CLPName('gui'), CLPDescription('IW gui FrontieraMode', '<gui>')]
      property gui: Boolean read Fgui write Fgui;
      [CLPName('c'), CLPLongName('cfg'), CLPDescription('Set the run configuration', '<runconfiguration>'), CLPDefault('0')]
      property ConfigNumber: Integer read FConfigNumber write FConfigNumber;
      [CLPName('cn'), CLPLongName('cfgname'), CLPDescription('Set the run configuration by service name', '<runconfiguration>'),
         CLPDefault('')]
      property ConfigName: string read FConfigName write FConfigName;
   end;

Nothing less, nothing more.

Sometimes with CommandLineParser.Parse(CommandLine) The error is Duplicates not allowed of type EListError.

The command line is simple: MyProg.exe /c:13.

I use Delphi 10.4.2 and last version of GpDelphiUtils.

GpCommandLineParser.pas Delphi XE 1 compatibily

GpCommandLineParser.pas isn't compatible with Delphi XE 1

I need to define unit aliases like :

System.SysUtils=SysUtils
System.StrUtils=StrUtils
System.Classes=Classes
System.Generics.Defaults=Generics.Defaults
System.Generics.Collections=Generics.Collections

And TIStringComparer interface doesn't exist

DSiWin32 DSiGetShortcutInfo

Would it be possible to make this function compatible with Unicode Delphi version:

OleCheck(CoCreateInstance(CLSID_ShellLink, nil, CLSCTX_SERVER, IID_IShellLinkW, shellLink));

instead of

OleCheck(CoCreateInstance(CLSID_ShellLink, nil, CLSCTX_SERVER, IID_IShellLinkA, shellLink));

Same for DSiCreateShortcut and DSiEditShortcut

Thank you,
Pascal

DsiWin32 AffinityMask functions should use DWORD_PTR

From : https://code.google.com/p/omnithreadlibrary/issues/detail?id=79

What steps will reproduce the problem?

  1. On systems with more than 32 logical processors, OmniThread library doesn't start because of range check errors in AffinityMask functions

What is the expected output? What do you see instead?

DwiWin32's wrappers for AffinityMask functions should be upgraded to the actual Win32 API (using DWORD_PTR instead of DWORD).
Also, DSiCPUIDs should be extended to support 64 processors.
Also, loops reading DSiCPUIDs should use High(DSiCPUIDs) instead of 32 (or 64)

What version of the product are you using? On what operating system?
Most recent code. Host with 32 processors.

Please provide any additional information below.
Note, this happens on 64 bit using XE2, but probably also applies to all other supported compiler versions, and might even fail on 32 bit Windows OSes (although it's highly unlikely those support more than 32 processors).

X64-Bug in TGpHugeFile

In Unit GpHugeF.pas

the method OffsetPtr calculate a address in DWORD. This will fail in x64 and 
high pointers.

Suggestion is ...

function OffsetPtr(ptr: pointer; offset: DWORD): pointer;
begin
//BUG  Result := pointer(DWORD(ptr)+offset);
  Result := pointer(NativeUInt(ptr)+offset);
end; { OffsetPtr }

Original issue reported on code.google.com by [email protected] on 25 Mar 2015 at 8:48

Compiling error on DSiWin32 on D2009 (NonClientMetrics.SizeOf)

What steps will reproduce the problem?
1. Compile DSiWin32 with D2009

What is the expected output? What do you see instead?
C:\Dev\Delphi\Lib\OmniThreadLibrary\src\DSiWin32.pas(6396,53): error E2003: 
E2003 Undeclared identifier: 'SizeOf'

What version of the product are you using? On what operating system?
DSiWin32 1.72

Please provide any additional information below.

Construction "NonClientMetrics.SizeOf" supported since D2010, need change 
{$IFDEF Unicode}TNonClientMetrics.SizeOf{$ELSE}SizeOf(TNonClientMetrics){$ENDIF}
to
{$IF CompilerVersion < 
21.0}SizeOf(TNonClientMetrics){$ELSE}TNonClientMetrics.SizeOf{$IFEND}

Original issue reported on code.google.com by [email protected] on 10 Sep 2013 at 1:16

GpCommandlineParser: Values with spaces

If I had a commandline parameter like /folder:"C:\folder\with spaces" GpCommandlineParser has a issue. The right value of this parameter was "C:\folder\with spaces" (of course without quotes) but GpCommandlineParser identify this as 2 values.

One is
"C:\folder\with
and the other is
spaces"

Both is wrong. Please fix this issue. Thanks.

X64-Question in TGpHugeFile: BufOffs maybe too short

In Unit GpHugeF.pas

the class (and some functions) use a Buffer-Offset. But this offset is defined 
as DWORD. 
Is there any possibility in X64 and very large files (I have >3GB-Files), that 
the BufOffset is too small?

  TGpHugeFile = class
  private
    hfAsynchronous     : boolean;
    hfBlockSize        : DWORD;
    (...)
    hfBufFilePos       : HugeInt; //cached FilePos (according the current hfBufOffs)
    hfBufOffs          : DWORD;   //current position inside the buffer


Suggestion:
   hfBufOffs          : HugeInt;


Original issue reported on code.google.com by [email protected] on 25 Mar 2015 at 8:58

Bug in TDSiRegistry.WriteBinary on Delphi 2009 or higher

What steps will reproduce the problem?

Compile and run this code:

{$APPTYPE CONSOLE}
uses
  Windows, SysUtils, DSiWin32;
var
  S, S1: string;
  DSiReg: TDSiRegistry;

begin
  DSiReg := TDSiRegistry.Create;
  S := '0123456789';
  DSiReg.RootKey:=HKEY_CURRENT_USER;

  if DSiReg.OpenKey('Software\_Test', True) then
    DSiReg.WriteBinary('TESTKEY', S);

  S1 := DSiReg.ReadBinary('TESTKEY', '123');
  WriteLn(S1);
  FreeAndNil(DSiReg);
end.

What is the expected output? 
  0123456789
What do you see instead?
  01234

What version of the product are you using? On what operating system?
  Windows7 x32, Delphi 2009 or higher, DSiWin32 1.59b

Please provide any additional information below.

Fix:
Change line #1972 to
WriteBinaryData(name, pointer(data)^, Length(data)*SizeOf(data[1]));

Original issue reported on code.google.com by [email protected] on 5 Dec 2010 at 10:21

Doesn't not support D7 (Not promised, I know...=

What steps will reproduce the problem?
1. Copile GpStringHash with D7

What is the expected output? What do you see instead?

Will not compile

What version of the product are you using? On what operating system?

Latest from SVN

Please provide any additional information below.

See "patch" from attachments, get it to compile is pretty trivial) DSiWin32.pas 
I had to revert to the 1.55 version.

There should be some other enumerator implementation for Early Delphi versions, 
I could implement, if you just could give any info how you would implement it 
(so no need to send patch that you'll ever merge :) )

-Tommi Prami-

Original issue reported on code.google.com by [email protected] on 30 Jun 2010 at 2:43

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.