edwarf
06-12-2006 23:00:53
Found strange behaviour when trying to use Ogre3D 1.2.4
Hope you guys can help me with that
You are experts in c++ to .NET migration.
steps to reproduce this strange behaviour:
1. Create a CLR C++ application (class library)
2. Create a class:
2.5 copy all needed dlls into destination folder
3. Create C# project (windows application)
4. try to create Class1 object, debug and see that library OgrePlatform_d.dll does not load!
Now think WHY?
Now the same works perfectly if done in pure C++ or done in CLR C++ application. But if it is loaded as separate module (like in example above) it stops loading. The stranger thing is that it workes perfectly on 1.2.3 Dagon dlls.
Hope you guys can help me with that

You are experts in c++ to .NET migration.
steps to reproduce this strange behaviour:
1. Create a CLR C++ application (class library)
2. Create a class:
#pragma once
#include "windows.h"
using namespace System;
namespace LoadLibCLRDll {
public ref class Class1
{
public:
Class1()
{
wchar_t* ch=L"dupa";
HMODULE ho=LoadLibrary(L"OgreMain_d.dll");
HMODULE hw=LoadLibrary(L"OgrePlatform_d.dll");
HMODULE hu=LoadLibrary(L"OgreMain.dll");
HMODULE hc=LoadLibrary(L"OgrePlatform.dll");
}
};
}
2.5 copy all needed dlls into destination folder
3. Create C# project (windows application)
4. try to create Class1 object, debug and see that library OgrePlatform_d.dll does not load!
Now think WHY?
Now the same works perfectly if done in pure C++ or done in CLR C++ application. But if it is loaded as separate module (like in example above) it stops loading. The stranger thing is that it workes perfectly on 1.2.3 Dagon dlls.