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 / Interop / September 2004

Tip: Looking for answers? Try searching our database.

XP visual style problem (bug?) when COM dll used in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Asko Telinen - 12 Sep 2004 19:37 GMT
Hi all.

I have a following problem.

I wrote a ATL dll using VC 6.0, which is kinda interface to the
database. In this dll, i got a selection dialog, which is whown to the
user by calling method, called "SelectProject". I tested the dll in vb6
(and even Notes 6.0) and it works just fine.
Now, in .NET (normal C# windows application), i imported this dll
normally by adding the reference to the project, which generated the
interop dll. BUT, the application crashes absolutely randomly when
windows xp visual styles are used in C# application
(EnableVisualStyles()) and the dialog from that activex dll is shown. I
mean randomly, cause i coudn´t find any rational pattern to reproduce
the error. Sometimes it crashes when trying to resize listview
columns(placed on dialog), sometimes when resizing dialog itself. Every
time the exception source is that generated interop.dll. Without visual
styles everithing works normally.

CAn anyone lead me to right direction or it´s just a bug in .NET
implementation (interop.dll generation) ?

thanx for advance.

Asko tTelinen
Wang Jie - 15 Sep 2004 06:37 GMT
I'm not sure if it will work, but just try: do not use EnableVisualStyles(),
write a .manifest file for you exe instead (which points to v6 of
comctl32.dll).

I have noticed slight difference in app UI between EnableVisualStyles() and
manifest before.

> Hi all.
>
[quoted text clipped - 21 lines]
>
> Asko tTelinen

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.