\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Use dll c++ in vb


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
Hello everyone, first to congratulate for forum.
\r\n
\r\nI like to use a dll made in C + + from Visual Basic, I have a file with the definitions of functions.
\r\n
\r\nAre these 3 functions that I use but I really do not get it to work.
\r\n
\r\nFunctions c + +.
\r\n
\r\n
\r\n
Quote:
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n unsigned char DLLENTRY openMega(char * commPort,char useMem,char * filename);
\r\nunsigned char DLLENTRY closeMega(void);
\r\nunsigned char DLLENTRY readMega(unsigned int race,unsigned int sound);\r\n \r\n
\r\n

\r\n
\r\nSo I have intention to implement in vb6 but I finish work.
\r\n
\r\n
\r\n
\r\n
Quote:
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \'unsigned char DLLENTRY openMega(char * commPort,char useMem,char * filename);
\r\nPublic Declare Function openMega Lib "D:\\Relojes Palomas\\pruebaReloj\\megaint.dll" _
\r\n(ByVal commPort As String, _
\r\nByVal useMem As String, _
\r\nByVal filename As String) As String
\r\n
\r\n
\r\n\'unsigned char DLLENTRY readMega(unsigned int race,unsigned int sound);
\r\nPublic Declare Function readMega Lib "D:\\Relojes Palomas\\pruebaReloj\\megaint.dll" _
\r\n(ByVal race As Integer, _
\r\nByVal sound As Integer) As String
\r\n
\r\n
\r\n\'unsigned char DLLENTRY getMegaData(void * p);
\r\nPublic Declare Function getMegaData Lib "D:\\Relojes Palomas\\pruebaReloj\\megaint.dll" _
\r\n(ByRef p As Integer) As String\r\n \r\n
\r\n
Can help me please?
\r\n
\r\n
\r\n
\r\nPD: sorry for my english.
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[1344576] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 10-20-2009, 09:30 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
OnErr0r\'s Avatar\r\n\r\n
\r\n \r\n OnErr0r\r\n OnErr0r is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 10-20-2009, 03:37 AM
perrotekel perrotekel is offline
Newcomer
 
Join Date: Jul 2007
Posts: 1
Default Use dll c++ in vb


Hello everyone, first to congratulate for forum.

I like to use a dll made in C + + from Visual Basic, I have a file with the definitions of functions.

Are these 3 functions that I use but I really do not get it to work.

Functions c + +.

Quote:
unsigned char DLLENTRY openMega(char * commPort,char useMem,char * filename);
unsigned char DLLENTRY closeMega(void);
unsigned char DLLENTRY readMega(unsigned int race,unsigned int sound);


So I have intention to implement in vb6 but I finish work.


Quote:
'unsigned char DLLENTRY openMega(char * commPort,char useMem,char * filename);
Public Declare Function openMega Lib "D:\Relojes Palomas\pruebaReloj\megaint.dll" _
(ByVal commPort As String, _
ByVal useMem As String, _
ByVal filename As String) As String


'unsigned char DLLENTRY readMega(unsigned int race,unsigned int sound);
Public Declare Function readMega Lib "D:\Relojes Palomas\pruebaReloj\megaint.dll" _
(ByVal race As Integer, _
ByVal sound As Integer) As String


'unsigned char DLLENTRY getMegaData(void * p);
Public Declare Function getMegaData Lib "D:\Relojes Palomas\pruebaReloj\megaint.dll" _
(ByRef p As Integer) As String
Can help me please?



PD: sorry for my english.
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->