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 / Languages / Managed C++ / December 2006

Tip: Looking for answers? Try searching our database.

class library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 01 Dec 2006 12:38 GMT
hi,
I wrote class library that contain a struct stX and a new class library that
get the first class library as referance and implement a function foo that
one of its parametrs is of type of the struct stX;

I wrote an application(exe) that get the first class library as a referance
and have a member of type stX and have a referance of the second class
library and caled to its function foo.

The problem is when i pass the exe member of type stX to the class library
the compiler thinks it a diffrent type of the type the function foo needs
why???

Can i share types between dll and exe in diffrent way???

Thanks
Bruno van Dooren [MVP VC++] - 03 Dec 2006 09:58 GMT
> I wrote class library that contain a struct stX and a new class library
> that get the first class library as referance and implement a function foo
[quoted text clipped - 7 lines]
> the compiler thinks it a diffrent type of the type the function foo needs
> why???

Hi,
First of all, you should show us the code and the exact error message.
Without those we are down to guessing.
If you exe has the DLL in its references, it can use all the types that are
public in the DLL.

I am not sure I understand your question correctly.
Do you mean that you have another declaration of stX in your exe?
Because in that case, you have a definition of stX in your DLL, and one in
your exe.
And they are indeed not that same.

Signature

Kind regards,
   Bruno van Dooren
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


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.