<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: James Hawkins &lt;truiken@gmail.com&gt;<br>To: Louis. Lenders &lt;xerox_xerox2000@yahoo.co.uk&gt;<br>Cc: wine-devel@winehq.org<br>Sent: Thursday, 21 August, 2008 3:55:07 PM<br>Subject: Re: kernel32: Tiny improvement to the GetVolumePathNameW stub (try 4)<br><br><br><br>&gt;That whole paragraphs reads "hack now, fix later", which is definitely<br>&gt;not acceptable.<br><br>Well, I would call it a "semi-stub", there's more of them scattered all over the wine-source. But&nbsp; if opinions are it's too hackish, that's fine with me, I was only trying to help a user to get an app running
 <br><br>&gt;<br>&gt; +&nbsp; &nbsp; {<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp;  lstrcpynW(volumepathname,filename,4);<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp;  return TRUE;<br>&gt; +&nbsp; &nbsp; }<br>&gt;<br>&gt;<br>&gt;&gt;Also, you're copying 4 bytes of filename into volumepathname.&nbsp; I don't<br>&gt;&gt;think you understand what lstrcpyn does.&nbsp; Imagine this case:<br>&gt;<br>&gt; volumepathname = "aaaaaaaa"<br>&gt; buflen =<br>&gt;&nbsp; 8<br>&gt; filename = "C:\\file"<br>&gt;<br>&gt; After the call to lstrcpyn:<br>&gt;<br>&gt; volumepathname = "C:\\faaaa"<br>&gt;<br>&gt;<br>&gt;<br>&gt; MSDN says volumepathname was a pointer to an "out" - string, so how would it<br>&gt; become someting<br>&gt; like "aaaaaa", or am i overseeing something?<br>&gt;<br><br>Yes you are overseeing something.&nbsp; I think it would be a good idea if<br>you read up a bit more on C in your spare time.&nbsp; I get the feeling you<br>don't quite have a grasp on the intricacies
 of the language,<br>particularly pointers and strings.<br><br>What I meant is, why would an app set volumepathname to "aaaaaa", as it's the pointer where it expects to find the volumepoint, so on windows&nbsp; this would be filled&nbsp; by kernel32.dll, not by the app. Maybe you mean this could be the case after a second call to GetVolumePathName? Anyway, this is not the place to discuss a C-language course so I'll reread the docs. Thanks for the comments anyway.<br></div></div></div><br>Send instant messages to your online friends http://uk.messenger.yahoo.com </body></html>