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 / August 2005

Tip: Looking for answers? Try searching our database.

Warning: Type library exporter could not find the type library for

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Dent - 25 Aug 2005 18:49 GMT
Hi,

An interface I have returns System.EnterpriseServices.ITransaction and works
ok from .NET, however when trying to export it to COM, I get this error
message:

--------------
Type library exporter warning processing
'SessionMgrLibNET.ISessionManagerNET.GetDTCTransaction(#0),
SessionMgrLibNET'.  Warning: Type library exporter could not find the type
library for System.EnterpriseServices.ITransaction.  IUnknown was substituted
for the interface.
------------

I tried to adjust the interface by writing:

------------
public interface ISessionManagerNET
{
[return: MarshalAs(UnmanagedType.Interface)] ITransaction GetDTCTransaction(
SessionManager.SessionDBConnectionType dbType );
}
------------

to no avail.

ITransaction is a public interface in the System.EnterpriseServices
namespace and I have even found its GUID. Why can't the type library marshal
it while it is able to marshal so many others?

Signature

Thanks in advance,

Juan Dent, M.Sc.

"Peter Huang" [MSFT] - 26 Aug 2005 08:10 GMT
Hi

I think this is because the ITransaction is a managed interface, it has no
a TypeLib definition according to it. So in the COM world, it have no
information to convert it into a proper Type Library definition, so it use
the IUnknown instead, because the IUnknown is the base interface for all
the Interface.

In the MSDN, the ITransaction is considered as a IUnknown which is now
exposed as IUnknown.

[Guid("0FB15084-AF41-11CE-BD2B-204C4F4F5020")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ITransaction

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.


Rate this thread:







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.