Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: Advice for ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 10 Topic 3843 of 3940
Post > Topic >>

Re: Advice for Skybuck project.

by spam2you <spam2you@[EMAIL PROTECTED] > Jul 20, 2008 at 12:35 PM

Advice for Skystuck: stop giving adive...

AHAHAHAHAHAHHEIEHEHEIEHEIEHEIEHEIHHIHhihihihihihiehieheheheheheiheihe
WOEHAHAHAHAHAHAhahhahahahihihihihihihheheheheheheheihiahihahahiahiah





Skybuck Flying schreef:
> 1. Do not use exceptions to indicate failures of load library for
dynamic 
> linking of routines.
> 2. Do not use exceptions to indicate failures of get proc address for 
> dynamic linking of routines.
> 
> Also:
> 
> 3. Do not rely on the compiler to initialize the pointers to nil.
> 
> Bad usage example:
> 
> try
>     NewRoutine( ... );
> except
>     on WackyJWAExceptionCrapWhichIsIrrelevantForWinAPI do
>     begin
>         try
>             OldRoutine( ... );
>         except
>             // More crap goes here.
>         end;
> 
>     end;
> end;
> 
> ^^^ Generated instructions overhead is quite large = slow.
> 
> Instead:
> 
> 3. Initialize the pointers to nil explicitly via code.
> 2. Pointers will remain nil if get proc address failed.
> 1. Library pointer will remain nil if load library failed (?).
> 
> Better usage example:
> 
> if Assigned(NewRoutine) then
> begin
>     NewRoutine( ... );
> end else
> begin
>     if Assigned(OldRoutine) then
>     begin
>         OldRoutine( ... );
>     end;
> end;
> 
> ^^^ Nice and sleak, low overhead.
> 
> Finally if user really wants to know if a certain library was loaded 
> possible use the library handle:
> 
> If Assigned(SomeLibraryHandle) then
> begin
>     // writeln library was loaded
> end;
> 
> If dynamic link off then maybe set this too:
> 
> SomeLibraryHandle := -1; to indicate it was loaded.
> 
> Bye,
>   Skybuck. 
> 
>
 




 10 Posts in Topic:
Advice for jedi project.
"Skybuck Flying"  2008-07-20 07:24:46 
Re: Advice for jedi project.
"Skybuck Flying"  2008-07-20 07:26:33 
Re: Advice for jedi project.
"Skybuck Flying"  2008-07-20 07:27:53 
Re: Advice for jedi project.
"Skybuck Flying"  2008-07-20 07:29:58 
Re: Advice for jedi project.
"Kevin Urben" &  2008-07-20 09:56:50 
Re: Advice for jedi project.
"Skybuck Flying"  2008-07-20 16:03:42 
Re: Advice for jedi project.
spam2you <spam2you@[EM  2008-07-20 18:17:23 
Re: Advice for jedi project.
"Kevin Urben" &  2008-07-20 18:11:22 
Re: Advice for jedi project.
"Skybuck Flying"  2008-07-21 04:41:50 
Re: Advice for Skybuck project.
spam2you <spam2you@[EM  2008-07-20 12:35:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:56:18 CDT 2008.