Zero Touch Deployment

J

Jon

I have a winforms application that I would like to distribute via a
web server. I have got this working with a simple application, however
my application relys heavily on calls to functions in C++ .net dlls.

The C++ .net functions are declared in VB.NET using syntax like:

Declare Function MyCFunction Lib "MyCFunctions.dll" () as Long

The application downloads and runs from the IIS server fine, but as
soon as it makes a call to a function in a C++ dll an "Unable to load
dll" exception is thrown by the framework - no attempt is made to
download the dll from the IIS server.

Is there anything I can do to get the application to download dlls as
required from the web server rather than expecting them to be on the
system path?

Jon
 
J

Joe

They must not be real .net functions.

If you did a .net C++ project then they would be
assemblies, if you are having to call them from VB.Net
that way then you really built un-managed C++ dlls and not
C++.Net dlls.

You see it doesn't matter what lang in .Net that you build
a component it. If you compile it and add it as a
reference to your project (of a different lang or same)
then you would just use it.

dim myC as new MyCfunction

So from what I can see you are using unmanaged C++.

In those cases I don't know what to say. Guess it's a bug.

Though I have to wonder why you bothered to do a function
in C++, it isn't like you couldn't do it in VB.Net.

Joe
 
D

Dmitriy Lapshin [C# / .NET MVP]

Jon,

I assume your C++ dlls are not managed ones (from the syntax you use to call
them from VB .NET code). I doubt if the framework can automatically download
unmanaged DLLs on demand. Why wouldn't you migrate to completely managed
application? Ok, if this is out of the question, you could force your
application to download any unmanaged DLLs by itself first time it starts.
 
S

Stephen

Catch the exception as it is thrown and use WebClient.Download to get it,
then retry whatever threw the exception.
 

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