public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with CharLower function
@ 1997-10-28 18:40 Andrey I. Iliev
  0 siblings, 0 replies; only message in thread
From: Andrey I. Iliev @ 1997-10-28 18:40 UTC (permalink / raw)
  To: gnu-win32

Hi,
I have a problem with CharLower function. Here is the test code:

#include <windows.h>
#include <Windows32/Functions.h>
#include <stdio.h>
int main(int ac, char **av)
{
    LPTSTR ptr;
    LPSTR str1="QWERTY";
    LPSTR str2="qwerty";
    DWORD nBytes=1;
  printf("This is the original string: %s\n",str1);
  ptr=CharLower(str1);
  printf("This is the converted string: %s   %s\n",str1,ptr);
  printf("It shoud be equal to: %s\n",str2);
    if ( (nBytes=CharLowerBuff(str1,(DWORD)6)) != 6 )
    {
        printf("Error on CharLowBuff(), converted %i\n",nBytes);
    }
  printf("After CharLowerBuff: %s\n",str1);
    
}

Compile:
gcc -o test.exe test.c -dWIN32 -luser32

Running test.exe gives:

This is the original string: QWERTY
This is the converted string: QWERTY   (null)
It shoud be equal to: qwerty
Error on CharLowBuff(), converted 0

Does anybody know what is going on?

Iliev Andrei







-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-10-28 18:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-28 18:40 Problem with CharLower function Andrey I. Iliev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).