Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
procedure TForm1.Button1Click(Sender: TObject); const DOTNETDLL = 'dnetTestDivideByZero'; DOTNETCOMTYPE = 'dnetTestDivideByZero.dnetTestDivideByZeroInterface'; var ADotNetObject: Variant; CW: Word; a, b: Double; begin CW:= Get8087CW; // Disable FPU exceptions Set8087CW( $133f ); try try ADotNetObject:= CreateOleObject( DOTNETCOMTYPE ); except on E: Exception do begin ShowMessage( 'Please register this dll by calling C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe dnetTestDivideByZero.dll.'+ ' This will register the dll for COM. You will notice that if you compile the vinlib.dll for .net 2.0 or 3.5 and regasm the dll, that the problem does not occur.' ); Exit; end; end; try ADotNetObject.DummyMethodThatDoesNothing; finally varClear( ADotNetObject ); end; finally Set8087CW( CW ); end; try b := 0; a := 1 / b; // wont throw a := 1 / b; // will throw...this is b/c of FPU design except on E: Exception do // never get here ShowMessage('This should be Divide by zero error. However, it goes uncaught b/c of stack overflow error when using .net 4.0. Failed with Error = '+ E.Message ); end; ShowMessage('Success') end;
|How to access the value of a hidden field in code behind using c#||14||51|
|VS2015, C#, where to place PDF file into resource so it release to include PDF and how to reference to them to open?||2||28|
|Obtaining values from inside a HTMLDocument||3||32|
|How would you interpret the record size in an example, for the first record for a file using C#?||4||25|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
24 Experts available now in Live!