IModCollector_GetModFromNameAndVer unable to locate inactivated module | developer.brewmp.com IModCollector_GetModFromNameAndVer unable to locate inactivated module | developer.brewmp.com

Developer

IModCollector_GetModFromNameAndVer unable to locate inactivated module

Forums:

Hi,

 

I have been doing extensive work with the IModCollector interface and I have seem to have some difficulty getting the 'IModCollector's handle for an unactivated module. I can deactivate it fine & observe it

 

I can deactivate it and see the module in the '.inactive_mods' folder but the only way I can get the handle to this inactive module is by using its CLSID.

 

uint32 hModDeactivate[1];

// Get the handle for the inactive module    nErr = IModCollector_GetAppletsModHandle(piModCollector, 0x12345678, hModDeactivate);

works.

 

My numerous attempts at:

nErr = IModCollector_GetModFromNameAndVer(piModCollector,pszModuleName,pMe->pszCollectionID,hModDeactivate);

 

always returns 39 even if obtain the same information using other ModCollector functions (already having the handle).

Any help / insight would be greatly appreciated.

 

 

 

 

IModCollector_GetModFromNameAndVer() looks up the App in specified collection & hence may not be able to find the inactive mod.

IModCollector_GetModFromNameAndVer() looks up the App in specified collection & hence may not be able to find the inactive mod.

Are deactivated applications in the '.inactive_mods' folder considered a seperate collection?
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
Original module was in:
fs:/UserMods/testapp/testapp.mif
 
After the module is deactivated it is put here as expected:
fs:/UserMods/.inactive_mods/testapp__2/testapp.mif
 
Inorder to have the function IModCollector_GetModFromNameAndVer( locate the deactivated module, what is the function call expecting for module name and collection id?
 
 
 
 
 

Are deactivated applications in the '.inactive_mods' folder considered a seperate collection?
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
Original module was in:
fs:/UserMods/testapp/testapp.mif
 
After the module is deactivated it is put here as expected:
fs:/UserMods/.inactive_mods/testapp__2/testapp.mif
 
Inorder to have the function IModCollector_GetModFromNameAndVer( locate the deactivated module, what is the function call expecting for module name and collection id?
 
 
 
 
 

On simulator add a entry to "Targets\my tar\fs\sys\mod\ModCollector\collectionsettings.ini" as below & check if, IModCollector_GetModFromNameAndVer() with collection as InUserMods returns you the handle.
 
[InUserMods]BasePath=/usermods/.inactive_mods/EnumerationScheme=ONEDIRMOD
 
i think the only way out of this is to store the CLASSID of the App u deactivate.

On simulator add a entry to "Targets\my tar\fs\sys\mod\ModCollector\collectionsettings.ini" as below & check if, IModCollector_GetModFromNameAndVer() with collection as InUserMods returns you the handle.
 
[InUserMods]BasePath=/usermods/.inactive_mods/EnumerationScheme=ONEDIRMOD
 
i think the only way out of this is to store the CLASSID of the App u deactivate.

If I have multiple versions of a deactivated module that share the same CLASSID what handle will I get when I call IModCollector_GetAppletsModHandle()? 
 
I can successfully get the deactivated handle by calling IModCollector_GetModFromMIFPath() but I was hoping on IModCollector_GetModFromNameAndVer() so I can activate & deactivate lists of modules based upon their version.
 

If I have multiple versions of a deactivated module that share the same CLASSID what handle will I get when I call IModCollector_GetAppletsModHandle()? 
 
I can successfully get the deactivated handle by calling IModCollector_GetModFromMIFPath() but I was hoping on IModCollector_GetModFromNameAndVer() so I can activate & deactivate lists of modules based upon their version.
 

can u decativate more than versions of a mod at the same time.
if not, get the version after getting mod handle via IModCollector_GetModFromMIFPath(), using IModCollector_GetModVersion().

can u decativate more than versions of a mod at the same time.
if not, get the version after getting mod handle via IModCollector_GetModFromMIFPath(), using IModCollector_GetModVersion().