Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - EnvExpand

Posted in WinTask

'
' EnvExpand
'

' This script expands a string containing an environment variable
' (that is, enclosed in %...%).
' It may also be useful when expanding strings stored in the Registry
'

dim ptr1 as unsigned
dim ptr2 as unsigned

EnvString$="%INCLUDE%"

ptr1=allocate(10)
PokeString(ptr1,EnvString$,1)

ptr2=allocate(255)

ret=External("kernel32.dll","ExpandEnvironmentStringsA",ptr1,ptr2,100)

var$=PeekString$(ptr2)

msgbox(EnvString$+" expands to: "+var$)


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now