PC Review


Reply
Thread Tools Rate Thread

C++ to C# Wrapper

 
 
Kuba Florczyk
Guest
Posts: n/a
 
      6th Oct 2003
Hi

How to write method in wrapper for method from C++:

HRESULT Add(WCHAR *wcPath)

???

I've write something like this

int Add(string wcPath)

and it's doesn't work

regards
kuba florczyk


 
Reply With Quote
 
 
 
 
Brian W
Guest
Posts: n/a
 
      6th Oct 2003
How about ...

public class MyWrapper
{
[DllImport("MyDll.dll", SetLastError=true, CharSet=CharSet.Auto)]
public static IntPtr Add(string wcPath);
}

Since, however, this is returning an HRESULT, is this method on a COM
object? If yse you must use COM Interop.

Hope this helps
Brian W



"Kuba Florczyk" <(E-Mail Removed)> wrote in message
news:epna$(E-Mail Removed)...
> Hi
>
> How to write method in wrapper for method from C++:
>
> HRESULT Add(WCHAR *wcPath)
>
> ???
>
> I've write something like this
>
> int Add(string wcPath)
>
> and it's doesn't work
>
> regards
> kuba florczyk
>
>



 
Reply With Quote
 
Kuba Florczyk
Guest
Posts: n/a
 
      7th Oct 2003
Thx. It's work!

kuba florczyk

Użytkownik "Brian W" <brianw@gold_death_2_spam_rush.com> napisał w
wiadomości news:(E-Mail Removed)...
> How about ...
>
> public class MyWrapper
> {
> [DllImport("MyDll.dll", SetLastError=true, CharSet=CharSet.Auto)]
> public static IntPtr Add(string wcPath);
> }
>
> Since, however, this is returning an HRESULT, is this method on a COM
> object? If yse you must use COM Interop.
>
> Hope this helps
> Brian W
>
>
>
> "Kuba Florczyk" <(E-Mail Removed)> wrote in message
> news:epna$(E-Mail Removed)...
> > Hi
> >
> > How to write method in wrapper for method from C++:
> >
> > HRESULT Add(WCHAR *wcPath)
> >
> > ???
> >
> > I've write something like this
> >
> > int Add(string wcPath)
> >
> > and it's doesn't work
> >
> > regards
> > kuba florczyk
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving one managed wrapper class access to the unmanged part of another managed wrapper class mschuck Microsoft VC .NET 1 31st Aug 2006 05:27 PM
Re: C++ Wrapper Tom Shelton Microsoft VB .NET 0 6th Aug 2004 08:14 PM
VB.net/ADO.net ADO Wrapper.... Liddle Feesh Microsoft ADO .NET 2 28th Jun 2004 11:14 PM
C/C++ Wrapper help =?Utf-8?B?QWFyb25T?= Microsoft Dot NET 0 31st May 2004 10:46 PM
ADO Wrapper JB Microsoft ADO .NET 1 5th Sep 2003 07:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:26 AM.