Re: Pass String from Vb.net application to VC++ dll in pocket PC 2003



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
> >
> >
>
>


.



Relevant Pages

  • Re: help needed with filnames as command line arguments
    ... Tested on Bloodshed gcc and Cygwins gcc also in case you're ... 003 int printargstuff(int aa, char *bb); ... Regards ...
    (comp.lang.c)
  • Re: Is this kosher?
    ... Now I'm a little wiser. ... Best regards, ... char *eol ... Mental decryption required to bamboozle spam robots: ...
    (comp.lang.c)
  • Re: Simple Question (insert new line)
    ... in VBA, it is CHR, not CHAR ... Regards, ... Tom Ogilvy ...
    (microsoft.public.excel.programming)
  • Re: Sql Query
    ... Regards, ... Rob Panosh ... > difficult sql query question. ... > char from the field field differ and the 3th char from the field field ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Vector
    ... "Rakesh" wrote in message ... That's not a vector of char *. ... Why do you care? ... what aspects of memory allocation are you asking ...
    (comp.lang.cpp)