Windows 7 dll import problem

R

roidy

That's the thing, it`s not a problem with the version of VS used as both
versions of the dll file were compiled using Visual C Express 2008 the only
difference was one was compiled in WinXp and the other in Windows 7. It`s
just the version compiled under WinXp wouldn`t work in Windows 7.

Rob

Mike said:
roidy said:
I just hope that the version of the dll compiled in Windows 7 will work
in WinXP. But I can't test it just yet as my XP machine is currently in
bits awaiting new parts..........

Use DEPENDS to get list of DEPENDENCIES for the LIBMP4V2.DLL. You can
also get the implicit loads using DUMPBIN.

DUMPBIN /DEPENDENTS LIBMP4V2.DLL

I wrote a command line version of DEPENDS called LDEPENDS.ZIP

ftp://ftp.santronics.com/wildcat/tools

and I use to quickly see what is needed by EXE and DLLs. It doesn't work
well with SxS baloney (but DEPENDS does)

For example, for us, WCSRV2.DLL is the our DLL for WIN32 and for .NET
DLLIMPORTING. For this solid 12 year old WIN32 version, LDEPENDS shows:

D:\wc63>ldepends wcsrv2.dll
Module: [wcsrv2.dll]
+ rpcrt4.dll
+ wsock32.dll
+ msvcrt.dll
+ mfc42.dll
+ kernel32.dll
+ user32.dll
+ advapi32.dll
+ ole32.dll

This is solid code for all WIN32 compatiable Windows OSes, but that was
compiled with VS98.

Now when its compiled using VS2005:

G:\wc7beta>ldepends wcsrv2.dll
Module: [wcsrv2.dll]
+ rpcrt4.dll
+ wsock32.dll
+ mfc80d.dll
+ msvcr80d.dll
+ kernel32.dll
+ user32.dll
+ advapi32.dll
+ ole32.dll
+ oleaut32.dll

**** report ****
MFC80D.DLL LoadLibrary() Error: 126
MSVCR80D.dll LoadLibrary() Error: 126

So there are more dependencies that uses 8.0 dlls files and these are
trying to load or aliased with SxS. Ldepends has a problem finding SxS
stuff, but when the EXE or DLL is loaded for real, the OS loader (and
DEPENDS) knows whats to do.

So your goal is to see what RTL (run time libraries) you want to use. If
you compile with VS200x then you will bring more libraries that are for
that compiler version RTL.

What I would do is find the minimum required for LIBMP3V2.DLL and stick
with it. But then again if you are compiling the main application for
.NET, then most likely you will need 8.0 (VS2005) or 9.0 (VS2008) files
anyway.
[/QUOTE]
 
M

Mike

roidy said:
That's the thing, it`s not a problem with the version of VS used as both
versions of the dll file were compiled using Visual C Express 2008 the
only difference was one was compiled in WinXp and the other in Windows
7. It`s just the version compiled under WinXp wouldn`t work in Windows 7.

Sounds like the original issue you saw:

DllNotFoundException was unhandled
Unable to load DLL 'e:\libmp4v2.dll': The application has failed to
start because its side-by-side configuration is incorrect. Please
see the application event log or use the command-line sxstrace.exe
tool for more detail. (Exception from HRESULT: 0x800736B1)

is related. In others words, the SxS needed for XP are not matching
the requirements for Windows 7. Did you do the SXSTRACE as it
suggested? What did it say?

---
 
M

Mike

roidy said:
That's the thing, it`s not a problem with the version of VS used as both
versions of the dll file were compiled using Visual C Express 2008 the
only difference was one was compiled in WinXp and the other in Windows
7. It`s just the version compiled under WinXp wouldn`t work in Windows 7.

Sounds like the original issue you saw:

DllNotFoundException was unhandled
Unable to load DLL 'e:\libmp4v2.dll': The application has failed to
start because its side-by-side configuration is incorrect. Please
see the application event log or use the command-line sxstrace.exe
tool for more detail. (Exception from HRESULT: 0x800736B1)

is related. In others words, the SxS needed for XP are not matching
the requirements for Windows 7. Did you do the SXSTRACE as it
suggested? What did it say?

---
 
M

Mike

roidy said:
That's the thing, it`s not a problem with the version of VS used as both
versions of the dll file were compiled using Visual C Express 2008 the
only difference was one was compiled in WinXp and the other in Windows
7. It`s just the version compiled under WinXp wouldn`t work in Windows 7.

Roidy, where did you get the source code for libmp4v2? Which one are
you using? I found

libmp4v2-1.5.0.1.tar.bz2
mp4v2-2.0-20090110.tar.bz2

I already have support for libmp3 in our product, so I might as well
add libmp4 and see the kinds of stuff you are seeing.

PS: I am currently being reminded why I didn't like VS200x and avoided
it for so long. It is terribly slow at compiling and its been nearly 5
minutes for this MP4V2 solution. :)

--
 
M

Mike

roidy said:
That's the thing, it`s not a problem with the version of VS used as both
versions of the dll file were compiled using Visual C Express 2008 the
only difference was one was compiled in WinXp and the other in Windows
7. It`s just the version compiled under WinXp wouldn`t work in Windows 7.

Roidy, where did you get the source code for libmp4v2? Which one are
you using? I found

libmp4v2-1.5.0.1.tar.bz2
mp4v2-2.0-20090110.tar.bz2

I already have support for libmp3 in our product, so I might as well
add libmp4 and see the kinds of stuff you are seeing.

PS: I am currently being reminded why I didn't like VS200x and avoided
it for so long. It is terribly slow at compiling and its been nearly 5
minutes for this MP4V2 solution. :)

--
 
R

roidy

I`m using mp4v2-2.0-20090110.tar.bz2 but after looking at the project page
just now I see there is a newer version available.

mp4v2-2.0-20090515.tar.bz2

Rob
 
R

roidy

I`m using mp4v2-2.0-20090110.tar.bz2 but after looking at the project page
just now I see there is a newer version available.

mp4v2-2.0-20090515.tar.bz2

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top