| | |
How To create an instance of a Class in Visual Basic
![]() |
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Solved Threads: 0
HI
I want to create an Instance of Class(Object) In Visual Basic.Using "Create Object " Syntax. please refer attached CPP & header File for the class COMOutput. How can i create an object for this COMOutput Class in Visual Basic. And I need to access the Functions Defined in The COMOutput.Cpp. PLease Help me.Thanks
Augustin
I want to create an Instance of Class(Object) In Visual Basic.Using "Create Object " Syntax. please refer attached CPP & header File for the class COMOutput. How can i create an object for this COMOutput Class in Visual Basic. And I need to access the Functions Defined in The COMOutput.Cpp. PLease Help me.Thanks
Augustin
You need to compile this cpp class as a .DLL and then refer this dll in your VB propject.
You are good to go.
You are good to go.
Create a dll file using VC++ Win32 Dynamic-Link Library Project type.
Compile the dll and register it in system32.
Compile the dll and register it in system32.
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Solved Threads: 0
HI debasis,
I have tried to create a DLL with the C++ & the Header file. But i got Errors While Creating . As i have No idea on What Header Files to be included for the Errors. Can u help me on that ..please try to create a DLL with the files i have attached & can u give me a feedback on Errors....Thanks
I have tried to create a DLL with the C++ & the Header file. But i got Errors While Creating . As i have No idea on What Header Files to be included for the Errors. Can u help me on that ..please try to create a DLL with the files i have attached & can u give me a feedback on Errors....Thanks
•
•
•
•
create a DLL.register
to to command prompt and type
c:>regsvr32 <complete path of DLL>
open your vb project. go to project-refrences- add the DLL from the list
now create a object
dim obj as new <nameof DLL.ClassName>
now u can use the function
hope this will work
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
.CPP and .H files can't be directly referenced fronm VB. compile to .DLL file and then instanceate in VB.
I have tried to create a DLL with the C++ & Header file. It is using ATL/COM Model ..So if i tried to create a DLL i am getting Errors. How to create it Properly. PLease can you refer the files Attached COMOutput.h COMOutput.Cpp
![]() |
Similar Threads
- create pdf from excel etc. visual basic 6.0 (Visual Basic 4 / 5 / 6)
- Numbering in visual basic data report (Visual Basic 4 / 5 / 6)
- How can I create an explicit instance of a class? (VB.NET)
- Connecting to a SQL Server Database using VB (VB.NET)
- Creating an OS in visual basic 6.0 (Visual Basic 4 / 5 / 6)
- Using activex controls in visual basic (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Run Time error 429 from VB - which component causing?
- Next Thread: data mining order paterns
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web windows






