<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eduard-Marius Dragomir wrote:
<blockquote cite="mid:181716.22787.qm@web62112.mail.re1.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Functia
GetEnvironmentVariable are unul dintre parametri de tipul LPSTR, care,
dupa<br>
cate am inteles, este un TCHAR. Daca aloc memorie cu malloc folsind
TCHAR sau char<br>
ca tip de baza primesc caractere ciudate cand apelez functia. Daca nu
aloc memorie,<br>
merge doar cand apelez functia mea recursiva ce contine
GetEnvironmentVariable o<br>
singura data si afiseaza ce trebuie. La mai multe apeluri recursive,
crapa....help...<br>
</div>
</div>
<br>
</blockquote>
LPSTR este un Long Pointer to String<br>
adica daca vrei sa aloci folosesti
(LPSTR)malloc(<lungime>*sizeof(CHAR))<br>
In mod normal se folosesc LPTSTR si TCHAR, care sunt variante adaptate
de sistemul de operare la LPSTR/CHAR (normal) sau LPWSTR/WCHAR (Unicode)<br>
Eu cel putin asa am facut<br>
</body>
</html>