DLL for deployed applications

Hey everyone,

Please excuse my ignorance, but I’ve only recently started integrating non-Xojo standard DLLs into some of my projects for one of my clients.

So here’s a little back story. I created two COM-accessible DLLs. One of them references a third party non-COM accessible DLL, and the other references about 6 third-party non-COM accessible DLLs.

When I build my solutions in VS 2013, the DLLs are registered and accessible within Xojo. In my debug builds, my project has no problem accessing my DLLs, which in turn have C# functions to call the third-party DLL functions. I receive all data and the entire DLL process works as expected.

Now… when I then build my app and give it (and the Libs folder) to someone at my client on their own personal PC, they receive a NilObjectException right away after pressing a button that should access my COM DLLs. All DLLs are in the “MyApp Libs” directory (I’ve even included the third-party DLLs there too).

So I’m left with a few questions:

  1. Shouldn’t my exe reference the DLLs in the Libs directory?

  2. Do I need to register all of the DLLs on the client machine (perhaps via an InnoSetup install shield)? if so, how? I’ve added this line to the [Run] element of InnoSetup to attempt to register the DLLs - it looks like it runs, but then it appears the DLLs weren’t actually registered.

Filename: "{dotnet20}\\RegAsm.exe"; Parameters: /codebase XojoPosAPIMod.dll; WorkingDir: "{app}\\TSDPosAPITester Libs"; StatusMsg: "Registering TB_PosAPIMod.dll..."; Flags: runminimized

If I instead use regserver, I get an error saying “Unable to register the DLL/OCX: RegSvr32 failed with exit code 0x4.” when running the install shield on the client machine.

  1. Why, when building my application, aren’t the non-Xojo standard DLLs in the Libs folder automatically delivered to the directory (I manually added them)?

What’s the best approach when creating your DLLs and accessing them via “Insert > ActiveX component > References” and building your app to ensure your client machines are able to use those DLLs?

Thanks again for the help,
Taylor

Ah, finally figure it out… that was dumb. I changed the flag for InnoSetup from dotnet20 to dotnet40 so the regasm call actually works.

Filename: "{dotnet40}\\RegAsm.exe"; Parameters: /codebase XojoPosAPIMod.dll; WorkingDir: "{app}\\TSDPosAPITester Libs"; StatusMsg: "Registering TB_PosAPIMod.dll..."; Flags: runminimized