Reg Free Com with VB6 on Windows 7
Reg Free Com with VB6 on Windows 7
I have some .NET code I use from VB6 code. I have always developed this on an XP machine by creating a VB6.exe.manifest file that listed the dependent .NET assemblies.
For example, say my 2 .NET assemblies are Some.Assembly.A.dll and Some.Assembly.B.dll, here is what VB6.EXE.manifest looks like (I use version=1.1.0.0 below because that is the version I set on the .NET AssemblyVersion in AssemblyInfo.cs):
Then, along with the DLLs in the same directory, I have the assemblies and their own manifest files. Here is an example "Some.Assembly.A.dll.manifest":
I also run tlbexp
on referenced DLLs to create TLB files, and this is what I reference in my VB6 project file.
I want to move to a Windows 7 64 BIT machine. Using the same methods, when I hit the VB6 code that instantiates the .NET object on the WIN7 machine I get
"ActiveX Component Can't Create Object."
On XP, it succeeds. If I purposely misspell the Dependent assembly in VB6.EXE.manifest - on XP I get
"This application has failed to start because teh application configuration is incorrect. Reinstalling the application may fix this problem."
On WIN7, VB6 just loads. It's like it ignores the manifest on WIN7, so I can't load my .NET object using REG FREE methods on WIN7. If I regasm
the DLL, everything works.
Any ideas on how to make VB6 work with reg free com on WIN7 (64 BIT)?
Answer by wqw for Reg Free Com with VB6 on Windows 7
You might try to use /win32 option of tlbexp
on an x64 OS.
Answer by Erno de Weerd for Reg Free Com with VB6 on Windows 7
From this blog post
you can use SxsTrace to help debug the problem. To start trace run ?SxsTrace Trace -logfile:SxsTrace.etl? to convert the log file to something you can view run ?SxsTrace Parse -logfile:SxsTrace.etl -outfile:SxsTrace.txt?.
Have you tried that?
An other thing is that on Vista/Windows 7 you can easily run into UAC did you check that?
Answer by Eugene Talagrand for Reg Free Com with VB6 on Windows 7
If you are recompiling vb6.exe or otherwise processing it for the win7 machine, you should know that some of the newer development tools automatically embed a manifest so you may want to check for that (a quick way is to open up the executable in VS, and look for a resource RT_MANIFEST with id 1). If there's an embedded manifest, external manifests are ignored, which is possibly why when you edit the external manfiest, nothing happens and its contents are ignored.
Besides what Erno said about sxstrace (could you post the results you get from sxstrace?), make sure to update the timestamp of VB6.exe if the manifest is embedded into it, or VB6.exe.manifest otherwise. Vista + Win7 cache the contents of manifests, keyed off the timestamp of the root manifest so your local edits might not be getting picked up. If sxstrace is giving you blank results, update the timestamps and try again.
Answer by user180326 for Reg Free Com with VB6 on Windows 7
The first thing that springs to mind is that it is worthwhile to try and sign the .net code. It may be that implicitly some higher level of security is applied on win7 64 bit that requires signed assembly references.
Furthermore you can try to narrow down the problem by (in no particular order)
- label the program to run as administrator and retry.
- label the program to run in "xp/win2k compatibilty mode"
- run it in dependencywalker (it has an option to simulate program load, and will log errors)
Good luck!
Answer by Jeremy Thompson for Reg Free Com with VB6 on Windows 7
I was doing this hybrid debugging the other day and got the error: ''ActiveX Component Can't Create Object.'' I suggest you follow this article Debugging Hybrid Visual Basic 6.0/Visual Basic .NET Applications and make sure a bare bones example works on your Win7 PC ( I reaalise it works with regasm). Then with the REG FREE bit, I researched the following links: .NET Object from VB6 without use of regasm.exe? and here Registration-Free Activation of .NET-Based Components: A Walkthrough
Answer by Simon Smeets for Reg Free Com with VB6 on Windows 7
Regasm does a lot more than just generate the TLB or needed registry keys.
For instance, it can generate COM visible interfaces, based on COM visible types. Regasm will do this when the COM visible type does not implement an interface for instance.
Do you have any COM visible types that do not implement an interface (or do not define the COM interface by using the ComDefaultInterfaceAttribute)?
If so, this may be your problem.
Answer by Dabblernl for Reg Free Com with VB6 on Windows 7
I have been able to succesfully use .Net classes from VB6 in Win 7-64 using manifests created by Side by Side Manifest Maker. It has a free trial.
Don't forget to include the .Net runtime version that your classes target. That may be your problem to begin with as Win 7 comes with .Net 4 Client Profile preinstalled only.
Answer by hillbilly for Reg Free Com with VB6 on Windows 7
Have you tried simply installing & running VB6 in WinXP compatability mode?
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72
0 comments:
Post a Comment