Skip to content

how to remove once added object from a global namespace? #35

@the-Arioch

Description

@the-Arioch

Hello, maybe it is stupid to ask here, but you did not publish your mail.

also, the original host-centered ActiveScripting SDK or ScriuptControls SDK did not survive on the internet. It was all paper-only back in 2000s...

So, there is a iScriptControl.AddObject interface, but it does NOT return any token to control the bridge after it was created

I know using your code instead of the SDK (code by contract) is stupid (code for implementation), actually twice stupid (code for someone else's implementation), but that was the best i could find

I was thinking about calling AddObject(<name to remove>, NULL but your code would throw AV there, clearly that was not an expected way...

CTScriptObject::CTScriptObject(IDispatch *pObject, VARIANT_BOOL bAddMembers)
{
	m_cRef = 1;
	m_pObject = pObject;
	m_pObject->AddRef();
	m_bAddMembers = bAddMembers;
}

I may create and register a dummy no-properties iDispatch stub, but that feels even more stupid than registering NULL

Also, that would not de-pollute the global namespace.
Also, i don;t know and feel insecure if that will clear away the secondary objects that very (bAddMembers)

Now why should global objects ever be de-registered? Huh... our legacy app was designed in a clever way to use global objects in stead of functio narguments to handle events...

Dunno, i feel like going to hunt for leaked Win2000 sources now, i really don't know where to look for information now... Well, sorry for whining.

I just hope you had hoarded a lto of AS/WSC/WSH documents and can give some authoritative clue...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions