COM on Windows7 and Visual Studio - visual-studio

I registered a COM dll (under administrator) using regsvr32, which I want to use in Visual Studio 2008 (under administrator) for my project in Windows 7. Now, when I try to use the interfaces and classes from the COM, then I can't see any of the methods. When I use the object browser to view the COM classes, then I can see that they are all empty. However when I use the same COM on windows XP using VS2008, then all methods are suddenly available. Does anybody know why this is happening and how to get this working under Windows 7?

There was a problem with the com object that I have been using. Its not supported to work in Win7.

Related

api-ms-win-core-libraryloader_l1-2-0.dll on windows vista

I have not enough knowledge on how to fix this. What I do know is:
Build a Executable in Visual Studio 2010 on Windows 8.1 (hence the 1-2-0.dll)
Running the executable, crashes on Windows Vista with the message: "This application could not be started, because of the api-ms-win-core-libraryloader-l1-2-0.dll"
Under vista you would have the libraryloader 1-1-0 if not mistaken?
this library is linked from mscorlib.dll somehow? But not referencing this dll would not build the project.
Maybe someone could direct me in correct way? Or better have a solution for this?
Is there a way to tell VS to not use this latest dll version?
I am certain I did not reference this specific DLL.
I got the same problem, in my case I was providing the d3d9.dll and d3d11.dll, that I copied from windows 8.1 windows instalation directory and ofc. I cant use those!
And then all Computers like Vista, Windows 7 and even Windows 8 had that Error:
"This application could not be started, because of the api-ms-win-core-libraryloader-l1-2-0.dll"
Because this file:
api-ms-win-core-libraryloader-l1-2-0.dll belongs to Windows 8.1
Solution?
In my instaler, Installshield, I removed the d3d9.dll and d3d11.dll, so my aplication will use the ones already in OS.
The problem was not in the "EXE" produced by Visual Studio, but in DLL dependecies that I was providing.
this problem occurred due to Compatibility with older operating systems.
this link may help you
http://msdn.microsoft.com/en-us/library/hh802935(v=vs.85).aspx

How to use Delphi created ActiveX DLL in .NET environment like VS2010

I am running 32bit development environment with Win 7 and VS2010.
I was able to register the Delphi created ActiveX in Windows7
regsvr32.exe "C:\Program Files\MyApp\Test\DelphiActiveX.dll"
Then I added reference in my VS2010 Windows Form project.
I tried the c# 4.0 way of using ActiveX with a dynamic object but it is not working. Nothing happens.
// c# 4.0
dynamic myActiveXLink = Activator.CreateInstance(Type.GetTypeFromProgID("DelphiActiveX.DelphiActiveXLink"));
//dynamic myActiveXLink = Activator.CreateInstance(Type.GetTypeFromCLSID(""));
myActiveXLink.SearchByName("FName1", "LName1");
SearchByName method should start a third party application installed on the computer.
EDIT: The CreateInstance() is executed without error.
Now I am getting Exception at the myActiveXLink.SearchByName() call:
Exactly the same code works fine under WindowsXP and VS2010, but fails under Windows7 32bit and VS2010.

How to debug x64 COM dlls on Win7? Native COM dlls couldn't be found in Debug\Windows\Modules

I googled a lot but no answer found. My project is a plugin of a .Net application.
The project was started 2 years ago on WinXp 32bit platform. A 32bit COM component was used for some reasons. Because I have the source codes, I can debug into the COM component freely. Everything is fantastic at that time.
At the beginning of this year, my project is upgrading to x64 because of memory benefit. And the x64 version of the COM component is also ready. Everything works fine except debugging.
Now I can't debug into the COM dlls anymore. There is no any COM dll or interop dll listed in the Debug\Windows\Modules window. Thus, I can't specify the symbol directory for dll.
I know there is no mix mode support for debugging. So When I attach the exe, I select "Native".
I tried VS 2005, VS 2008 and VS 2010, all of them give me the same issue. Then I thought may be it is because x64. So I use the old 32 bit code which was debugged fine on WinXP to try again. But I still can't debug either.
Any idea? Is this because of the win7 platform? Or if I need to add some entries in the exe's config file?
Thanks in advance.
Perhaps, I should ask in this way:
What are the rules for the debugger to decide which module should be in the module list? If you compare the module list between ProcessExplorer and VS, you would find these two are not the same.

Which Windows versions have preinstalled MSINET.OCX control

I have an old VB6 application that depends on MSINET.OCX. I'd like to know if I can distribute this application without registering MSINET OCX component. My target OSes are XP, Vista and Windows 7. Do all of them have this component preinstalled?
See if this information from technet helps you. The short of it seems to be that it does not come preinstalled, it is installed when you install an application that uses it. You will need to include it in your installation.
It's not shipping with the OS. It is however delivered with Visual Basic. You must include it within your application setup. For details on Vista and Win7 support see: Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008 and Windows 7

WIA interop deployment through VS ClickOnce

I have an application that allows me to scan images on my development PC which works successfully. It uses the Microsoft Windows Image Acquisition COM ActiveX dll. I am running VS2008 on Windows 7 64 bit.
I am having problems trying to deploy the Interop dll using ClickOnce. This component is referenced through the VS project in the normal way (and copy local = true). When I install the application on a Windows XP machine, I get an error saying that the library is missing (i.e. it wasn't installed / registered correctly). Having looked in the System32 directory, the dll is not there, so it has to be deployed via my app.
After looking on the web and trying various solutions, I then tried Microsoft's 'Registration-Free COM' method here: http://msdn.microsoft.com/en-us/library/ms165432%28VS.80%29.aspx
However, changing the Isolated property to True then caused 2 compilation errors due to duplicate entries in the registry. Having sorted out these entries out manually, I then deployed my app again with the supposedly isolated COM component, but when I try to scan a document I now get this message:
'The procedure entry point_except_handler4_common could not be located in the dynamic link library msvcrt.dll'
I feel like I'm going round in circles with this one. Can someone please enlighten me on how to deploy the WIA interop via ClickOnce for all versions of Windows from XP onwards?
Your help will be greatly appreciated.
Thanks
Don't copy system DLLs from your Win7 machine to the XP machine, that can't work. It would have been easier if you named the file, I would guess at wiaaut.dll, the WIA Automation provider. It probably just isn't installed on the XP machine.
Ask the client to install this download on the machine. You don't need reg-free COM, these are system components.

Resources