Re: Pass String from Vb.net application to VC++ dll in pocket PC 2003
- From: "Rakesh" <rakeshm@xxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 16:04:58 +0530
I also used wchar_t* instead of char* but facing same problem.
I am stuck at that point please help me..
Regards,
Rakesh
"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:e1Ox4nZJGHA.2040@xxxxxxxxxxxxxxxxxxxxxxx
> 1. CE is Unicode, so use TCHAR macros ow wchat_t, not char
> 2. It is very rare that returning a string from a C/C++ method is a good
> idea. The caller should allocate it and pass it in as a parameter.
>
> -Chris
>
>
> "Rakesh" <rakeshm@xxxxxxxxxxx> wrote in message
> news:ek22x$YJGHA.524@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi All,
> >
> > I have created a win 32 dll using Visual Studio 2005 for Smart device
and
> > using pocket PC 2003 SDK.
> > I am able to call exported function from VB.net and C# application.
> > If i have integer parameters in my function it works fine. But the
problem
> > is that when i pass string parameter it's value is not passing to VC++
dll
> > function.
> > What is the problem?
> >
> > Sample code of dll :
> > char* _stdcall getstring(char* str)
> >
> > {
> >
> > return str;
> >
> >
> > }
> >
> > Sample code of vb.net application
> >
> > Public Declare Function getstring Lib "mydll.dll" (ByVal pstr As String)
> > As
> > String
> >
> > msgbox(getstring("Test String"))
> >
> >
> >
> > When i debug my dll the value of string parameter is "".
> >
> > Please reply me soon.
> >
> > Regards,
> >
> > Rakesh
> >
> >
>
>
.
- Follow-Ups:
- References:
- Prev by Date: Calling WMP Programmatically
- Next by Date: Simple String encryption?
- Previous by thread: Re: Pass String from Vb.net application to VC++ dll in pocket PC 2003
- Next by thread: Re: Pass String from Vb.net application to VC++ dll in pocket PC 2003
- Index(es):
Relevant Pages
|