Hello,
I'm trying to use a method named Func1 which I implemented with VB for my dll named Test.dll. The method was implemented as follows:
Public Function Func1(p1 As Long, p2 As Long) As Long
Func1 = p1 + p2
End Function
In my installScript file I have the following code:
prototype LONG Test.Func1(LONG, LONG);
prototype void UseMyDLL();
function void UseMyDLL()
NUMBER res;
LONG lSum;
begin
res = UseDLL(SUPPORTDIR ^ "Test.dll");
if (res=0) then
lSum = Test.Func1(3,5);
UnUseDLL(SUPPORTDIR ^ "Test.dll");
endif;
end;
I have already placed the DLL in the appropriate target language folder in the Support Files pane.
The dll is correctly loaded but the call to Test.Func1(3,5) returns the following error:
Error Number: 0x80040703
Description: Failed to locate function DLL: Test.Func1
Can anyone help me with this?
Is there anything I'm doing rong?
Please help
Thanx
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Installation does not find function in DLL
Started by
fdmourao
, Nov 04 2004 14:15
2 replies to this topic
Posted 04 November 2004 - 14:44
VB doesn't create "real" DLls with exported functions, but ActiveX obkects with a .dll extension. YOu cannot call functions in such a DLL this way. This only works with DLLs created in VC. As a workaround look at sample "Using a VisualBasic DLL in IS6" at http://www.installsi.../en/isp_ext.htm
Stefan Krüger
InstallSite.org twitter facebook
Posted 04 November 2004 - 16:02
I got it! I thought UseDLL could handle ActiveX objects...
I saw the example you have reference. It will be be very useful.
Thanx a lot.
I saw the example you have reference. It will be be very useful.
Thanx a lot.