Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interop.Shell32 issue
Message
From
21/07/2010 01:25:32
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01473054
Message ID:
01473266
Views:
36
When I removed the file Interop.Shell32.dll from the project, removed it from the reference and added it back, the designer reported that the class couldn't be embedded. When I searched on that, I found that under .NET Framework 4.0, we cannot use a Class reference when we define the object but the name of the interface. So, only interface types can be embedded.

So, I adjust the code to this for the declaration of loShell:
        ' Zip a file
        Public Function Zip() As Boolean
            Dim lcFile As String = ""
            Dim llSuccess As Boolean = False
            Dim lnReturn As Double = 0
            Dim loByte(21) As Byte
            Dim loObject As Object
            Dim loDestinationFolder As Shell32.Folder
            Dim loFile As Shell32.FolderItem
            Dim loProcess As Framework.ProcessFile = New Framework.ProcessFile(oApp)
            Dim loShell As Shell32.Shell = New Shell32.Shell
            Dim loSourceFolder As Shell32.Folder
The loShell line before was:
            Dim loShellClass As Shell32.ShellClass = New Shell32.ShellClass
This has resolved the issue.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform