WinApi Question (GetEnvironmentVariable)

Blitz3D Forums/Blitz3D Programming/WinApi Question (GetEnvironmentVariable)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Why are you using userlibs?

http://www.blitzbasic.com/b3ddocs/command.php?name=GetEnv

Surely that would do what you need?

To answer your question (note I'm not an expert with userlibs so I could be totally wrong). You can't pass a varible (c$) the way you are. That value would have to be the handle of a bank which you would then convert into a string (by looping through all the bytes returned and using their ascii code to work out the characters)