V
vs
I have the source code of a DLL compiled on VS2003 with .NET 1.1.
I am trying to convert it to .NET 2.0 with VS2005.
Apparently, many issues with mixed mode dll's have been fixed with
VS2005 but I still do not understand what is happening.
In the source code, there is the following file which I beleive is the
source of my problem.
===============================================================
MixedDll.cpp
==================================
// This code verifies that DllMain is not automatically called
// by the Loader when linked with /noentry. It also checks some
// functions that the CRT initializes.
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
//#include "_vcclrit.h"
#using <mscorlib.dll>
using namespace System;
namespace ODE
{
public __gc class ManagedWrapper
{
public:
static void Initialize()
{
//__crt_dll_initialize();
}
static void Terminate()
{
//__crt_dll_terminate();
}
};
}
//BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID)
//{
// return TRUE;
//}
======================================================
- The added comments were put there by me so it would compile OK
- I also removed "/no entry" from the command line arguments.
When I add the reference to this new DLL I can browse it's objects in
the visual studio "object browser" without a problem so I know
something is working.
However, when I try to initialize an object in my code from this DLL, I
get a FileNotFound exception. (this used to work with the old DLL so I
know I messed something up)
Any suggestions?
V.
I am trying to convert it to .NET 2.0 with VS2005.
Apparently, many issues with mixed mode dll's have been fixed with
VS2005 but I still do not understand what is happening.
In the source code, there is the following file which I beleive is the
source of my problem.
===============================================================
MixedDll.cpp
==================================
// This code verifies that DllMain is not automatically called
// by the Loader when linked with /noentry. It also checks some
// functions that the CRT initializes.
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
//#include "_vcclrit.h"
#using <mscorlib.dll>
using namespace System;
namespace ODE
{
public __gc class ManagedWrapper
{
public:
static void Initialize()
{
//__crt_dll_initialize();
}
static void Terminate()
{
//__crt_dll_terminate();
}
};
}
//BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID)
//{
// return TRUE;
//}
======================================================
- The added comments were put there by me so it would compile OK
- I also removed "/no entry" from the command line arguments.
When I add the reference to this new DLL I can browse it's objects in
the visual studio "object browser" without a problem so I know
something is working.
However, when I try to initialize an object in my code from this DLL, I
get a FileNotFound exception. (this used to work with the old DLL so I
know I messed something up)
Any suggestions?
V.