The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Delphi 10.2 Tokyo: they did not fix the broken documentation tab in 10.2.2 2004, but it is an “easy” fix to do yourself

Posted by jpluimers on 2018/06/06

Since the fix is on the forums server (singular!) and that one tends to be squirrel driven lately, here it is in full via [WayBack] I see they didn’t fix the broken documentation tab in 10.2.2 2004 (professional). It’s not a show stopper but a nuisance to fix oneself. And for new dev… – Herbert Sauro – Google+ and [WayBack] I have installed Delphi 10.2.2 and the Documentation tab is all stuffed up ( see picture ). I know there is a html template page for the welcome tab, bu… – Tony Danby – Google+

In C:\Program Files (x86)\Embarcadero\Studio\19.0\Welcomepage\en

Edit Documentation.htm and insert the one piece about the innerWidth

function setFrameURL(url)
        {
            if(url){
                document.getElementById('load_html').src = url
                $("#load_html").css("display", "block");
                var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;         
                $("#load_html").css("height",(height)+"px");    
                var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;         
                $("#load_html").css("width",(width)+"px");  

It works and takes up the entire page after you restart the IDE.

If it gets up: https://forums.embarcadero.com/thread.jspa?threadID=271798

–jeroen

 

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | Leave a Comment »

GitHub – oldcompcz/SpaceAssault: DOS space shooter in ASCII.

Posted by jpluimers on 2018/06/05

Cool [WayBackGitHub – oldcompcz/SpaceAssault: DOS space shooter in ASCII. written in pure C using Turbo C.

You can likely compile this using this:

[WayBack] Turbo C++ or C for Windows 7, 8, 8.1 and 10 32/64-bit Full Screen Free Download – CodePlex Archive

The download is actually a small Windows wrapper around Turbo C++ 3.2: github.com/vineetchoudhary/turbocpp/releases.

Via: [WayBack] Space Assault Game The complete source code of very nice ascii-art invaders is now at GitHub. This game of Roman Hocke won second place in the High-Voltage 2017 competition… – Jaroslav Beran – Google+

–jeroen

Posted in C, Development, History, MS-DOS, Software Development | Leave a Comment »

Delphi versions that can convert .bpg to .groupproj files

Posted by jpluimers on 2018/06/05

Reminder to self: extend the below very incomplete list of Delphi versions that can open a Borland Project Group file with extension .bpg (from the Delphi <= 7 era) and convert it to an XML based Group Project file with extension .grouproj (from the Delphi >= 2007 era).

  • Delphi 2007

Notes:

The .bpg file is actually a makefile, see for instance [WayBackbuild – How to compile a Delphi 7 project group file (.bpg) using the command line? – Stack Overflow

Delphi 2006 and 2005 use .bdsgroup files:

The .bdsgroup files are not compatible with .groupproj files in Delphi 2007 and up: [WayBackdelphi – How to convert a D2009 .groupproj file to a D2006 .bdsgroup file? – Stack Overflow.

A .grouproj file is basically an msbuild 2013 subset, see the below links for more info:

I needed this so I could make this conversion:

–jeroen

PS: Searching for the .groupproj links also got me this: [WayBackParallel compilation of delphi projects through MSBuild – Stack Overflow

Posted in Delphi, Development, Software Development | Leave a Comment »

Field “id” not found, the The Turkish-İ/I/i/ı and case conversion and case folding – Update on the dasBlog Turkish-I bug and a reminder to me on Globalization – Scott Hanselman

Posted by jpluimers on 2018/06/05

Reminder to self: in Turkey, they have more than just the lowercase i and uppercase I. In fact these are the i characters you can get:

Note there are more non-US latin characters in Turkey, see the links below for some lists.

The Turkish case conversion is inside the same group of dotted. The English case conversion is from dotted lowercase i to dotless uppercase I as shown in [WayBackInternationalizing Turkish: Dotted and Dotless Turkish Letter “I”:

English vs. Turkish Case Mappings
Language Letter Lowercase
Map
Uppercase
Map
English i i I
Turkish dotted i i İ
Turkish dotless ı ı I

In general, this problem is called [WayBack] Case Folding and many environments do not have good and ready to use solutions for this.

In my case, I was getting Field "id" not found messages for all tables that had an ID field. The reason was that somewhere in the path from my code to the database, either a comparison or case conversion wasn’t taking into account the above mappings.

Though the underlying database indicates I shouldn’t in [WayBackDo I have to use UPPERCASE identifiers?, it appears that something in the path from my code via IBX to the Firebird 2.5 database has issues on Turkish machines. The good thing: Database WorkBench 5.x doesn’t have that issue for a regular query.

Usually databases are only cases sensitive with quoted identifiers, but not all are: [WayBackLorenzo Alberton – Articles – Database identifiers, quoting and case sensitivity

Read the rest of this entry »

Posted in Development, internatiolanization (i18n) and localization (l10), Software Development | Leave a Comment »

Chris Osbornes picture of (Almost) Every Wedge Computer he has Got : retrobattlestations

Posted by jpluimers on 2018/06/04

On reddit: [WayBackWedge Week(Almost) Every Wedge Computer I’ve Got (i.redd.it)

Via: [WayBack] My entry for #WedgeWeek on #RetroBattlestations. (Almost) every wedge computer I’ve got. No exact duplicates but a few are from the same series. Glad … – Chris Osborn – Google+ where I commended “Nice collection! I’ve used at least 10 or 12 of them in one way or the other (: Need to take a closer look when not on the road.”

So behind a normal machine instead of a smartphone, I think this is the list going from the top left in a counter clockwise and spiral order to the center:

  • I marked the ones I ever used (either at school, friends or university) with a star, and added some links later; mostly from Wikipedia/Wikimedia.

** I’m still not sure why, as there was a Dutch user group (see trs80.nl), but somehow no people in my “circles” me had one.

Original image is a [WayBack] highres 3211*1942 one and easier to see the model numbers (;

–jeroen

Read the rest of this entry »

Posted in History | Leave a Comment »

How to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

Posted by jpluimers on 2018/06/04

Interesting howto: [WayBackHow to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

via: [WayBack] Air conditioners’ remote control codes are a bit different from say your TV remote control, as they don’t just send one byte, but a bunch of bytes… – Jean-Luc Aufranc – Google+

–jeroen

Posted in *nix, Development, Hardware Development, Power User, Raspberry Pi | Leave a Comment »

stascorp/rdpwrap: RDP Wrapper Library – up to 15 RDP sessions on any Windows edition including basic/home/core

Posted by jpluimers on 2018/06/04

RDP Wrapper works as a layer between Service Control Manager and Terminal Services, so the original termsrv.dll file remains untouched. Also this method is very strong against Windows Update.

I’ve tested this on Windows 7 Home Premium and it works fine, see the log below. On Windows 10 Fall Creators Update and up, I had to get the rfxvmt.dll files (in %windir%\System32 and %windir%\SysWOW64) from a Windows Professional system, see Known Issues. You can download them from the repository as well.

  1. Download from github.com/stascorp/rdpwrap/releases
  2. Unzip
  3. Run the install.bat:
C:\Users\jeroenp\Downloads\RDPWrap-v1.6.1>install.bat
RDP Wrapper Library v1.6
Installer v2.3
Copyright (C) Stas'M Corp. 2016

[*] Notice to user:
  - By using all or any portion of this software, you are agreeing
  to be bound by all the terms and conditions of the license agreement.
  - To read the license agreement, run the installer with -l parameter.
  - If you do not agree to any terms of the license agreement,
  do not use the software.
[*] Installing...
[*] Terminal Services version: 6.1.7600.16385
[+] This version of Terminal Services is fully supported.
[+] TermService found (pid 1168).
[*] Shared services found: CryptSvc, Dnscache, LanmanWorkstation, NlaSvc
[*] Extracting files...
[+] Folder created: C:\Program Files\RDP Wrapper\
[*] Downloading latest INI file...
[+] Latest INI file -> C:\Program Files\RDP Wrapper\rdpwrap.ini
[+] Extracted rdpw64 -> C:\Program Files\RDP Wrapper\rdpwrap.dll
[+] Extracted rdpclip6164 -> C:\Windows\System32\rdpclip.exe
[*] Configuring service library...
[*] Checking dependencies...
[*] Checking CertPropSvc...
[*] Checking SessionEnv...
[*] Terminating service...
[*] Starting CryptSvc...
[*] Starting Dnscache...
[*] Starting LanmanWorkstation...
[*] Starting NlaSvc...
[-] StartService error (code 1056).
[*] Starting TermService...
[*] Configuring registry...
[*] Configuring firewall...
OK.

[+] Successfully installed.
______________________________________________________________

You can check RDP functionality with RDPCheck program.
Also you can configure advanced settings with RDPConf program.

Druk op een toets om door te gaan. . .

C:\Users\jeroenp\Downloads\RDPWrap-v1.6.1>rdpcheck

Note that this “error” is normal: [-] StartService error (code 1056). as it means the service is already started: [WayBackSystem Error Codes (1000-1299) (Windows)

ERROR_SERVICE_ALREADY_RUNNING

1056 (0x420)
An instance of the service is already running.

–jeroen

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

Thread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework […]”

Posted by jpluimers on 2018/06/01

Interesting [Archive.isThread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework […]”

It answers [Archive.is] Thread by @domenic: “Having been out of the scene for over 5 years now, I’m extraordinarily confused by what’s going on over in .NET land. Not only the “what”, b […]”

Dominic was confused by .NET Core going to support Windows desktop UI apps as platform specific packages to a a cross platform foundation as announced in [WayBack] .NET Core 3 and Support for Windows Desktop Applications | .NET Blog

Via: [WayBack] Miguel de Icaza on Twitter: “Good thread on the evolution of modern .NET by @shanselman… “

–jeroen

Posted in .NET, Development, Software Development | Leave a Comment »

Horace Dediu on Twitter: “Personal computing, the first 40 years.… “

Posted by jpluimers on 2018/06/01

[WayBackHorace Dediu on Twitter: “Personal computing, the first 40 years.… “

–jeroen

Read the rest of this entry »

Posted in History, Power User | Leave a Comment »

“Unknown function at TMethodImplementationIntercept”

Posted by jpluimers on 2018/06/01

Reminder to self: when you get Unknown function at TMethodImplementationIntercept in a Delphi stack trace from the Exception.StackTrace property or FastMM memory report:

  1. Ensure you generate a .MAP or .TDS file with full debug information
  2. Copy the .MAP or .TDS files to directory of your EXE.

Via:

The Exception.StackTrace was introduced in Delphi 2009 that extended these [WayBackException Members:

Some notes:

  • Fields where you can put hooks in; if there is no hook in place, they won’t be used:
    • [WayBackException.GetExceptionStackInfoProc Field GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
      • This function is called to return an opaque data structure that contains stack information for the given exception information record. This function will be called when the exception is about to be raised or if this is an external exception such as an Access Violation, called soon after the object is created.
    • [WayBackException.CleanUpStackInfoProc Field CleanUpStackInfoProc: procedure (Info: Pointer);
      • This function is called when the destructor is called to clean up any data associated with the given opaque data structure.
    • [WayBackException.GetStackInfoStringProc Field GetStackInfoStringProc: function (Info: Pointer): string;
      • This function is called to return a string representation of the opaque data structure returned by GetExceptionStackInfoProc

TMethodImplementationIntercept was introduced in the System.Rtti unit of Delphi XE6 [WayBack]:

–jeroen

Example code:


unit ExceptionHelperUnit;
interface
uses
System.SysUtils;
type
ExceptionHelper = class helper for Exception
public
function Describe: string;
class procedure RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
class function GetStackTrace: string;
end;
implementation
uses
System.RTLConsts,
System.SysConst;
type
EStackTraceException = class(Exception); // EProgrammerNotFound to make it really clear this is only to be used in very limited places ??
{ ExceptionHelper }
function ExceptionHelper.Describe: string;
var
lStackTrace: string;
begin
Result := inherited ToString();
if Self is EInOutError then
if Result = System.RTLConsts.SInvalidFileName then
Result := System.SysConst.SInvalidFileName;
if Assigned(StackInfo) then
lStackTrace := StackTrace
else
lStackTrace := 'empty';
Result := Format('Exception'#13#10'%s at $%p: %s'#13#10'with StackTrace'#13#10'%s', [ClassName, ExceptAddr, Result, lStackTrace]);
end;
class function ExceptionHelper.GetStackTrace: string;
begin
try
Result := 'Get StackTrace via Exception.';
raise EStackTraceException.Create(Result) at ReturnAddress;
except
on E: EStackTraceException do
Result := E.StackTrace;
end;
end;
class procedure ExceptionHelper.RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
begin
raise ENotImplemented.CreateFmt('Method %s.%s is not implemented.', [aClass.ClassName, aMethodName]);
end;
end.

Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »