[so]GetEnvironmentVariable

Catalin Iacob iacobcatalin at gmail.com
Mon Nov 5 10:25:15 EET 2007


Pentru detalii vezi Unicode in the Windows
API<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_6ort.asp>la
linkul

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_6ort.asp

Dupa cum scrie la FAQ tema 1 puteti folosi CHAR, WCHAR sau TCHAR, totul e sa
le folositi corect.

Catalin

On 11/5/07, Vlad Cananau <vladk2k at gmail.com> wrote:
>
>  Eduard-Marius Dragomir wrote:
>
>  Functia GetEnvironmentVariable are unul dintre parametri de tipul LPSTR,
> care, dupa
> cate am inteles, este un TCHAR. Daca aloc memorie cu malloc folsind TCHAR
> sau char
> ca tip de baza primesc caractere ciudate cand apelez functia. Daca nu aloc
> memorie,
> merge doar cand apelez functia mea recursiva ce contine
> GetEnvironmentVariable o
> singura data si afiseaza ce trebuie. La mai multe apeluri recursive,
> crapa....help...
>
>  LPSTR este un Long Pointer to String
> adica daca vrei sa aloci folosesti (LPSTR)malloc(<lungime>*sizeof(CHAR))
> In mod normal se folosesc LPTSTR si TCHAR, care sunt variante adaptate de
> sistemul de operare la LPSTR/CHAR (normal) sau LPWSTR/WCHAR (Unicode)
> Eu cel putin asa am facut
>
> _______________________________________________
> so mailing list
> so at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20071105/56e42075/attachment.html


More information about the so mailing list