Translate C --> PB

Windows specific forum
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

You should probably still use 0, not 1 in the square brackets as 0 is the first item in the array. I just forgot to type them in my code :)

I found that code in the PureBasic manual for the CopyMemoryString command. It does not just copy the memory between locations, it also changes the value of the pointer. So you must pass the address of the pointer so it can also be modified. You can check this by printing the value of *foo before and after the call to CopyMemoryString.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
cecilcheah
Enthusiast
Enthusiast
Posts: 168
Joined: Wed Jun 04, 2003 8:44 am
Location: Switzerland

Post by cecilcheah »

You are absolutely correct. I did replace 1 with 0 and the commands are sent to my other applications.

Thanks

Cecil
Post Reply