Nefarious1
Programmer
Hi -
Some time ago, I developed a small app to communicate with some hardware using a DLL (supplied by the manufacturers of the hardware.) Recently however, they decided to re-write the API and wrap it in a .NET DLL. Now its been hell to try use this thing.
Here is an extract from an email relating to this issue..
Although they say that the DLL does not need to be registered - is this correct ? I was led to believe that to use a .NET DLL from withing my software it would first have to be registered (using Regasm ?).
I have googled this issue but not found anything very helpful. They supplied 2 files a DLL and a Type file (.tlb) I tried importing the .Net assembly into delphi (not sure it I did it right - or if indeed I needed to) and it produced a .pas file that I place in the uses section and it seems to work (after a fashion.)
Here is a link to the delephi-created wrapper for the .NET assembly..
Link
Now I have it working on 1 computer.. using the following code..
In the "OnCreate" event on the main form I have..
Now as I say, I have got this running on 1 computer - but I am having problems installing it on other computers (all are using Windows 8.1.) On the other computer I tried to install it on - I get an error relating to the fact the Class or DLL is not registered. I have tried many ways of using regasm to try remedy this - but none seem to work.
Can someone please tell me if I am going about this all wrong - or is there an easier (not reliable) way to get this working ? IS there any way to access the .NET DLL from within delphi WITHOUT registering the .DLL (as the supplier implied ?)
Any help would be much appreciated..
Many thanks..
Dave.
Some time ago, I developed a small app to communicate with some hardware using a DLL (supplied by the manufacturers of the hardware.) Recently however, they decided to re-write the API and wrap it in a .NET DLL. Now its been hell to try use this thing.
Here is an extract from an email relating to this issue..
Supplier said:"We have chosen not to continue forward with the ActiveX OCX technology ..Rather a .Net-compliant DLL that is fully compatible with Win XP/7 (32/64-bit) and Win8.x 64-bit platforms. This solution does not require system registration and in this aspect alone, we feel makes this solution superior to the ActiveX environment..."
Although they say that the DLL does not need to be registered - is this correct ? I was led to believe that to use a .NET DLL from withing my software it would first have to be registered (using Regasm ?).
I have googled this issue but not found anything very helpful. They supplied 2 files a DLL and a Type file (.tlb) I tried importing the .Net assembly into delphi (not sure it I did it right - or if indeed I needed to) and it produced a .pas file that I place in the uses section and it seems to work (after a fashion.)
Here is a link to the delephi-created wrapper for the .NET assembly..
Link
Now I have it working on 1 computer.. using the following code..
In the "OnCreate" event on the main form I have..
Code:
Var
Drawer : USBQFUMC_;
begin..
Drawer := CoUSBQFUMCCLS.Create as USBQFUMC_;
end;
Now as I say, I have got this running on 1 computer - but I am having problems installing it on other computers (all are using Windows 8.1.) On the other computer I tried to install it on - I get an error relating to the fact the Class or DLL is not registered. I have tried many ways of using regasm to try remedy this - but none seem to work.
Can someone please tell me if I am going about this all wrong - or is there an easier (not reliable) way to get this working ? IS there any way to access the .NET DLL from within delphi WITHOUT registering the .DLL (as the supplier implied ?)
Any help would be much appreciated..
Many thanks..
Dave.