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++ / October 2004

Tip: Looking for answers? Try searching our database.

question about System.String, CString, PCSTR, etc, etc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveK - 01 Oct 2004 21:36 GMT
Trying to wrap an unmanaged class.
Here is the function I'm trying to wrap:
bool Init(PCSTR filename, PCSTR username, PCSTR password, PCSTR working);

In my managed C++ class, I have a method like this:
bool CSUSSWrapper::Init(String* filename, String* username, String*
password, String* working)

{

     CString _filename(filename);

     CString _username(username);

     CString _password(password);

     CString _working(working);

     return m_objSourceSafe.Init((PCSTR)_filename, (PCSTR)_username,
(PCSTR)_password, (PCSTR)_working);

}

Now that seems really ugly and probably not necessary.  It compiles and it
works, but it's UGLY.  Is there a cleaner way?

THanks,
Steve
SteveK - 01 Oct 2004 22:08 GMT
actually this doesn't work  ;(

> Trying to wrap an unmanaged class.
> Here is the function I'm trying to wrap:
[quoted text clipped - 24 lines]
> THanks,
> Steve

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.