Hi,
Is this the right forum for C++/CLI-related questions?
I haven't done any C++/CLI for ages, so please bear with me.
I have an unmanaged/native executable & I need to somehow get a managed class loaded into its process, only I don't have access to the source code of the exe. The only thing I can do is specify in a config file that it should load the dll when the process starts (presumably using LoadLibrary winapi). In other words I can't call exported functions, or create managed objects manually from the host exe...
Up until now I've been trying to get it working in C#, but it looks more & more like it's not the tool for the job, so I've gone back to C++.
I've tried a few things including getting one non-clr dll to create a thread in dllmain, waiting for dllmain to finish executing (threads to be created etc), then call an exported function on a mixed dll. either loading, or calling the mixed dll causes the process to hang... is that because the loader lock is still on?
Is what I'm trying to do even possible?
Is there a .NET equivalent to DllMain where I can safely create managed objects the library loads? Could I write another exe that shells the existing one & then somehow loads a class library into that process?
Thanks!!
Is this the right forum for C++/CLI-related questions?
I haven't done any C++/CLI for ages, so please bear with me.
I have an unmanaged/native executable & I need to somehow get a managed class loaded into its process, only I don't have access to the source code of the exe. The only thing I can do is specify in a config file that it should load the dll when the process starts (presumably using LoadLibrary winapi). In other words I can't call exported functions, or create managed objects manually from the host exe...
Up until now I've been trying to get it working in C#, but it looks more & more like it's not the tool for the job, so I've gone back to C++.
I've tried a few things including getting one non-clr dll to create a thread in dllmain, waiting for dllmain to finish executing (threads to be created etc), then call an exported function on a mixed dll. either loading, or calling the mixed dll causes the process to hang... is that because the loader lock is still on?
Is what I'm trying to do even possible?
Is there a .NET equivalent to DllMain where I can safely create managed objects the library loads? Could I write another exe that shells the existing one & then somehow loads a class library into that process?
Thanks!!