Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap COM instantiation
Message
De
31/07/2003 13:54:18
 
 
À
31/07/2003 13:45:49
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00815490
Message ID:
00815527
Vues:
10
Try/Catch changes the scope, so you did not see the object outside it. Do this way:
>
>XceedZipLib.XceedZipClass loZipper;
>try
>{
>    loZipper = new XceedZipLib.XceedZipClass();
>}
>catch
>{
>    MessageBox.Show("Please check to make sure you have the Xceed Zip Compression Library installed",
>		"Error: Missing Required Files", MessageBoxButtons.OK, MessageBoxIcon.Stop);
>
>    return false;
>}
>
>loZipper.PreservePaths = false;
>loZipper.FilesToProcess = ...
>


Hi Plamen,

Ok, when I do that I get the following:

A local variable named 'loZipper' cannot be declared in this scope because it would give a different meaning to 'loZipper', which is already used in a 'parent or current' scope to denote something else.

Yes, both declarations are of the same type, so it works. However, it's curious why there doesn't seem to be a "clean" way to do this.


- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform