473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
Nov 22 '05 #1
2 2200
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"b.bardugo" <b.*******@gmail.com> wrote in message
news:7c*************************@posting.google.co m...
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

Nov 22 '05 #2
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)
"b.bardugo" <b.*******@gmail.com> wrote in message
news:7c*************************@posting.google.co m...
| 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
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: _BNC | last post by:
I've been adapting an older unmanaged C++ legacy app to C#---with limited success. The original app made use of an older, but straightforward, C DLL that worked efficiently under the VC++ 6 model....
2
by: b.bardugo | last post by:
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...
0
by: Nick | last post by:
Replying to x-post "Nick" <someone@somewhere.com> wrote in message news:ehLJlC52EHA.1564@TK2MSFTNGP09.phx.gbl... > Hi all, > > Using the .NET fx configuration utility, mscorcfg is it possible...
6
by: George Economos | last post by:
I am trying to display a user control contained within an c++ assembly in internet explorer. When I create an equivalent user control in c#, it displays just fine. Before I get into specifics,...
4
by: | last post by:
I am stuck in a situation and I do believe that this should work, but it doesn't. I have a unmanaged dll, that uses MFC. This works great. Now I recompile the unmanaged dll so it contains...
0
by: Valentin Samko | last post by:
How can one create (or subclass) a WinForms control in managed c++ program? I can inherit from ListView and add all the functionality I need, but then there is no way to add my new control to...
3
by: JoeProgrammer | last post by:
A couple of questions re. managed vs. unmanaged code. 1. I know this depends on the app, but how much faster is unmanaged code vs. managed code? Is there an average figure for this? 2. Is it as...
3
by: Steve | last post by:
I have former VC++ 6.0 application which was ported to .NET. Now we continue to develop this app under VS.NET. The app now contains both managed and unmanaged classes. Now I have a problem with...
6
by: nicolas.hilaire | last post by:
Hi all, i'm not totally clear with some concepts about managed and unmanaged code. I'm asking myself some questions : - i've a MFC app, i want to use the framework dotnet by switching to...
2
by: fillic2002 | last post by:
Hi I have a query related to the VS2005 usercontrol. As i have two different usercontrol in a single master page say uc1 and uc2. Now i am calling a function of uc1 from uc2. what is the best...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.