Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New stuff gets included
Message
De
20/11/2004 20:15:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/11/2004 19:05:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Divers
Thread ID:
00960731
Message ID:
00963267
Vues:
8
>I finally found something working. I created this function in the main EXE:
>
>
>* Create an object of a sub class as this is not possible from a COM environment
>* when the main class is in the framework
>* expC1 Name of the class
>FUNCTION CreateObjectMain
>PARAMETERS tcClass
>LOCAL loClass
>loClass=CREATEOBJECT(tcClass)
>RETURN loClass
>
>
>Then from the sub EXE:
>
>
>loList=CreateObjectMain('News')
>
>
>But, in order for this to work, I had to move the class library from the sub EXE into the main EXE and issue the SET CLASSLIB for that class library in the main EXE as well. So, whenever I have to modify one of those classes, I have to recompile the main EXE. But, at least, I can preserve the actual infrastructure of all other entities that are ready to be updated from the sub EXE. I tried to avoid that but, even when being called from this function, the CREATEOBJECT() was not working if the class library was not included in the main EXE.

Michel,
A long thread so this might have already been said. Would this one work?
Function GetObjectFromExternalExe
lparameters tcClass,tcClasslib,tcAppModule
return NewObject(tcClass,tcClassLib,tcAppModule)
endfunc
ie:
* Test
loTest = GetObjectFromExternalExe('testclass','xtern.exe','')
loTest.SayHello()

xtern.exe - a single prg:
DEFINE CLASS testclass as Custom
 PROCEDURE SayHello
 MessageBox("Hello from external exe to "+Application.ServerName)
endproc
enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform