64 bit webpart on SharePoint 2007 32 bit - dll

If I develop a 64 bit webpart DLL does it work with SharePoint 2007 32 bit?

No can do. You can't load 64-bit DLL in a 32-bit process.

By default a .NET assembly will target "Any CPU" (see Build > Configuration manager in Visual Studio).
This means that the Intermediate Language (IL) code produced will be Just In Time (JIT) compiled into 32bit code when running on a 32 bit OS and 64 bit code when running on a 64 bit OS.
Unless you are doing something very funky (which is unlikely in a SharePoint web part) then you should leave it as "Any CPU" and simply not worry about it any more - it will just automagically work.
SO - Visual Studio “Any CPU” target
Visual Studio .NET Platform Target Explained

Related

"interops made for a different target platorm." and "ActiveX not properly registered"

Thank you for any and all help... I've never seen this bug before... I have several vendor supplied DLLs for talking to a Signature Capture Device. We build our C# windows app platform target set to "any cpu" on an XP x86 machine. When the application is run on Win7 32-bit computer it works fine. When it is run on Win7 64bit computer it fails.
Running the Visual Studio 2010 debugger on Win 7 x64 in "Debug mode" works fine. Running in Release mode on Win7 x64 fails.
I can change the platform to target x64 then Release mode gives "interops made for a different target platorm." When I delete and recreate the interops for 64 bit target I get "ActiveX not properly registered".
Thank you in advance.
Make sure you module not depends of 32 bits libs.
Use Dependency Walker or Fuslogvw.exe to diagnose module load fail.
To interop 32/64 bits COM see Access x86 COM from x64 .NET
My solution was to change the Project->Properties->Build->Platform Target from "any cpu" to "x86". The application now runs on win7 64 bit and 32 bit and XP x86.

what are all requirements for run the visual studio 2010 vb projects

I developed the project in visual studio 2010. That exe file is not supported for other PC's.
which dotnetframework to be installed? other than dotnetframework is there any other requirements needed?
Are you sure it's not the CPU type you specified during compiling (x86 vs x64 CPU). If you compiled in 64-bit and a user only has a 32-bit processor (x86), your code won't run.
The .Net Framework should work on any PC-based system, but be sure to include it in your deployment or setup package. (you can provide Excel, .NET Framework, and many other packages with your package.)
You should also try to find out what error messages your users are receiving -- which will point you in the right direction.

The 64 bit dll of Microsoft SharePoint is running on 32 bit machine

I am working on SharePoint domain. Sometime I need to do development for event receiver and windows service etc.
Last week I have installed a Windows Service on my server to upload the documents from a local folder. Server is 64bit machine and "Windows server 2008 R2" installed on server as OS to run SharePoint Foundation 2010. Service was running properly.
The requirement was, no user will go to the server to upload the document. So I have installed the service on local users machine. Some users were having 32 bit Machine and 32 bit OS and other users are working with 64 bit. while installing the service I got an error on 32 bit machines. Error was "This solution is for 64bit machine". After changing the target platform from 64bit to x86, the service was installed successfully on 32 bit machine and started working properly.
Now the question came:
To work with SharePoint Object Model, I am using SharePoint 64 bit
dll in my Windows service which is installed on 32 bit machine and 32
bit OS.
Is it possible that the 64bit dll will work on 32 bit machine?
In what scenarios we can face the problem of "64 bit dll will not
work on 32 bit machine"?
What should I do if I want to install the same solution on 64 bit
and 32 bit machine? I don't want to change the target platform
each and every time.
UPDATE:
After R&D I found "32 bit solution can be installed on 64 bit dll with some terms and conditions" refer http://www.samlogic.net/articles/32-64-bit-windows-folder-x86-syswow64.htm.
In 64 bit machine we are having Program x86 and SysWOW64 folders to handle the 32 bit dll functionality.
Now the question is:
How we are handling the 64 bit dll on 32 bit machines?
And
Is it confirm that the SharePoint dlls are "any CPU"?
Regards.
Not sure I understand what you are trying to do, so I'll try to be exhaustive:
SharePoint Object Model are only available on SharePoint servers, not user workstation. They indeed rely on 64 bits DLL that only work on 64bits OS.
SharePoint 2010 allows you to use the "Client Object Model" that work on remote computer like use workstation. They are .Net DLL, not specific to 32bits or 64bits. Just compile your exe with "Any CPU" and it will work just fine
Generically speaking, 64bits exe only work on 64bits OS. In .Net you can however use "Any CPU" that will work for both 32bits and 64bits. This however will only work if you exe and its dependencies are full .Net (no native code).

How to compile x64 with Visual Basic 2010 Express Edition

I found a forum post about Visual C++, Visual C++ 2008 Express Edition And 64-Bit Targets , but how do I develop x64 applications under Visual Basic 2010 Express Edition?
I don't have Visual Basic 2010 Express installed to check, but if you go to the project properties and view the Compile tab, do you have an "Advanced Compile Options" button? Click that and then look at the "Target CPU" drop down. By default it should be "Any CPU", which means that .NET will run as x86 or x64 depending on the OS that the app is running on.
Since .NET code is not native code, the target platform doesn't matter as much as it would with a C++ project. The recommendations I've seen suggest targeting x86 will all your .NET applications unless you have a specific reason that you need the extra memory addressing that you'd get with an x64 application.

Can a VB6 component be compiled to 64 bit?

Is there a way to compile a VB6 component into 64 bits?
My feeling is that the answer is "no", but I would like to confirm this.
Please, if you can, paste a link to an authorative source that would confirm.
No. I hope this counts as authoritative.
64-Bit Windows
Visual Basic 6.0
runtime files are 32-bit. These files
ship in 64-bit Windows Operating
Systems referenced in the table below.
32-bit VB6 applications and components
are supported in the WOW emulation
environment only. 32-bit components
must also be hosted in 32-bit
application processes.
The Visual Basic 6.0 IDE has never
been offered in a native 64-bit
version, nor has the 32-bit IDE been
supported on 64-bit Windows. VB6
development on 64-bit Windows is not
and will not be supported.
No it cannot (well Microsoft has not released a compiler to compile it for a 64-bit environment), but this does not mean that it won't run on a 64-bit system. To run it in conjunction with IIS, you'll need to install the 32-bit version of IIS.