|
-
Aug 10th, 2000, 01:48 PM
#1
Thread Starter
Lively Member
Yeah...hum
Can somebody send me an example project of a dll because I want to know how to make my own dll's. I've never made a dll so please keep it easy. Or just give me the code for a dll that for example counts two integers up or something.
tanks for helping a poor beginner!
-
Aug 10th, 2000, 01:54 PM
#2
transcendental analytic
You know what Classmodules are? Have you made OCX's before? ACtiveX Dll's are almost the same as ActiveX OCX's except that you have Classes, not Controls in it.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 10th, 2000, 02:00 PM
#3
Member
OK,
Open VB, select ActiveX DLL.
In the code for Class1 enter the following code:
Public Function myfunction(txt)
MsgBox txt
End Function
Next go to File and select "Add Project"... select Standard Exe.
In Project Explorer, right click the Standard EXE project and choose "Set as Startup"
Add a button to the form. In the code for the button:
Private Sub Command1_Click()
txt = "Hello World"
Set s = CreateObject("Project1.Class1") 'create the COM object where Project1 is your ActiveX DLL and Class1 is your Class
s.myfunction txt 'call the myfunction method of the DLL
End Sub
This is a VERY simple example. Once the DLL is finished you would register is on your machine using: regsvr32.exe c:\full\path\to.dll
-
Aug 10th, 2000, 02:17 PM
#4
Thread Starter
Lively Member
thanks
tanks for giving me my first lesson on how to make a dll!
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
|