Is there a 64 bit version of psscor2? - windbg

I'm trying to debug a .NET 3.5, 32 bit application running on Windows 7/64 bit with WinDbg. I'd like to use psscor2, but I can't load it. I can't load sos, either.
When I try to load psscor2, I get this error:
> .load psscor2
The call to LoadLibrary(psscor2) failed, Win32 error 0n193
"%1 ist keine zulässige Win32-Anwendung."
Please check your debugger configuration and/or network access.
When I try to load sos, I get this error:
> .loadby sos mscorwks
Unable to find module 'mscorwks'
My guess is that the 64bit version of WinDbg can't load 32 bit extension dlls like psscor2 and sos. But I couldn't find a download for the 32 bit version of WinDbg, or a 64 bit version of psscor2.
PS: I have (sort of) solved the problem: I installed the Windows 7 SDK in a 32 bit virtual machine, and copyed the 32 bit version of WinDbg from there to my development PC. But there has to be a easier way to do this!

If you want to debug a 32 bit application, you should use the 32 bit version of WinDbg and load the 32 bit version of SOS/PSSCOR2 even if you're on 64 bit Windows.
If you use the 64 bit version, you'll end up debugging the Wow64 process, which means you must go through some additional loops to be able to debug the application as a 32 bit process. If you must do this for some reason, you need to load the wow64exts extension as well and switch to 32 bit mode using the !sw command. Even if you do this there are some issues with using the 64 bit version with a 32 bit application, so I recommend that you use the 32 bit version of WinDbg.

Related

Running a Matlab program that includes ActiveX

I try to run a program in MATLAB (R2011a, 64 bits), the program contains ActiveX, but I get an error:
In put PROGID does not represent an Activex control. if this PROGID
used to work before, please check vendor's documentation for
equivalent activex control progid
this program is fully launched in MATLAB (R2009, 32 bits)
I have instaled VB6.
Any help?
You are running 64 bit Matlab and your ActiveX control is 32 bit.
Check out this link. It deals with the bitness needing to match between the Matlab version and the Ax control. If you are running 64 bit Matlab, then the ActiveX control should also be 64 bit.
You could alternatively install 32 bit Matlab.

Start WinDbg right after program crashes

If you look at this Youtube video, you can see that WinDbg is automatically executed when the process dies.
I've followed the tutorial and tried to do the same on my system. I first ran windbg -I, and then changed the HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\Auto registry key to 0. Is there any other step that I'm missing?
Running the 64-bit version of WinDbg with -I command line option creates both 64 bit and 32 bit AeDebug entries. This can easily be proven with Process Monitor:
The 32-bit version of WinDbg creates 32 bit entries only. So, if you ran the 32 bit version, 64 bit programs are not handled. That's what I expect has happened. Another option would be that you ran it without administrative privileges and didn't read the failure message carefully.
In case you want both 32-bit and 64-bit crashes to be handled by WinDbg, run WinDbg -I for both versions. You'll find that WinDbg is smart enough to handle any order:
WinDbg32 will overwrite an existing entry created by WinDbg64 before
WinDbg64 will not overwrite an existing entry created by WinDbg32 before
Although WinDbg64 can debug 32 bit applications, it cannot load 32 bit extension DLLs, therefore you typically want both debuggers registered, not only the 64 bit version.

64 Bit Install of Enthought Canopy on 64 Bit machine issue

I have a 64 bit machine with 64 bit Windows on one side and 64 bit Ubuntu 14 on the other. I am going through some exercises and notice that when I run the following command:
import sys
sys.maxint
I don’t get back the max int for a 64 bit machine and install I get the 32 bit max int. I’m a bit confused and do not know where to start. Maybe it is because I am using the Student License? Works just fine on the Ubuntu side.
The value of sys.maxint depends on the underlying C library. What you are seeing is expected behavior on Windows. See
Python sys.maxint, sys.maxunicode on Linux and windows
https://mail.python.org/pipermail/python-list/2008-December/504337.html
The question is a good one, but it could reasonably be marked as a duplicate by someone with sufficient "reputation". Please search before asking questions. Enjoy Python!

Why and when to use 32 or 64-bit PowerShell or ISE?

I just got my first 64-bit Windows notebook. Now I'm looking for information when and why to use the 32 or the 64-bit versions of PowerShell or ISE.
My first impression is that I better stay with 32 bit, until I understand things better.
What I miss or didn't find are basic tutorials and practical experiences and links to this questions.
I'am working on a Seven 64Bits and W2K8 R2 for one year now, and, on the command line, I'am always using 64 bits Powershell without any troubles.
For me the problem is not to choose 32 or 64 Bit PowerShell.exe, but to know that the two exists, and that a 32 bits process will use the 32 bits PowerShell. For example if you use PowerShell as post build execution script in Visual Studio 2010, it will use 32 bits PoweShell because Visual Studio 2010 is 32 bits process.
The two versions see two differents places in the registry so you have to Set-ExecutionPolicy for both.
As scripting is concerned I do not use ISE, but PowerGUI script Editor. You can use
[intPtr]::size
in a script to know if you are runing 32 or 64 bits PowerShell.exe.
You would use the 64 bit versions of PowerShell or PowerShell ISE where the problem you are trying to solve is uniquely 64 bit. For example:
You need your PowerShell script to be able to consume more memory than a 32 bit application will allow
You are consuming libraries that are 64 bit only or need to run in a 64 bit environment. For example on Windows 2008R2/IIS7.5 if you are using the Microsoft.Web.Management managed wrapper, if you need to modify administration.config via this library then your application or script needs to run in a 64 bit process.
I typically stick with 64-bit PowerShell unless I have a good reason to not use it. One issue with 32-bit PowerShell is that you may accidentally find yourself in HKLM:\SOFTWARE\Wow6432Node location of the registry instead of where you think you are.
The example I've most-often come across for an explicit need for 32-bit is when using certain COM objects. For example, if you have a 64-bit OS, but 32-bit Office... If you want to instantiate a Word, Excel, or Access object, you're going to need to be in 32-bit PowerShell or else it's going to act as if you don't have Office installed at all.
When running SharePoint 2013, it's important to run the 64-bit versions when attempting to user the Windows.SharePoint.PowerShell snapin. I spent too much time not realizing I had open the 32-bit ISE not being able to load SharePoint Commands.
I think you don't really need to take care about that. As for my 64bit system, there is only a 32bit PowerShell preinstalled (in \system32) and it works without any issues. So just use it ;) And well, besides that, it's most likely the same case as with any other application: if you rely on functions/properties that are only available under 64bit you are better of to use the 64bit version of that application.

Can MATLAB for 64 bit use pre-compiled 32 bit mex files?

I have access to a library with pre-compiled 32 bit mex files (Windows: .mexw32, Linux: .mexa32). I am having a hard time compiling the library myself for a 64 bit machine, so I was wondering if there is a way to make MATLAB 64 bit work with 32 bit mex files.
In general accessing 32bit code from a 64bit executable is nontrivial. Therefore I doubt they have implemented this in MATLAB natively...
No a 64-bit program cannot use 32-bit shared libraries. One option is to install the 32-bit version of MATLAB on your machine as well.