I know that there would be deployment issues, but you could easily build a simple .NET "wrapper" for Type::GetTypeFromCLSID and make it COM-available, and reference it from your unmanaged code.
I'm not asserting that there's no unmanaged-code mechanism to do what you want; only that this would be an easy solution, particularly if it's for some development-time code that doesn't need to be widely deployed. At 05:01 PM 1/17/2004, Andrew Cherry wrote >I'm trying to find a way to locate an assembly from unmanaged code prior to >attempting to load it. > >It's basically for a COM add-in type usage, so the information is stored in >the registry already. So I start off with the assembly name and the class >name. > >I know the search paths, and can check for the Codebase key in the CLSID key >for each assembly, but I'd rather be sure I'm matching the behavior the >runtime would exhibit -- ie, have an unmanaged path to >Type::GetTypeFromCLSID... which doesn't seem to exist. > >There apparently was going to be a function in the Metadata unmanaged APIs >to find an assembly, but that's not implemented -- anyone have any other >ideas that can stay in unmanaged code that don't require rewriting the >search logic? > >Thanks, >Andrew J. Merrill / Analytical Software Corp =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
