Jump to content

Error 2 in calling .NET constructor


Recommended Posts

Hi guys,

I'm pretty much stuck with a problem. I have to call a .net dll from labview. So I do all this stuff with the constructor note, call the function with an invoke note and close the reference again. On my development machine it works like a charm, also when I compile my application the .exe works fine.

However, when I transfer my application to another PC, I'm getting error 2 (memory full) immediately after calling the constructor node. Needless to say that it's not really a memory problem. The dll and my app are in the same paths on my development machine and the other PC.

We asked the supplier of the dll for a little program the test the dll and that works fine on both PCs. So it has something to do with the way I call the dll in LV.

Any ideas?

Thanks a lot,

Guenther

post-3733-1166017439.png?width=400

Link to comment
Maybe the dll is not registered on the target?

Try running regsrv32.exe with the dll name as parameter

Ton

We do have an installation routine for the dll, and somewhere in the process a message pops up that the dll has been registered.

I tried regsvr32 anyway and I got a message that the dll is loaded but the entry point could not be found. Don't know what to make of that.

However, regsvr32 delivers identical messages on both PCs, so at least there's no difference here.

Guenther

Link to comment

Well, the regsvr32 is for ActiveX/COM, so that shouldn't be an issue. It could be that the .NET assemblies you are using are expecting to be in the GAC, but from your comments, it doesn't sound like that's the case.

The .NET assemblies (DLLs) should be in the same directory as the EXE or in the /data or /bin subdirectory.

Let's get some information....

1. What version of LabVIEW?

2. What versions of .NET are installed on your dev machine and the other PC?

3. What version of .NET was the .NET assembly you are using built against?

I've got some other possibilities, but let's start with this.

Brian

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.