Calling user control from VBScript (managed and un-managed)

B

b.bardugo

Hi all,
I have a C# user control (a little app I made to display video). In
this code I am using a third party .dll, which is written in C++
(un-managed). I am tring to put this control on a web page and somehow
the managed code is working OK but when it arrives the part of the
code where it is calling the un-managed .dll it gets an exception (it
can't find the dll).
Is it a security problem? if it is what do I do to solve it?
Is it a code problem should I write something special for that?

10x in advance
Bardugo
 
N

Nicholas Paldino [.NET/C# MVP]

Bardugo,

If you don't have the third party DLL installed correctly on the client
side, then the calls will fail. Just having the managed code and the
wrappers is not enough, you must have the unamanged code installed as well.

Hope this helps.
 
B

bruce barker

there are security issues and location issues.

1) unless the C++ dll is a registered com component then the dll must be in
the search path, i.e. installed in the window's directory.

2) the user control will not download the c++ dll, so it must be installed
separately. you must buld an install package for the c++ dll that can be
downloaded.

3) by default a user control running in the browser can not call unmanaged
code. so you must strongly sign your user control, and get the user to mark
it trusted. you could do this in the above install package.

-- bruce (sqlwork.com)


| Hi all,
| I have a C# user control (a little app I made to display video). In
| this code I am using a third party .dll, which is written in C++
| (un-managed). I am tring to put this control on a web page and somehow
| the managed code is working OK but when it arrives the part of the
| code where it is calling the un-managed .dll it gets an exception (it
| can't find the dll).
| Is it a security problem? if it is what do I do to solve it?
| Is it a code problem should I write something special for that?
|
| 10x in advance
| Bardugo
 

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