VMware {code} Community
flatino
Contributor
Contributor

redistributing c++ code using Virtual Disk Development API

Hello,

I have installed Virtual Disk Development Kit 1.0 on my development machine with Visual studio 2005 and I can correcty build and execute the example file vixDiskLibSample.exe on the same

local development machine.

The problem I am experiencing is that I cannot run the sample vixDiskLibSample.exe on other machines.

(I followed user guide to compile the sample project at path C:\Program Files\VMware\VMware Virtual Disk Development Kit\doc\sample)

I need to run my vixDiskLibSample.exe on a machine different from the one I use to develop this code.

Reading the doc

"

Windows requires the lib/vixDiskLib.lib file for linking, and the bin/*.dll files at runtime

"

I understand that I just need to copy the above files togheter with my vixDiskLibSample.exe to have the project working.

But on other machines (different from the one I use to build to code) it fails for missing DLLs.

I have 2 only ways to run my vixDiskLibSample.exe on a machine different from my development machine:

- install Microsoft Visual C++ 2005 Redistributable Package

- install the Virtual Disk Development Kit

(I also need to copy bin and lib from development kit)

One of the above step fixes my problem.

My questions are:

- is this normal or am I doing something wrong at Visual C++ compilation time ?

- Which DLLs are needed on a machine to have your example (vixDiskLibSample.exe) running without installing the Virtual Disk Development Kit or the Microsoft Visual C++ 2005 Redistributable Package ?

From the documentation it seems I just need bin and lib folder (from virtual disk kit installation folder) but I am getting the DLL missing error.

- using a dependency walker, it seems that the library file VIXDISKLIB.DLL needs MSVCR80.DLL and other ones: is it possible to have the list of dependency file in order

to manually copy all the needed dependencies ? (instead of isntalling the redistributable or the virtual kit on each machine running our sample code)

Thanks a lot,

Francesco

0 Kudos
4 Replies
admin
Immortal
Immortal

Hi,

You are not doing anything wrong as far as building the sample is concerned. IMO, the right thing to do would be to install the MSVC redistributable (I think you can get a merge module for this) and then copy all the bin files from the VDDK installation. The latest MSVC runtime works as side-by-side component, so manually copying them may not work on all platforms (e.g. vista).

Thanks

Sudarsan

flatino
Contributor
Contributor

Thanks a lot Sudarsan for your fast and useful reply.

Just a few more questions to check I have understood.

1)

Suppose I need to run the sample vixDiskLibSample.exe on another machine different from the one i use to develop and compile the file.

The "suggested" scenario consist in shipping on the target machine

1- the MSVC redistributable

2- vmware virtual disk needed files (bin/lib folders under vddk installation root)

3- the compiled vixDiskLibSample.exe

Is the above statement correct ?

2)

I need to run the compiled vixDiskLibSample.exe in a WinPE environment.

But winPE has no msiexec to install the MSVC redistributable.

Is there a way to simply copy the needed DLLs instead of installing the MSVC redistributable ?

3)

I read from MSDN that it is possible to ship windows CRT DLLs and copy them on the target machine instead of using the redistributable

-> http://msdn.microsoft.com/en-us/library/ms235291.aspx

(Windows CRT DLLs are needed by vmware deplyoment disk kit which should have been compiled with visual studio runtime libraries)

I tried following the way described in the above link (copying files instead of MSVC redistributable),

but I am getting some problems -> on event viewer "Component identity found in manifest does not match the identity of the component requested"

Is there the list of which runtime CRT DLLs are needed with the VDDK kit ? (and which version too...)

That could help developers in following the suggested way (see above MSDN link) and simply copying needed DLL files instead of install MSCV redistributable...

4)

Is Windows PE 2.0 a supported platform to run binaries like vixDiskLibSample.exe which works with the vmware virtual disk api ?

Or VDDK DLLs will not work on Windows PE 2.0 and should I move on another platform ?

0 Kudos
admin
Immortal
Immortal

I am not sure about Vista PE. Can you use the older PE distribution - that seems to contain all the required dependencies.

-Sudarsan

0 Kudos
flatino
Contributor
Contributor

Sorry for the delay in replying you.

Thanks for the help: I solved the problem since I don't need anymore to work with WinPE.

On other supported Windows platform when the vix-disklib is installed all is working fine.

Thanks again.

Francesco

0 Kudos