Runtime Error Calling managed ARX VS2002 DLL from VS2005

Runtime Error Calling managed ARX VS2002 DLL from VS2005

Anonymous
Not applicable
439 Views
5 Replies
Message 1 of 6

Runtime Error Calling managed ARX VS2002 DLL from VS2005

Anonymous
Not applicable
Hello guys,
I wrote a Managed Arx DLL to be called by a C# DLL. I "netload" the C# DLL in AutoCAD and then call the ARX dll at a button click event. The whole thing works very well when it is run on a system where VS 2002 is installed. However on systems that don’t have VS 2002 installed I get a runtime error at the button click event, "DLL not found".
Are Managed VS2002 ARX DLLs not compatible with framework 2.0? Or am I making some other mistake? How can I resolve this issue? Can somebody help?
Thanks in advance.
0 Likes
440 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
I think there won't be any binary compatibility between previous versions of Dlls/Arxs. Arx apps developed on VS 2002 won't be compatble with AutoCAD 2007
0 Likes
Message 3 of 6

Anonymous
Not applicable
Yes, ARX applications for 2006 are not binary compatible with 2007, but that’s not the issue here.
I am writing ARX application using ObjectARX 2006 for AutoCAD 2006. Only the front end of the application is being written in VS 2005. I am facing this problem when I try to call a managed ARX DLL from VS 2005.
0 Likes
Message 4 of 6

Anonymous
Not applicable
>> Are Managed VS2002 ARX DLLs not compatible with framework 2.0?

If a managed DLL is compiled to use framework 1.0 (or 1.1),
that version of the framework must be installed on the target
system.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
0 Likes
Message 5 of 6

Anonymous
Not applicable
I tried something like this:

#include
#include
#include
#include

using namespace std;

int main(int argc, char* argv[])
{

typedef UINT (CALLBACK* LURKING_DLL_FUNC1)(INT,INT);
typedef UINT (CALLBACK* LURKING_DLL_FUNC2)(INT);
HINSTANCE hDLL; // Handle to DLL
LURKING_DLL_FUNC1 Output; // Function pointer
LURKING_DLL_FUNC2 Input; // Function pointer

hDLL = LoadLibrary("Inpout32");
if (hDLL != NULL)
{
Output = (LURKING_DLL_FUNC1)GetProcAddress(hDLL,"Out32");
Input = (LURKING_DLL_FUNC2)GetProcAddress(hDLL,"Inp32");
if (!Output || !Input)
{
// handle the error
FreeLibrary(hDLL);
cout<<"\n"<<"error loading dll"<<"\n";
}
}


Output(0x37a,32);

ofstream SaveFile("Time.txt");
SYSTEMTIME st;
for(int i=0;i<500000;i++)
{
::GetSystemTime(&st);
SaveFile << std::setw(2) << st.wHour << ':'
<< std::setw(2) << st.wMinute << ':'
<< std::setw(2) << st.wSecond << '.'
<< std::setw(3) << st.wMilliseconds<< ' '
<< (Input)(DATA)<< '\n';
}
SaveFile.close();

return 0;
}
0 Likes
Message 6 of 6

Anonymous
Not applicable
Ooops!
Wrong post in the wrong place!
0 Likes