Knowledge Base Article (814472) - Need clarification

  • Thread starter Thread starter Sai Kit Tong
  • Start date Start date
S

Sai Kit Tong

In the article, the description for
"Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports
or
Managed Entry Points"
suggests the creation of the class ManagedWrapper.

If I need to build multiple mixed mode dll's used by a consumer application,
do I have to implement multiple ManagedWrapper's (each embedded in
indiviudal DLL project) and call all of them in my consumer application?
 
Hi Sai Kit,

Thanks for you posting in this group!

Based on my understanding to the KB paragraph "Modify DLL That Contains
Consumers That Use Managed Code and DLL Exports or Managed Entry Points",
it is talked about the consumer *in* the DLL, not the cunsumer *to* the
DLL. so I think you can call the Dll in the general way in your application
if it is not a consumer in the DLL.

If I have misunderstood your concerns, please feel free to reply this
message.


Best Regards!
Gary Chang
Microsoft Online Partner Support
Get Secure! – www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
| From: "Sai Kit Tong" <[email protected]>
| Subject: Knowledge Base Article (814472) - Need clarification
| Date: Thu, 30 Oct 2003 10:04:50 -0600
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <ulwEO#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vc
| NNTP-Posting-Host: 130.99.229.109
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29890
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| In the article, the description for
| "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports
| or
| Managed Entry Points"
| suggests the creation of the class ManagedWrapper.
|
| If I need to build multiple mixed mode dll's used by a consumer
application,
| do I have to implement multiple ManagedWrapper's (each embedded in
| indiviudal DLL project) and call all of them in my consumer application?
|
|
|
 
Hi Gary,

I am not concerning about the invocation of the dll functions. Instead, I am
looking at the ManagerWrapper class which provides static functions to
initialize/terminate C runtime (CRT). Since I have multiple Mixed Mode
projects, do I have to create mulitple ManagerWrappers (probably with
different namespace) for all projects in order to initiate static variables
for each individual mixed mode DLL?

Thanks.

Sai Kit
 
Hi Sai Kit,

Thanks for your quick response!

Based on the KB, if your mixed mode DLL is created as Managed Extensions
for C++ project, I think you should provided ManagerWrappers class for it.


Best regards!

Gary Chang
Microsoft Online Partner Support

Get Secure! – www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
| From: "Sai Kit Tong" <[email protected]>
| References: <ulwEO#[email protected]>
<[email protected]>
| Subject: Re: Knowledge Base Article (814472) - Need clarification
| Date: Fri, 31 Oct 2003 08:30:26 -0600
| Lines: 68
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vc
| NNTP-Posting-Host: 169.10.179.110
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29917
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| Hi Gary,
|
| I am not concerning about the invocation of the dll functions. Instead, I
am
| looking at the ManagerWrapper class which provides static functions to
| initialize/terminate C runtime (CRT). Since I have multiple Mixed Mode
| projects, do I have to create mulitple ManagerWrappers (probably with
| different namespace) for all projects in order to initiate static
variables
| for each individual mixed mode DLL?
|
| Thanks.
|
| Sai Kit
|
| | > Hi Sai Kit,
| >
| > Thanks for you posting in this group!
| >
| > Based on my understanding to the KB paragraph "Modify DLL That Contains
| > Consumers That Use Managed Code and DLL Exports or Managed Entry
Points",
| > it is talked about the consumer *in* the DLL, not the cunsumer *to* the
| > DLL. so I think you can call the Dll in the general way in your
| application
| > if it is not a consumer in the DLL.
| >
| > If I have misunderstood your concerns, please feel free to reply this
| > message.
| >
| >
| > Best Regards!
| > Gary Chang
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "AS IS" with no warranties,and confers no
rights.
| > --------------------
| > | From: "Sai Kit Tong" <[email protected]>
| > | Subject: Knowledge Base Article (814472) - Need clarification
| > | Date: Thu, 30 Oct 2003 10:04:50 -0600
| > | Lines: 11
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <ulwEO#[email protected]>
| > | Newsgroups: microsoft.public.dotnet.languages.vc
| > | NNTP-Posting-Host: 130.99.229.109
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29890
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vc
| > |
| > | In the article, the description for
| > | "Modiy DLL That Contains Consumers That Use Managed Code and DLL
| Exports
| > | or
| > | Managed Entry Points"
| > | suggests the creation of the class ManagedWrapper.
| > |
| > | If I need to build multiple mixed mode dll's used by a consumer
| > application,
| > | do I have to implement multiple ManagedWrapper's (each embedded in
| > | indiviudal DLL project) and call all of them in my consumer
application?
| > |
| > |
| > |
| >
|
|
|
 
Dear Gary,

I believe that you still miss on what I am asking. I know that I need to
provide ManagerWrapper for a mixed DLL. My question was on the number of
ManagerWrappers that I needed to provide and call . For example, if I have10
separate mixed Dll projects, do I need to provide 10 ManagerWrappers
(different names or namespaces) and do my client application need to call
all of them during initialization and termination?
 
Each dll needs it's own initialization of crt. So yes you have to expose
init/term methods for each dll.
 
Hi Sai Kit,

Thanks for your response,

With your example, I hope I can grasp your meaning this time:-)

The ManagerWrapper class(described in the KB) is only for initialization
and termination the CRT for the DLL use.

Hence to your situatuion, I think you can provide one ManagerWrapper class
to one of your mixed mode DLLs(if you implement these ManagerWrapper
classes in each DLL, I think you should put it in its individual
namespace), and call the ManagedWrapper::minitialize() firstly before you
use any of the Dll functions.


Best regards!

Gary Chang
Microsoft Online Partner Support

Get Secure! – www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
| From: "Sai Kit Tong" <[email protected]>
| References: <ulwEO#[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
| Subject: Re: Knowledge Base Article (814472) - Need clarification
| Date: Mon, 3 Nov 2003 08:21:55 -0600
| Lines: 129
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vc
| NNTP-Posting-Host: 130.99.229.109
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29965
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| Dear Gary,
|
| I believe that you still miss on what I am asking. I know that I need to
| provide ManagerWrapper for a mixed DLL. My question was on the number of
| ManagerWrappers that I needed to provide and call . For example, if I
have10
| separate mixed Dll projects, do I need to provide 10 ManagerWrappers
| (different names or namespaces) and do my client application need to call
| all of them during initialization and termination?
|
|
|
|
| | > Hi Sai Kit,
| >
| > Thanks for your quick response!
| >
| > Based on the KB, if your mixed mode DLL is created as Managed Extensions
| > for C++ project, I think you should provided ManagerWrappers class for
| it.
| >
| >
| > Best regards!
| >
| > Gary Chang
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "AS IS" with no warranties,and confers no
rights.
| > --------------------
| > | From: "Sai Kit Tong" <[email protected]>
| > | References: <ulwEO#[email protected]>
| > <[email protected]>
| > | Subject: Re: Knowledge Base Article (814472) - Need clarification
| > | Date: Fri, 31 Oct 2003 08:30:26 -0600
| > | Lines: 68
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#[email protected]>
| > | Newsgroups: microsoft.public.dotnet.languages.vc
| > | NNTP-Posting-Host: 169.10.179.110
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29917
| > | X-Tomcat-NG: microsoft.public.dotnet.languages.vc
| > |
| > | Hi Gary,
| > |
| > | I am not concerning about the invocation of the dll functions.
Instead,
| I
| > am
| > | looking at the ManagerWrapper class which provides static functions to
| > | initialize/terminate C runtime (CRT). Since I have multiple Mixed Mode
| > | projects, do I have to create mulitple ManagerWrappers (probably with
| > | different namespace) for all projects in order to initiate static
| > variables
| > | for each individual mixed mode DLL?
| > |
| > | Thanks.
| > |
| > | Sai Kit
| > |
| > | | > | > Hi Sai Kit,
| > | >
| > | > Thanks for you posting in this group!
| > | >
| > | > Based on my understanding to the KB paragraph "Modify DLL That
| Contains
| > | > Consumers That Use Managed Code and DLL Exports or Managed Entry
| > Points",
| > | > it is talked about the consumer *in* the DLL, not the cunsumer *to*
| the
| > | > DLL. so I think you can call the Dll in the general way in your
| > | application
| > | > if it is not a consumer in the DLL.
| > | >
| > | > If I have misunderstood your concerns, please feel free to reply
this
| > | > message.
| > | >
| > | >
| > | > Best Regards!
| > | > Gary Chang
| > | > Microsoft Online Partner Support
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "AS IS" with no warranties,and confers no
| > rights.
| > | > --------------------
| > | > | From: "Sai Kit Tong" <[email protected]>
| > | > | Subject: Knowledge Base Article (814472) - Need clarification
| > | > | Date: Thu, 30 Oct 2003 10:04:50 -0600
| > | > | Lines: 11
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | > | Message-ID: <ulwEO#[email protected]>
| > | > | Newsgroups: microsoft.public.dotnet.languages.vc
| > | > | NNTP-Posting-Host: 130.99.229.109
| > | > | Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > | > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.vc:29890
| > | > | X-Tomcat-NG: microsoft.public.dotnet.languages.vc
| > | > |
| > | > | In the article, the description for
| > | > | "Modiy DLL That Contains Consumers That Use Managed Code and DLL
| > | Exports
| > | > | or
| > | > | Managed Entry Points"
| > | > | suggests the creation of the class ManagedWrapper.
| > | > |
| > | > | If I need to build multiple mixed mode dll's used by a consumer
| > | > application,
| > | > | do I have to implement multiple ManagedWrapper's (each embedded in
| > | > | indiviudal DLL project) and call all of them in my consumer
| > application?
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 
Back
Top