Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a Process with an Impersonated User
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01059576
Message ID:
01059589
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform