String^ pathToManagedAssembly = Path::Combine(directory, "managed.dll") Īssembly^ newAssembly = Assembly::LoadFile(pathToManagedAssembly) String^ directory = Path::GetDirectoryName(thisPath) String^ thisPath = thisAssembly->Location Static Assembly^ MyResolveEventHandler( Object^ sender, ResolveEventArgs^ args )Īssembly^ thisAssembly = Assembly::GetExecutingAssembly() (or in the GAC).įor reasons not worth going into, this is the structure I need, which meant that I needed to give the CLR a hand in located the managed dll. Apparently, the CLR won't look for managed DLLs in the path of the unmanaged DLL and will only look for it where the executable is. I confirmed this by copying managed.dll into c:\exe and it worked without issue. The problem was where the DLLs were located. Unfortunately, Microsoft has no information on that error. (*pCreateObjectFunc)() //this tosses an EEFileLoadExceptionįor what it's worth, the Event Log reports the following:įatal Execution Engine Error (79F97075) (80131506) (*pTest)() //this successfully pops up a message box PVOID pFunc2 = ::GetProcAddress(hModule, "CreateMyObject") ĬreateObjectPtr pCreateObjectFunc = (CreateObjectPtr)pFunc2 TestFunctionPtr pTest = (TestFunctionPtr)pFunc1 PVOID pFunc1 = ::GetProcAddress(hModule, "TestFunction") HMODULE hModule = ::LoadLibrary(_T("MyWrapper")) Int _tmain testwrapper(int argc, TCHAR* argv, TCHAR* envp) Test Code (this is an EXE): typedef void* (*CreateObjectPtr)() ::MessageBox(NULL, _T("My Message Box"), _T("Test"), MB_OK) this class references c# in the constructorĮxtern "C" _declspec(dllexport) void DeleteMyObject(IMyObject* pConfigFile)Įxtern "C" _declspec(dllexport) void TestFunction(void) Managed C wrapper code (this is in a DLL): extern "C" _declspec(dllexport) IMyObject* CreateMyObject(void) I've done it on other projects, but on this one, I am getting an EEFileLoadException. The engineered polymer co-bonded aluminium construction within our products has proven strength and reliability for metro through to extreme remote operating conditions.For deployment reasons, I am trying to use IJW to wrap a C# assembly in C instead of using a COM Callable Wrapper. Our success lies within Hidrive’s proprietary modular design, which delivers superb versatility and is engineered to minimise weight for maximum reliability and payload. The success and solidarity of our business has been built on a commitment to working together and sharing talent and knowledge, thereby delivering economical and effective solutions that accelerate the success of our people and our clients. ![]() This is the mission that our visionary founders established and to this day it is what guides our team of great people. Trust is hard earned, not by the product alone, but by the company behind the product. We provide support right across the country, through our network of certified service body maintenance agents. No matter where you are in Australia, we can deliver our service bodies nationwide, from one vehicle to an entire national fleet. Our locations include sales and installations sites in Sydney NSW, Melbourne VIC and Brisbane QLD as well as our eastern states manufacturing plant in Goulburn NSW and Western Australia manufacturing plant in Perth WA operating sales and installations. ![]() Hidrive service bodies and FleetBrand is available throughout Australia. Strong support and loyalty from our clients including mutual and effective affiliation with leading fleet providers. Hidrive is a leading brand in the lexis of fleet operators who are serious about safe, reliable and cost-effective mobile workspace solutions. Excellence in our people, excellence in design, excellence in operations, excellence in lean manufacturing methodologies and excellence in systems and quality management.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |