How to get xp_pcre to run on a 64 bit system? - sql-server

For many years we have been using xp_pcre for regular expressions in sql server:
xp_pcre - Regular Expressions in T-SQL
I've just migrated to a new 64 bit vista development machine and have installed xp pcre. Unfortunately when i try to use the sprocs I get the following error: Could not load the DLL xp_pcre.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).
Has anyone had any success installing xp_pcre on a 64 bit machine running vista? Any advice? Thanks in advance,
Shane

Since it's a compiled DLL, you would probably have to recompile it to get a 64 bit DLL, that could be run on your 64 bit machine. Since nothing at that page has been updated since 2005, it's unlikely there is an already a prebuilt version for 64 bit. However, since the source code is included, you could, if you have VS for C++, with a 64 bit compiler, compile it yourself and try to get it working that way.

Related

E2045 Bad object file Format:"XXX.obj"

I am working on one migration project from x32 bit to x64.
Here I am using this code:
{$L com_1.obj}
{$L com_is1.obj}
{$L com_2.obj}
But while compiling code I am getting error as
[dcc64 Error] XXX.dpr(919): E2045 Bad object file format: 'E:\MyProj\com_sha.obj'
I am not able to trace why it is happening.
Is it due to 32 bit obj file used for compiling x64 bit delphi project?
If it is I have also tried to create a obj file with x64 bit environment.
Can anyone please help me on this?
I am using Delphi 10 Seattle.
You cannot use a 32 bit object with the 64 bit compiler. You must recompile your code with a 64 bit compiler.
You can use a number of different compilers to do this. Although I have heard of people succeeding with gcc I have never managed to do that. I believe that the modern Clang based Embarcadero compiler can be used, but I personally have no experience of that. I have always used the Microsoft compiler to create 64 bit objects. And certainly this is how Embarcadero themselves have done it for libraries like zlib that they link to their RTL.
Yes you need to convert those .obj files to 64 bit.
Converting 32-bit Delphi Applications to 64-bit Windows states:
64-bit External .obj Files: If you expect your 64-bit Windows application to link to an external .obj file, keep in mind that you will need a 64-bit version of the .obj file to link with a 64-bit Windows application.

How to switch VS Project from 32bit to 64bit?

I am having trouble moving my WPF project from 32 bit to 64 bit. I recently realized I need my program to be able to use more than 2gb of memory.
What I did was I changed my project's platform target from Any CPU (with preferred 32 bit checked) to x64.
I then got an error stating “XXX” does not exist in the namespace “XXX" and realized it was probably because I did not change the CPU target for my other libraries.
Then when I launched the program in my developer machine, it works perfectly fine using both visual studio and Click Once installing after deploying. However, when I test the deployed executable using a few different 64 bit machine, the program starts behaving erratically with some functions not working properly.
I have no idea how to debug since it works perfectly fine in my developer machine but not on any other computer? Am I not changing the target platform correctly?
The assembly ITSELF built by youself when targeting "Any CPU", but you should check out every third-party assemblies that used in your project if they are targeting "x86". If you change the target of your own project to "x64", make sure all of the dependencies are for "Any CPU" or "x64".

need a way to run intel 16 bit MASM on a 64 bit machine, is this possible?

I am taking a computer architecture class, and we are learning assembly language on 16 bit machines. On-campus department labs have these machines available, but I want to be able to work on labs at home.
Where can I download MASM that can run 16bit code, I,m sure there is a way to do it, i just have to link 16 bit.
You can use dosbox, dosemu, or something similar to emulate an old x86 DOS machine, and run your 16-bit code on that.
I know this is 6 years ago, but to help others. Current MASM on Microsoft website is mainly for 32 and 64bit but you can get old versions here: http://bytepointer.com/masm/index.htm. and another one here http://www.masm32.com/licence.htm
I found that only old versions of MASM with FreeDOS, XP, DosBox etc will enable you to run the 16 bit code. You cant run 16bit executatable in a 64bit System.
Please let me know if it works.

How to create an application which contains 32bit and 64bit binaries, and runs the appropriate of them on the OS?

I made an application, and i had to compile a 32bit and a 64bit version of it. I saw some application, like ProcessExplorer acting as follows. On 32bit OS it runs a 32bit app, but on a 64bit OS it extracts a 64bit version of the same exe and this will be executed. So how can i make such an application from my app? What settings should i make in Visual Studio?
Process explorer works like this:
You download a single 32 bit executable.
When you run that executable on a 32 bit OS, that's it.
When you run that executable on a 64 bit OS, the 32 bit process detects that on startup and to disk extracts a 64 bit executable that is stored as a resource in the 32 bit process. And then it runs that 64 bit executable.
There aren't any settings in Visual Studio that would automate that process for you. You'd have to write that part for yourself. You could have a build process that built the 64 bit version first. And then you could compile that executable into a resource which you link into your 32 bit process. Which is what you ship.
I myself am not convinced it's worth all the effort. Personally I'd be inclined to ship two different executables, but I guess only you know your own requirements.
Why not get the installation program to install the appropriate version depending on the OS and give that executable the same name for either OS?

How to cross-compile 64bit DLL with VS 2005 on 32bit computer?

Using Visual Studio 2005, I wrote a simple DLL in C that uses the Windows API to send UDP datagrams and that is hooked into a third-party program. On a 64 bit machine, it does not work at all, as the third-party code was compiled for 64 bit in this case. So I need to ship two versions of the same DLL - one for 32 bit, one for 64 bit.
However, I did not manage to get Visual Studio (running on a 32 bit machine) to spit out a DLL that is not identical to the 32 bit version - it seems the 'machine' setting in the project properties is simply ignored. A colleague told me VS 2008 simply refuses to cross-compile in this scenario. Is this really not possible at all?
Right click the project in the Solution Explorer then go Properties / Configuration Manager / Active Solution platform: <New...> / x64 / OK / Close. Then select x64 in Platform, OK, and you're good to go.

Resources