Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Warning messages in Tlbimp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Dent - 22 Jul 2005 19:26 GMT
Hi,

The COM+ Services type library (comsvcs.dll) strangely enough does not come
with a primary interop. I need to use it in an assembly of mine that is
signed, and it would not let me add it as a reference because the interop
file that VS.NET 2003 produces is not strong named.

Therefore, I am forced to create the signed interop assembly myself.

I am using Tlbimp as follows:

>tlbimp c:\windows\system32\comsvcs.dll /out:Interop.Comsvcs.dll /namespace:C
OMSVCSLib /keyfile:"C:\Program Files\Exactus\llave.snk"

This (and other simpler command lines) gives me a lot of warnings of the type:

-------------
TlbImp warning: At least one of the arguments for
'ISecurityProperty.ReleaseSID'
can not be marshaled by the runtime marshaler.  Such arguments will
therefore b
e passed as a pointer and may require unsafe code to manipulate.
TlbImp warning: The type library importer could not convert the signature
for th
e member 'tagBLOB.pBlobData'.
--------------

Can I safely ignore this?
Is there a primary interop assembly for COMSVCS.DLL?

Signature

Thanks in advance,

Juan Dent, M.Sc.

"Peter Huang" [MSFT] - 23 Jul 2005 05:33 GMT
Hi

Microsoft does not ship a PIA for ComSvcs.DLL as the ComSvcs TypeLib has
been superseded by the System.EnterpriseServices namespace for managed code.

I think it's just warning you that the Interop marshaller doesn't know what
your are passing in the ptr.  It could be a ptr to an array, a ptr to a
byte, or a ptr to anything else, so you get no compile-time type safety.

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Juan Dent - 24 Jul 2005 00:08 GMT
Okay. However, COMSVCS.dll had an object TransactionContextEx that is useful
for creating a generic object thay begins a transaction, allowing, I quote
MSDN:

"A non-transactional client uses this class to begin a transaction. Using
the methods of this class, the client can call additional COM objects that,
if configured to participate in a transaction, run within the transaction
boundary of the transaction context object. Based on its business logic, the
client can explicitly commit or abort the transaction."

I have three two questions about this:
1) in System.EnterpriseServices, how can we accomplish the same without the
unmanaged comsvcs.dll? Perhaps with System.EnterpriseServices.Activity?

2) What does the following remark in MSDN help for TransactionContextEx
imply? That it is better to use serviced components?

"Note   The TransactionContextEx class limits reuse of the business logic
driving the transaction. For this reason, it is recommended that objects
instantiated from the TransactionContextEx class be used sparingly"

3) Which book do you recommend as the most up to date and comprehensive one
on the topic of EnterpriseServices?

Signature

Thanks in advance,

Juan Dent, M.Sc.

> Hi
>
[quoted text clipped - 12 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 26 Jul 2005 07:34 GMT
Hi

I think in .NET we use the attribute to enable Transaction.
TransactionAttribute Members
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystementerpriseservicestransactionattributememberstopic.asp

We use the TransactionOption as below to control whether the component will
be in a transaction.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystementerpriseservicestransactionoptionclasstopic.asp

Disabled Ignores any transaction in the current context.
NotSupported Creates the component in a context with no governing
transaction.
Required Shares a transaction, if one exists, and creates a new
transaction, if necessary.
RequiresNew Creates the component with a new transaction, regardless of the
state of the current context.
Supported Shares a transaction, if one exists.

If you do want to manually control the transantion, you may try to take a
look at the ContextUtil Class which has the SetAbort  and SetComplete
method and Transaction property.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystementerpriseservicescontextutilmemberstopic.asp

So far for book about .NET COM+, but you may try to take a look at the
books below.
Transactional COM+: Building Scalable Applications
by Tim Ewald
COM and .NET Component Services (O'Reilly Windows) by Juval L?wy

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Juan Dent - 26 Jul 2005 17:40 GMT
Thank you for your help Peter. Actually you have been helping me a lot in the
last weeks around COM+ issues. I appreciate this effort!

Seems my questions have now changed in nature (from the original "Warning
messages in Tlbimp" to the current "Using COM+ through EnterpriseServices",
why don't we open another "thread" with that topic and conclude this own
which has been well answered by you?

Signature

Thanks in advance,

Juan Dent, M.Sc.

> Hi
>
[quoted text clipped - 36 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 27 Jul 2005 08:28 GMT
Hi Juan,

Thanks for your quickly reply!
I have seen your new post and follow up there.
If you still have any concern, we can discuss in that thread.

Thanks!

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Juan Dent - 24 Jul 2005 01:37 GMT
Actually, I have been experimenting around. I can narrow my question to the
following:

In an article in MSDN Magazine (
<http://msdn.microsoft.com/msdnmag/issues/02/04/COMXP/default.aspx>) they
mention the Activity as a context that can survive many calls. This could
perhaps replace the TransactionContextEx object in supplying a unique context
in which to perform all database operations. Nevertheless how can I get a
transaction from an activity, so that I can later call commit or abort?

Signature

Thanks in advance,

Juan Dent, M.Sc.

> Hi
>
[quoted text clipped - 12 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.