-
Flash and .NET Framework
Hello!
I'm developing an application (in C#) that displays some Flash animations that other developers produce. I got everything working fine. I got stuck when I wanted to give my assembly a "Strong Name". The problem is in a flash dll, which has no Strong Name. (If one assembly has strong name then all of the components also must have strong names).
I have tried late binding (seeming most reasonable and an easy way to go), but got stuck. I load flash dll into an assembly, and can get all of the methods, but when I try to call any it gives me an error stating "Cannot call method MethodName at this time. ".
(It seems that flash dll is some kind of activeX component but when I try to create a class in C++ through VS wizard, the wizard said it's not.)
Any help will be appreciated!
-
Have you tried creating a strong named interop assembly for this component?
How to create a Primary Interop Assembly (PIA)
Paul
~~~~
Microsoft MVP (Visual Basic)
-
Yes! I have tried that and the result is:
TlbImp error: The input file 'AxInterop.ShockwaveFlashObjects.dll' is not a valid type library
Which means it's not an COM object. When I open the dll in Object Browser I can see all the methods, and as I described in a previous post, can't call them...
Any other suggestion?
Thanx!
-
Is ShockwaveFlashObjects.dll the actual filename? I don't appear to have it on my machine so I'm kind of working blind here. It's possible that the reference actually points to an external type library file and not the executable.
Paul
~~~~
Microsoft MVP (Visual Basic)
-
I "Add reference..." through VS, select
Shockwave Flash, TypeLib ver 1.0, path: C:\win\system32\macromedia\flash\flash.ocx
and then the following two files appear in project folder:
AxInterop.ShockwaveFlashObjects.dll
Interop.ShockwaveFlashObjects.dll
And in Object Browser when I click on AxInterop file I see the methods I want, so I presumed they are in AxInterop...
I get the names of the methods, and can display them. But I cant call them, alway getting an exception.
Is it at all a good way I'm going? Is it possible to "Strong Name" somebody else's assembly?
Thnx for your trouble, I know I'm probably souding as not knowing or understanding anything, but I have never done things like this!
-
Thank you, pclament!!
You got me on the right track!
After all that reading I've done today, I have been able to do what I wanted.
I used AxImp tool and got "wrapper" class for that Flash component which, I think, I will be able to StrongName and use!!
One of the problem is that I'm now working on someone elses project and don't have access to that person so I have to do much guess work... anyway, thank you! very much.
-
The files you mention are the interop files not the COM component file. You run TlbImp on the COM component file which in this case is Flash.ocx.
I tried TlbImp with Flash.ocx, with a key pair file I created and a bogus DLL as the output. It didn't use the file I specified but imported the library into strong-named version of ShockwaveFlashObjects.dll.
I haven't tried using AxImp but that may work as well.
Paul
~~~~
Microsoft MVP (Visual Basic)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks