.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.NET DLL Error - Only on Windows 7 Machines

12 REPLIES 12
Reply
Message 1 of 13
jerry.bryant
1295 Views, 12 Replies

.NET DLL Error - Only on Windows 7 Machines

AutoCAD 2011

.Net Framework 4.0 DLL

.Net Framework 4.0 installed on all machines

 

I have a 4.0 DLL that is runniing fins on all our XP Pro machines.

The same DLL run from Windows 7 Mahcines...produce the following error message (see attached)

 

Any Ideas?

 

junk.jpg

Jerry Bryant
"Swing hard and hope you hit it!"
12 REPLIES 12
Message 2 of 13

It appears you are using calls to COM routines. You may just need to register the appropriate type libraries on the Win7 machines.

Steven Elliott

When I was a little bitty boy, my grandmother bought me a cute little toy. Silver bells hangin' on a string... she told me it was my ding-a-ling-a-ling!
Message 3 of 13

Why would you have to do this on Windows 7 Machies...but not Xp Pro machines?

Jerry Bryant
"Swing hard and hope you hit it!"
Message 4 of 13

It may have been installed on the XP machines by another addin? I'm just taking a guess to try and help. Are you calling COM from your module at all?

Steven Elliott

When I was a little bitty boy, my grandmother bought me a cute little toy. Silver bells hangin' on a string... she told me it was my ding-a-ling-a-ling!
Message 5 of 13

Bare with me...a little confused by the "terminology"..

 

If you are talking about RFERENCES...I am referencing MSXML2.dll (Microsoft XML, v6.0).

 

The app is using a VB module that read an XML file......It was modified to work in .NET....I am using that within my AutoCAD .Net DLL

 

We tried replacing MSXML2 with the .NET version....too many changes in the code reuquired (massive amount of code in this module).

 

Now...let me ask you a stupid question...

 

If I am referncing that "com dll"....how do I register it on someones machine?

DO I have to copy the DLL to their machine first?..then register it?

Would setting "Copy Local" to TRUE accomplish this?

Jerry Bryant
"Swing hard and hope you hit it!"
Message 6 of 13

I've never used the COM library from .Net, but in VB6 and VBA you would reference the AutoCAD Type Library. In Project References it would show up as AutoCAD 2012 Type Library, or whatever equivalent for your release of AutoCAD. In XP it is located (on my system) at C:\Program Files\Common Files\Autodesk Shared\acax18enu.tlb.

 

I've also never used MSXML and it's possible that could be related to your error, I really wouldn't know. Sorry.

 

As for how to include it with your distribution, well, it should already be on any computer that has the same version of AutoCAD installed. So, maybe I'm way off base here.

 

Hopefully, somebody with more experience with these issues than I will chime in.

 

You can also seek answers and help at www.theswamp.org. There are some very knowledgable and helpful people that frequent that site.

 

 

Steven Elliott

When I was a little bitty boy, my grandmother bought me a cute little toy. Silver bells hangin' on a string... she told me it was my ding-a-ling-a-ling!
Message 7 of 13
norman.yuan
in reply to: jerry.bryant

You did not say if your Acad is 32-bit or 64-bit version before and after moving to Win7. If it was from 32-bit to 64-bit, then the app would be broken for sure: MS XML 6.0 is a COM component, the app need to be compiled against 64-bit of MS XML 6.0.

 

COM stuf is not like .NET code that you write once and works with both 32/64 bit app.

Norman Yuan

Drive CAD With Code

EESignature

Message 8 of 13
jerry.bryant
in reply to: norman.yuan

Yeah...I just found out the Windows 7 machines are 64-bit.

 

So your asying I need to REFERENCE a 64 bit vereion of MSMXL.dll?

 

Where do I find that?

 

Also....the gusy with those machines...are using an APP that refereces the same COM DLL that I am...but it works fine on the 64 bit machine....Wonder why?

 

The app they are using..is not >NET....its an old VB 6 App.....refencing the same COM MSXML.dll

 

I guess anything .NET....requires MUCH more work to get working everywhere...jeez progress at its best

 

 

Jerry Bryant
"Swing hard and hope you hit it!"
Message 9 of 13
norman.yuan
in reply to: jerry.bryant

By " an APP that refereces the same COM DLL", you mean some app that is NOT Acad 64-bit, right? A 32-bit app can run on WIn64-bit OS just fine. However, since the AutoCAD you run is 64-bit AutoCAD, any code run inside AutoCAD process must be 64-bit. You could study more on this 32/64bit issue. Actually, going AutoCAD 64-bit should be a very carefully prepared move, depending on how much your custom Acad add-ins are relied on 32-bit apps/components.

 

In your case, there is 64-bit version of MS XML 6.0 you can download from MS site. Just googling "Microsoft XML 6.0" would bring you the download link.

 

However, IMO, .NET comes with very powerful XML manipulating capacity, you really should re-write the old VB classical code that depends on COM with pure .NET code, ASAP.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 10 of 13
jerry.bryant
in reply to: norman.yuan

Got it..thx for the info.

 

We tried to use the .NET XMlLinterface....but it required too many changes to the code (this is a massive module)...and we could never get it to work....the error message were unclear and impossible to determine how to fix....of course we didn't spend alot of time trying to figure it out....casue we didn't have much time.

I'll try compiling a "64 bit" version....using the 64 bit MSXML.dll.....hopefully that will work on the Windows 7 machines.

The company will be switching over to 64 Bit Win 7 next year anyway....maybe we can rewrite with .NET XML at that time.



 

Jerry Bryant
"Swing hard and hope you hit it!"
Message 11 of 13
dgorsman
in reply to: jerry.bryant

Keep working on it - System.XML *rocks* compared to the MSXML interface.  As long as you are familiar with XML terminology it should only require minor modifications and a few careful try/catch blocks.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 12 of 13
jerry.bryant
in reply to: norman.yuan

"Download the 64-Bit MSXML .DLL....."

 

Unfortunately, I can't download (at least install)...the 64 Bit version of the DLL....cause I dont have a 64 Bit machine.

Jerry Bryant
"Swing hard and hope you hit it!"
Message 13 of 13
jeff
in reply to: jerry.bryant

LINQ to XML is nice also

You can also find your answers @ TheSwamp

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost