Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to trap COM instantiation
Message
From
31/07/2003 13:54:18
 
 
To
31/07/2003 13:45:49
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00815490
Message ID:
00815527
Views:
8
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform