473,503 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL Question.

Joe
Alright after much researching, I've come to the conclusion that I
need to post this here hoping to get a solid answer. I'm looking to
create a DLL that is capable of being used on all platforms that I
mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
hoping to be able to create this DLL via a 2.0 .net class library.
Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project. I know in regular ASP you can create.objects() and in
1.1 you can just add references but I'm always unclear whether or not
this is possible to do with a 2.0 DLL. I seen to always have problems
adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
Can anyone provide a reasonable answer to this question? The ideal
situation i'm looking for is 2.0 coding and then using that in the
other places. Does anyone have a solid answer out there?

Jul 19 '07 #1
11 1201
Does anyone have a solid answer out there?
You need a COM object created with COM solution like VB6 that can be called
from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0 or
lower that works with COM objects.
Jul 19 '07 #2
Joe
On Jul 19, 3:54 pm, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
Does anyone have a solid answer out there?

You need a COM object created with COM solution like VB6 that can be called
from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0 or
lower that works with COM objects.
Ok so does that mean there is no way to create this in a .NET 2.0
framework project and then be used all over like you say with a COM
solution? Are you saying the only way to do this, would be to use VB6
or just create a COM like the way VB6 does? Thanks for any additional
information

Jul 20 '07 #3
Joe wrote:
I'm looking to create a DLL that is capable of being used on all
platforms that I mentioned in my subject (1.1 framework,
2.0 framework, old ASP) I'm hoping to be able to create this DLL
via a 2.0 .net class library.
Then you're out of luck.

A COM application (ASP) can load Fx2.0 assemblies.
So can an Fx2.0 application.
But an Fx1.1 application /will not/ load an Fx2.0 assembly.
Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project.
Then you're going to /have/ to build it in Fx1.1.
Both FX1.1 and Fx2.0 applications will be able to load it.
Getting it to work from ASP may be more of an issue, because
Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
Frameworks installed on the host. COM will always try to load the
/latest/ one (Fx2.0) even though you /may/ not want it to.
I seen to always have problems adding a reference to a DLL in 1.1
when the DLL was created in 2.0.
That's an understatement - it is simply not possible (AFAIK).

HTH,
Phill W.
Jul 20 '07 #4
joe
>
Then you're out of luck.

A COM application (ASP) can load Fx2.0 assemblies.
So can an Fx2.0 application.
But an Fx1.1 application /will not/ load an Fx2.0 assembly.
Then you're going to /have/ to build it in Fx1.1.
Both FX1.1 and Fx2.0 applications will be able to load it.
Getting it to work from ASP may be more of an issue, because
Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
Frameworks installed on the host. COM will always try to load the
/latest/ one (Fx2.0) even though you /may/ not want it to.
Phill,
So are you saying that I can use VB6, and inside VB6 load up a 2.0fx
DLL and have access to all its methods and properties? Then from there
once I create the COM object via VB6 (with my 2.0 DLL being used) I would
be able to load that COM DLL into 1.1 and use accordingly? For a little
clarification, I have a DLL written in 2.0 that I need to be able to use in
1.1 and in ASP3.0. Would the above allow me to do this? Just looking for
a little clarification :)

Thanks
Jul 20 '07 #5
your have 4 options:

1) a com object built with an unmanaged language
2) a com object built with .net 1.1
3) a com object built with .net 2.0 but hosted by com+ (dcom)
4) a .net 2.0 webservice
-- bruce (sqlwork.com)

Joe wrote:
Alright after much researching, I've come to the conclusion that I
need to post this here hoping to get a solid answer. I'm looking to
create a DLL that is capable of being used on all platforms that I
mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
hoping to be able to create this DLL via a 2.0 .net class library.
Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project. I know in regular ASP you can create.objects() and in
1.1 you can just add references but I'm always unclear whether or not
this is possible to do with a 2.0 DLL. I seen to always have problems
adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
Can anyone provide a reasonable answer to this question? The ideal
situation i'm looking for is 2.0 coding and then using that in the
other places. Does anyone have a solid answer out there?
Jul 20 '07 #6
My guess the best solution here is to create COM object in regular VB or C++
and then create 2 wrappers, one for .NET 1.1 and another for .NET 2.0

George.

"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-kwrote in message
news:f7**********@south.jnrs.ja.net...
Joe wrote:
>I'm looking to create a DLL that is capable of being used on all
platforms that I mentioned in my subject (1.1 framework,
2.0 framework, old ASP) I'm hoping to be able to create this DLL
via a 2.0 .net class library.

Then you're out of luck.

A COM application (ASP) can load Fx2.0 assemblies.
So can an Fx2.0 application.
But an Fx1.1 application /will not/ load an Fx2.0 assembly.
>Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project.

Then you're going to /have/ to build it in Fx1.1.
Both FX1.1 and Fx2.0 applications will be able to load it.
Getting it to work from ASP may be more of an issue, because Inter-Op'ing
from COM to .Net gets "tricky" when you have multiple Frameworks installed
on the host. COM will always try to load the /latest/ one (Fx2.0) even
though you /may/ not want it to.
>I seen to always have problems adding a reference to a DLL in 1.1
when the DLL was created in 2.0.

That's an understatement - it is simply not possible (AFAIK).

HTH,
Phill W.

Jul 20 '07 #7
joe
bruce barker <no****@nospam.comwrote in news:#c4gtFuyHHA.1212
@TK2MSFTNGP05.phx.gbl:
3) a com object built with .net 2.0 but hosted by com+ (dcom)

Would this option allow me to use the 2.0 COM hosted by com+ DLL in 1.1 /
ASP / 2.0 by doing what you explain here?
Jul 20 '07 #8

"Joe" <et*******@gmail.comwrote in message
news:11**********************@e16g2000pri.googlegr oups.com...
On Jul 19, 3:54 pm, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
Does anyone have a solid answer out there?

You need a COM object created with COM solution like VB6 that can be
called
from a .NET solution like ASP.NET or other .NET solutions and by ASP 3.0
or
lower that works with COM objects.

Ok so does that mean there is no way to create this in a .NET 2.0
framework project and then be used all over like you say with a COM
solution? Are you saying the only way to do this, would be to use VB6
or just create a COM like the way VB6 does? Thanks for any additional
information
The replacement for COM commincations in .NET is .NET Remoting. You cannot
make a COM object in .NET. However, .NET can interface with a COM object.

http://msdn.microsoft.com/msdnmag/issues/01/08/interop/
http://j-integra.intrinsyc.com/suppo...ng_primer.html

ASP 3.0 and lower are not .Net solutions. You want to make a COM object,
then you need to be using a COM solution to develop it. VB 6 is where you
can code and make a COM object or DLL

Jul 20 '07 #9
The short answer is Yes, you can create the DLL in VS 2005 (2.0 framework)
and call into it from all of the platforms you mention.

You can't reference a 2.0 assembly directly from VS 2003 or ASP, but you can
get to it through COM interop. If you're programming in VB, just navigate
to My Project in Solution Explorer, select the Application tab, click on
Assembly Information, and check "Make assembly COM-visible". I've never
needed to do this, so I've never played with it myself. I think that's all
there is to it, but I'm sure someone else can correct me if I've missed
something...

- Bob

"Joe" <et*******@gmail.comwrote in message
news:11********************@x40g2000prg.googlegrou ps.com...
Alright after much researching, I've come to the conclusion that I
need to post this here hoping to get a solid answer. I'm looking to
create a DLL that is capable of being used on all platforms that I
mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
hoping to be able to create this DLL via a 2.0 .net class library.
Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project. I know in regular ASP you can create.objects() and in
1.1 you can just add references but I'm always unclear whether or not
this is possible to do with a 2.0 DLL. I seen to always have problems
adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
Can anyone provide a reasonable answer to this question? The ideal
situation i'm looking for is 2.0 coding and then using that in the
other places. Does anyone have a solid answer out there?

Jul 20 '07 #10

I thought once the same as you but in practice

As soon as you try to reference the the 2.0 ( COM ) object in VS.Net <
2005 ( 2002 , 2003 ) you wil receive an error as the assembly type is
unknown
so the short answer is No :-(

However the other way around is no problem 2002 , 2003 in 2005 ,also in VB6
and classic Asp it wil work however ofcourse the framework should be
installed and the assembly must be com registred with Regasm
as small copy paste example i once showed in this newsgroup

http://groups.google.com/group/micro...996d74d250974e
this was actually a snip from a project i had these days and it run in very
COM capable language ( tested in Delphi , VB6 , C++ and yes even in Clipper
:-)

regards

Michel


"Bob Altman" <rd*@nospam.nospamschreef in bericht
news:uy**************@TK2MSFTNGP06.phx.gbl...
The short answer is Yes, you can create the DLL in VS 2005 (2.0 framework)
and call into it from all of the platforms you mention.

You can't reference a 2.0 assembly directly from VS 2003 or ASP, but you
can get to it through COM interop. If you're programming in VB, just
navigate to My Project in Solution Explorer, select the Application tab,
click on Assembly Information, and check "Make assembly COM-visible".
I've never needed to do this, so I've never played with it myself. I
think that's all there is to it, but I'm sure someone else can correct me
if I've missed something...

- Bob

"Joe" <et*******@gmail.comwrote in message
news:11********************@x40g2000prg.googlegrou ps.com...
>Alright after much researching, I've come to the conclusion that I
need to post this here hoping to get a solid answer. I'm looking to
create a DLL that is capable of being used on all platforms that I
mentioned in my subject (1.1 framework, 2.0 framework, old ASP) I'm
hoping to be able to create this DLL via a 2.0 .net class library.
Once its created I want the ability to reference this DLL along with
all its methods and properties in both 1.1 .NET projects and an old
ASP project. I know in regular ASP you can create.objects() and in
1.1 you can just add references but I'm always unclear whether or not
this is possible to do with a 2.0 DLL. I seen to always have problems
adding a reference to a DLL in 1.1 when the DLL was created in 2.0.
Can anyone provide a reasonable answer to this question? The ideal
situation i'm looking for is 2.0 coding and then using that in the
other places. Does anyone have a solid answer out there?


Jul 22 '07 #11
joe wrote:
>Then you're out of luck.

A COM application (ASP) can load Fx2.0 assemblies.
So can an Fx2.0 application.
But an Fx1.1 application /will not/ load an Fx2.0 assembly.
Then you're going to /have/ to build it in Fx1.1.
Both FX1.1 and Fx2.0 applications will be able to load it.
Getting it to work from ASP may be more of an issue, because
Inter-Op'ing from COM to .Net gets "tricky" when you have multiple
Frameworks installed on the host. COM will always try to load the
/latest/ one (Fx2.0) even though you /may/ not want it to.
So are you saying that I can use VB6, and inside VB6 load up a 2.0fx
DLL and have access to all its methods and properties?
Assuming the Fx2.0 Dll is exposed to COM, yes.
Then from there once I create the COM object via VB6 (with my 2.0 DLL
being used) I would be able to load that COM DLL into 1.1 and use
accordingly?
Maybe. Maybe not.

Your 1.1 process would load the 1.1 runtime, then go out into COM world
to load your VB6 Dll, and from there [try to] load the 2.0 Dll.
I /think/ that's where it would fall down, because you'd be loading a
second version of the runtime into the same process and I don't /think/
that will work.
For a little clarification, I have a DLL written in 2.0 that I need to be
able to use in 1.1 and in ASP3.0.
Would the above allow me to do this?
Just looking for a little clarification :)
Try it! And let us know how you get on ...

Regards,
Phill W.
Jul 24 '07 #12

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

Similar topics

1
3083
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
3
4996
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
2628
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
3057
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
3389
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
3682
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
53
4020
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
4695
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
4252
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
2538
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.