Fernando,
Probably it's similar to your Long2Str function
FUNCTION num2dword(lnValue)
#DEFINE m0 0x0000100
#DEFINE m1 0x0010000
#DEFINE m2 0x1000000
IF lnValue < 0
lnValue = 0x100000000 + lnValue
ENDIF
LOCAL b0, b1, b2, b3
b3 = Int(lnValue/m2)
b2 = Int((lnValue - b3*m2)/m1)
b1 = Int((lnValue - b3*m2 - b2*m1)/m0)
b0 = Mod(lnValue, m0)
RETURN Chr(b0)+Chr(b1)+Chr(b2)+Chr(b3)
* * *
You can find constants here:
http://www.news2news.com/vfp/w32constants.php* * *
cApp -- application name, second parameter, like "c:\windows\notepad.exe"
cCmd -- command line, third parameter, like "mytext.txt", note that I add a space before it when calling the function