News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Possible problems with SSE usage.

Started by KeepingRealBusy, July 07, 2010, 12:57:11 AM

Previous topic - Next topic

KeepingRealBusy

Hutch, Michael,

I have the zip, will try it.

Dave.

jj2007

After successful build, test.exe gives me a Visual C++ Runtime Library error:
R6034
An app has made an attempt to load the C runtime library incorrectly.

MichaelW

There is an R6034 and that same error message in the DLL. The app runs no problem under Windows 2000. How did you build the EXE, and what happens for my previous example where I used run-time dynamic linking?

I think the solution is here, but I have no way to test it short of installing Windows XP on a spare system.

eschew obfuscation

jj2007

Both versions show the same error. The msvcr80.dll sits in the same folder and is version 8.0.50727.42 of 23 sept 2005

GregL

msvcr80.dll is the C run-time library for Visual C++ 2005. It is a "side-by-side" DLL. Your executable should have a manifest to use it.

If you ask me, Microsoft really screwed things up when they went this route. It's the same situation in VC 2008 and VC 2010.

MichaelW

Including a manifest eliminated the R6034 message, but now I get:

"The application failed to initialize properly (0xc0000142). Click..."

0xc0000142 is STATUS_DLL_INIT_FAILED

Any ideas?
eschew obfuscation

GregL

#141
You need to run mainCRTStartup?    ...    I don't know.

I ran your program MichaelW, and I was surprised when it ran with no errors for me. I either use MSVCRT (usually) or the MSVCRxxx DLLs, I have never tried mixing them, I figured it would just be too problematic.


KeepingRealBusy

I know this is an interesting process, and I am interested in its conclusion. At least I (we) will know how to do this in the future.

BUT, I was just trying to drain the swamp! I do not really need crt__wcslwr_s. I was just trying to time it for comparison to my functions.

Dave.

MichaelW

I think the problem may be with the manifest that I am using, but since I don't have VS I have no good idea what the manifest should contain for this specific purpose, and I just don't have enough interest to delve very far into Microsoft's ridiculous manifest thing.
eschew obfuscation

GregL

The manifest needs to contain the following:

<dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
</dependency>


The version must match your DLL version exactly and the publicKeyToken changes with the version.

I agree, it is ridiculous.



MichaelW

So basically it looks like, for Windows XP and later, to use the DLL you must have VS.
eschew obfuscation

GregL

#146
MichaelW,

Not necessarily, you just need the correct entry in the manifest.

[Edit] And having VC++ makes things a lot easier.  :wink

ecube

useless dll, I dread even having to link to msvcrt.dll occassionally to cater to C code. We just need equivilant ASM functions for all the C ones to save the hassel. unfortunately while MASM32 and other ASM sdk's are great they still lack a lot of formatting functions.

hutch--

Cube,

The trick is to use MSVCRT, not the later side by side DLL. MSVCRT is a standard "known" DLL since Win9x where the side by side versions are all over the place on later versions.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

GregL

E^cube,

I really disagree. msvcrt.dll is a standard system DLL and has a ton of useful and time-tested functions.  If they meet your needs, there is no reason to not use them.  Plus, if  you have ever programmed C, you are already familiar with them.  I would be more inclined to use a CRT function than to use some function Joe Blow came up with.