CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How to pass pointer to string character

    I need to pass a pointer to a null-terminated string in the LPARAM of a SendMessage(...). I'm trying to do that
    on Windows NT using UNICODE. I've tried several way, but without any success. Here is an example of what I'm
    trying to do:

    LPTSTR lpText = TEXT("\\My Documents\\Test.wav");
    ::SendMessage (hwndVoice, VRM_RECORD, NULL, (LPARAM)(LPCTSTR)lpText);


    What is wrong with that??



    Thanks
    Frank



  2. #2
    Join Date
    Apr 1999
    Posts
    90

    Re: How to pass pointer to string character

    What's the problem you are having?

    With what I see, I wouldn't save the pointer being passed for future use in the function that receives the message because it may go out of scope.



  3. #3
    Guest

    Re: How to pass pointer to string character

    I'm trying to send a filename to the Voice Control in WindowsCE. The only way, as the documentation says, is
    to pass a pointer to a null-terminated string in the SendMessage. I'm not sure if the example I write before is correct,
    but the control doesn't save my wav file in the filename I've specified.

    An example showing how to pass a pointer to null-terminated string would be appriciated. I'm a newbie in passing pointer
    to functions!

    Thanks.
    Frank


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured