Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning COM Info
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00673352
Message ID:
00673414
Vues:
13
That program did not work. It errored out. I do, however,
have Rick Strahl's Registry.Prg.

My code is:
#DEFINE HKEY_CLASSES_ROOT -2147483648

CLEAR

SET PROCEDURE TO Registry.prg
oReg = CREATEOBJECT('registry')

oDll     = CREATEOBJECT("MyDll.MyClass")
cClassId = COMCLASSINFO(oDll, 4)
cClassId = "CLSID\" + cClassId + "\InProcServer32"

? oReg.ReadRegistryString(HKEY_CLASSES_ROOT, cClassId, "ThreadingModel")
? oReg.ReadRegistryString(HKEY_CLASSES_ROOT, cClassId, "(Default)")

RETURN
The first call to ReadRegistryString returns "Apartment", which is right.
But the second, to get back the Default key, returns null.

So how do I read the default key?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform