Is it possible in Windows 7 64 bit to use 64 bit com dlls (in process servers) from a 32 bit exe application? - 32bit-64bit

Is it possible in Windows 7 64 bit to use 64 bit com dlls (in process servers) from a 32 bit exe application?
I need to leave my VB6 gui application as 32 bit running on a windows 7 system but it has calls to com dlls (in process servers) and com exe's ( out of process servers).
My understanding is that it should have no problem with the com exe's the out of process servers.
I think the com dll in process server may have trouble since it is 64 bit but the application calling it is 32 bit.
Has anyone used a 64 bit com dll from a 32 bit application?
Thanks

A solution to this is discussed here:
https://stackoverflow.com/a/8484244/147637 (Read the whole post)

Years ago I used a 32bit DLL in a 16bit app. I don't remember how we did it (and the technique would surely not still be applicable), but this is generally called "thunking".
A quick Google would appear to indicate this can't be done in process, but I only scanned:
http://www.google.com/search?q=thunking+64bit+32bit+dll

Related

Running 32 bit application in 64 bit server?

We have developed a web application . It contains large amount of Data .So I need to enable 64 bit application in IIS application Pool (ie . Disable 32 bit application ). I have some regression due to enabling the 64 bit. I have added some dll with 32 pit application .Now its not running. Is there any solution to run 32 bit application in 64 bit application. Is there any work around process to resolve this regression.
advance in thanks
This is typical issue when you have to use 32-bit DLL in your project. The solution is dead simple - move 32-bit code out into separate process and communicate to it with any means you're familiar with. I prefer WCF with named pipe binding - the fastest option within the same machine.

Configuring IIS 7 to run on 32 bit

I understand that the server can't run 32 bit and 64 bit apps concurrently, but I need to make use of the wkhtmltopdf utility which is only available as a 32 bit binary. If I "downgrade" my environment to 32 bit (ASP.NET app, IIS), what affect will this have on performance? Will it break anything?
".. the server can't run 32 bit and 64 bit apps concurrently"
You can have an application pool running in 32 and another in 64 bits in the same IIS instance.
https://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx
Create a dedicated application pool to run this application, leave all other apps in 64 bits mode

ASP.NET application error when run in Win Server 2008 64-bit

May you help me, My ASP.NET application can't import excel file when migrating this application that run in Win Server 2003 32-bit to the Win server 2008 64-bit environment.
How to fix this bug? because in Win Server 2003 32-bit, it runs properly.
the error report that appear is:
*System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) at Admin_ImportRisk.CreateTempTable() in C:\inetpub\wwwroot\ERMApproval\Administrator\ImportRisk.aspx.vb:line 66.*
The code in line 66 of my application is:
oBooks.Open(Server.MapPath("~/App_Data/Risk.xls"))
I have tried several scenarios:
Added Network Service user to the Microsoft Excel Application in DCOM configuration and set the identity of Application pool that in used to be same.
Added all many kind of user to the Microsoft Excel Application and My computer in security of DCOM configuration. And I have added many kind of user too in the application's folder.
Used corflags.exe to force 32-bit application to run in 64-bit environment
Used regsvr32.exe to register a Microsoft.Office.Interop.Excel.dll file to the windows 32-bit component services.
Used rundll32.exe to run the 32-bit Microsoft.Office.Interop.Excel.dll file in the 32-bit environment
But the result is still the same.
It will be a big honour if you can help me^^.
Best regards,
-imanuel-
The simple answer is to compile your project to target x86 only. This is a setting in the project settings. So the .net framework will only generate a 32 bit application at runtime, rather than defaulting to 64 bit. This is no different from setting corflags, however if you have multiple assemblies you ahve to make sure it's done for all of them. The application itself must target only 32 bit.
You're using a COM component that is 32 bit, and you can't do that in a 64 bit application, so force it to be 32 bit.
You can also force IIS to run it in the 32 bit context as documented here:
http://lostechies.com/gabrielschenker/2009/10/21/force-net-application-to-run-in-32bit-process-on-64bit-os/
Also, make sure the 64 bit version of Excel is not installed on the server, but rather the 32 bit version.

Classic ASP on large memory server

I have a client with a large ASP app that apparently is fairly memory intensive. I’m helping them migrate to new hardware they have running Win2k8 R2. They have 4 physical servers with 32gb of RAM each. I’m making the assumption that ASP apps run as a x32 process. So I see that we have two options:
On the application pool enable web gardens.
Use the physical servers as VM hosts and split the box into say 4 web servers each.
Any thoughts on which path will provide us better performance? I’m just not really sure how ASP will handle a machine with lots of memory, and I’m worried it won’t really be able to address the memory well. (you can ignore all the obvious stuff like increased maintenance of 16 web servers vs 4, or the flexibility virtualization gets us over physical servers, etc)
It doesn't necessarily follow that an ASP app will require a 32bit process. The common APIs such as ADODB are available in 64 bit so there is a possibility you could run it in a 64 bit process which is certainly worth pursuing first.
When it comes to Web Gardens and ASP if the ASP application makes use of the Session object then you are in trouble. Unlike with Windows Load Balancing there is no way to affiliate a session with a specific process. So if you do need the Session object that just leaves you with VM hosts.
If you can run without Session object the a Web Garden approach is going to be better than multiple VMs.
You might want to double check that assumption about 32 bits: See also this question

Memory Leak in Oracle Client 10.2.04 for 64bit ASP.NET application

Does anybody know of Memory Leak in Oracle Client 10.2.04 64bit?
We use in on ASP.NET application running on Windows 2008 server with
System.Data.OracleClient and our process is growing to 2.4GB withing few days!
Can you test this on a 32bit client somewhere? Has the app worked in other environments, e.g., is this a sudden onset associated with migrating to 64 bit software? Is this an in-house developed app? Before I would point to Oracle, I'd suspect my own code. Particularly with something as egregious as this appears to be! Make sure there are no loops that open cursors inside and never close them.

Resources