|
Thread: dll
-
Jan 30th, 2002, 01:16 PM
#1
Thread Starter
Addicted Member
dll
I have add a reference of access library into vb project and I could use of access function like
a=nz(3,0)
How could we do it in our own dll with out interface
-
Jan 30th, 2002, 01:50 PM
#2
Pardon? What do you mean without an interface?
The dll's interface is it's properties and that is how you use it.
-
Jan 30th, 2002, 07:06 PM
#3
PowerPoster
Are you referring to late binding?
Code:
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
-
Jan 31st, 2002, 07:24 AM
#4
Thread Starter
Addicted Member
using access library we don't have to user interface and no need to create object simply we can use
n=nvl(a,0)
how can we do that when we make our own dll
-
Jan 31st, 2002, 11:18 AM
#5
I think what we are saying is to try and explain better. You just posted almost word for word what you did last time, but what does it mean? I realize there could be a language barrier here but anything you can do to explain would be great.
-
Feb 4th, 2002, 09:39 AM
#6
Thread Starter
Addicted Member
Actually I want to put all function into dll that I made in module
so that other user could use it but couldn't see the codes.
Suppose I have made a function in the module
public function nvl(a,b as variant) as variant
if isnull(a) then
nvl=b
else
nvl=a
end if
end function
Now I can use it my form
private sub form1_click()
dim a as variant
a=null
msgbox nvl(a,10)
end sub
similarly I want to write function in dll so that I could use it just like above event
note
(While including access lib I can user the function written in access )
-
Feb 4th, 2002, 11:51 AM
#7
On the class module with all your functions in it change the instancing to Global MultiUse.
-
Feb 5th, 2002, 09:41 PM
#8
Thread Starter
Addicted Member
Thanks very much for your answer.But it will be very greatful if you show me an example how to do it.
Thanks
-
Feb 6th, 2002, 04:02 AM
#9
Here you go although all I did was cut and paste the code you posted:
public function nvl(a,b as variant) as variant
if isnull(a) then
nvl=b
else
nvl=a
end if
end function
Now I can use it my form
private sub form1_click()
dim a as variant
a=null
msgbox nvl(a,10)
end sub
You'll either have to open both projects together (the grpDLL file) or you'll have to compile the dll and reassign the reference in the app project.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|