I am modifying an existing program that calls a couple of DLL's with the following snippets of code.
Notice that they are both using a string constant for the Lib statement. I looked aorund on here to try and make this call more dynamic and it said to just put the file name and VB will look for it in the current folder. I tried this and the top one completely errored out and said it couldn't find it, and the second one did not produce an error, but it was obivous, by the lack of activity, that the DLL was not getting called. Is there anything I can do to make these calls dynamic, so when I send the program to a client they do not have to make an exact folder path for the app to work?
Code:
Private Declare Sub LEASE_CHECK _
Lib "c:\work\TimeCounting3-23-06\lease.dll" _
Alias "LEASE_CALC" _
(inrec As in_record, DataRec As data_record, outrec As out_record, InFeeRec As in_fee_record)
Code:
Private Declare Sub LOAN_CALC Lib "c:\work\TimeCounting3-23-06\Lnb1184b.dll" _
(inrec As in_record, outrec As out_record, fee_inrec As fee_inrecord, data_rec As data_record)
Notice that they are both using a string constant for the Lib statement. I looked aorund on here to try and make this call more dynamic and it said to just put the file name and VB will look for it in the current folder. I tried this and the top one completely errored out and said it couldn't find it, and the second one did not produce an error, but it was obivous, by the lack of activity, that the DLL was not getting called. Is there anything I can do to make these calls dynamic, so when I send the program to a client they do not have to make an exact folder path for the app to work?