View Single Post
  #16 (permalink)  
Old 17th June 2005
RafkeP RafkeP is offline
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

I don't know if this will make any sense (I had too much wine and know [censored] about VB), but maybe it helps.

Compare your code to the c++ code

Code:
cds.lpData = lstrcpy(buffer, buffer) 
' Copies filename to itself. Nothing happens, but returns the address for the pointer to the string!
If I understand correctly you put the adres of a pointer to buffer in lpData

Now here is the C++ code

Code:
adr=&buf;
cds.lpData=&adr;
Now if I understand this correctly (like I said before I don't know c++ either :D )

adr contains the adress of the pointer to buffer, but
lpData contains the adress of the pointer to the adres of the pointer to the buffer

I tried to fix it in VB6 and didn't succeed, but I hope this is somehow of use to you.

Rafke P.

EDIT:On a more sober note: this doesn't explain why the open file is working though.
Reply With Quote
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20