The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,308 other followers

Delphi: mapping of COM/Windows exceptions to Delphi Exceptions and run-time errors

Posted by Jeroen Pluimers on 2014/07/30

Every time

---------------------------
Debugger Exception Notification
---------------------------
Project Some.exe raised exception class $C0000005 with message 'access violation at 0x00537b14: read of address 0x00000000'.
---------------------------
Break   Continue   Help
---------------------------

'Exception "EAccessViolation" with message "Access violation at address 00537B30 in module ''TestWordInterface.exe''. Read of address 00000000" at address 00537B30'

---------------------------
Testwordinterface
---------------------------
Access violation at address 00537B14 in module 'Some.exe'. Read of address 00000000.
---------------------------
OK
---------------------------

In system.pas:

{$IFDEF STACK_BASED_EXCEPTIONS}
procedure       MapToRunError(P: PExceptionRecord); stdcall;
const
  STATUS_ACCESS_VIOLATION         = $C0000005;
  STATUS_ARRAY_BOUNDS_EXCEEDED    = $C000008C;
  STATUS_FLOAT_DENORMAL_OPERAND   = $C000008D;
  STATUS_FLOAT_DIVIDE_BY_ZERO     = $C000008E;
  STATUS_FLOAT_INEXACT_RESULT     = $C000008F;
  STATUS_FLOAT_INVALID_OPERATION  = $C0000090;
  STATUS_FLOAT_OVERFLOW           = $C0000091;
  STATUS_FLOAT_STACK_CHECK        = $C0000092;
  STATUS_FLOAT_UNDERFLOW          = $C0000093;
  STATUS_INTEGER_DIVIDE_BY_ZERO   = $C0000094;
  STATUS_INTEGER_OVERFLOW         = $C0000095;
  STATUS_PRIVILEGED_INSTRUCTION   = $C0000096;
  STATUS_STACK_OVERFLOW           = $C00000FD;
  STATUS_CONTROL_C_EXIT           = $C000013A;
var
  ErrCode: Byte;
begin
  case P.ExceptionCode of
    STATUS_INTEGER_DIVIDE_BY_ZERO:  ErrCode := 200; { reDivByZero }
    STATUS_ARRAY_BOUNDS_EXCEEDED:   ErrCode := 201; { reRangeError }
    STATUS_FLOAT_OVERFLOW:          ErrCode := 205; { reOverflow }
    STATUS_FLOAT_INEXACT_RESULT,
    STATUS_FLOAT_INVALID_OPERATION,
    STATUS_FLOAT_STACK_CHECK:       ErrCode := 207; { reInvalidOp }
    STATUS_FLOAT_DIVIDE_BY_ZERO:    ErrCode := 200; { reZeroDivide }
    STATUS_INTEGER_OVERFLOW:        ErrCode := 215; { reIntOverflow}
    STATUS_FLOAT_UNDERFLOW,
    STATUS_FLOAT_DENORMAL_OPERAND:  ErrCode := 206; { reUnderflow }
    STATUS_ACCESS_VIOLATION:        ErrCode := 216; { reAccessViolation }
    STATUS_PRIVILEGED_INSTRUCTION:  ErrCode := 218; { rePrivInstruction }
    STATUS_CONTROL_C_EXIT:          ErrCode := 217; { reControlBreak }
    STATUS_STACK_OVERFLOW:          ErrCode := 202; { reStackOverflow }
  else                              ErrCode := 255;
  end;
  RunErrorAt(ErrCode, P.ExceptionAddress);
end;

Posted in Uncategorized | Leave a Comment »

Delphi: workaround for when you loose many of the ModelMaker Code Explorer keyboard shortcuts

Posted by Jeroen Pluimers on 2014/07/29

ModelMaker Code Explorer (MMX for short) stores the keyboard shortcuts in the registry.

I’ve had it occur once that somehow most (about 95%) of the shortcuts got lost.

Two thinks I learned from resurrecting the shortcuts:

  • MMX writes these settings when you exit Delphi
  • Only a few keys (with lots of values under them) store the keys.

To resurrect them,

  1. Exit Delphi
  2. Backup your registry
  3. Delete the registry keys mentioned below
  4. Start Delphi
  5. Exit Delphi

Summary of what was wrong

The values under these keys got emptied

[HKEY_CURRENT_USER\Software\ModelMaker\MideX\10.0\Explorer\ContentsShortcutsEx]
[HKEY_CURRENT_USER\Software\ModelMaker\MideX\10.0\Explorer\DetailsShortcutsEx]
[HKEY_CURRENT_USER\Software\ModelMaker\MideX\10.0\Explorer\MainShortcutsEx]

Some of values under this keywere removed, but not all of them

[HKEY_CURRENT_USER\Software\ModelMaker\MideX\10.0\KeyBindingsEx\BDS 9]

The values under this key were OK

[HKEY_CURRENT_USER\Software\ModelMaker\MideX\10.0\Explorer\DocShortcutsEx]

–jeroen

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | Leave a Comment »

Linux: no more correct license file for AntiVir

Posted by Jeroen Pluimers on 2014/07/28

A short while ago, I wrote about Linux: getting the correct license file for AntiVir.

Too bad that I recently read about the Discontinuation of Antivirus solutions for Linux systems on June 30th 2016.

This means the hbedv.key cannot be downloaded any more.

–jeroen

Posted in *nix, Power User | Leave a Comment »

Pin layouts of hardware

Posted by Jeroen Pluimers on 2014/07/28

This is yet another post of some information I wish I had known years ago.

AllPinouts: a site that lists pin layouts of common and not so common hardware.

When writing this, the site had Statistics indicating over 3500 pages and close to 1000 pin layouts.

Layouts include cables and connectors for audio, video, computing and much much more.

These were the pin layouts I needed:

I found the 3 and 4 pin layouts also on this page: Desktop Boards — 3-wire and 4-wire fan connectors.

Another site with lots of Power Connectors is Toms Hardware. A good starting page is Additional Power Connectors: Peripheral, Floppy, And SATA – Power Supply 101: A Reference Of Specifications.

The reason I needed it was to add a front case fan to a couple of HP XW6600 workstations in order to improve cooling.

Both 80mm and 92mm fans will fit.

A couple of links:

–jeroen

Posted in Hardware, Power User | Leave a Comment »

Mac/PC: sending Wake-on-LAN (WOL) packets

Posted by Jeroen Pluimers on 2014/07/25

I’ve succesfully woken up these machines:

  • HP XW6600 running ESXi 5.1
  • ThinkPad W701U running Windows 7

I still need to try to wake up a Mac Mini Server running OS X 10.6 (Snow Leopard).

MacBook Air on 10.7 (Lion) and Retina on 10.8 (Mountain Lion) won’t work as they are WiFi only, and WOL does not work over WiFi.

On 10.7 and up it might not work on a Mac Mini Server either, as Apple Introduced Dark Wake.

I used these tools to send WOL packets: Read the rest of this entry »

Posted in *nix, Apple, ESXi5.1, OS X, OS X Lion, OS X Mountain Lion, OS X Snow Leopard, Power User, VMware, VMware ESXi, Windows, Windows 7 | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 1,308 other followers

%d bloggers like this: