Click here to Skip to main content
15,896,912 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB6 on Windows 7 Pin
Member 451235629-Oct-12 18:42
Member 451235629-Oct-12 18:42 
AnswerRe: VB6 on Windows 7 Pin
Member 45123564-Dec-12 21:27
Member 45123564-Dec-12 21:27 
QuestionBinar array into user defined Type (How to?) Pin
Member 953964724-Oct-12 11:45
Member 953964724-Oct-12 11:45 
AnswerRe: Binar array into user defined Type (How to?) Pin
Eddy Vluggen24-Oct-12 23:19
professionalEddy Vluggen24-Oct-12 23:19 
QuestionVB.Net q Pin
khalid33323-Oct-12 23:30
khalid33323-Oct-12 23:30 
AnswerRe: VB.Net q Pin
Eddy Vluggen24-Oct-12 0:03
professionalEddy Vluggen24-Oct-12 0:03 
AnswerRe: VB.Net q Pin
khalid33324-Oct-12 17:19
khalid33324-Oct-12 17:19 
QuestionCOM Interop between C++ program and VB.NET DLL Pin
_obi_22-Oct-12 13:14
_obi_22-Oct-12 13:14 
Hi everyone out there Smile | :)

I have a problem (in the VERY beginning state) of writing a VB.NET DLL that will be used as a plugin for a C++ Program.
I try to outline what the goal is...
There is a videochat program called CamFrog. For this a Bot (for managing the chatroom) is available that uses plugins. The Bot comes with a C++ sample for a simple plugin. What i want to do is to "translate" that into a VB.NET Version (because C++ is really not my thing... i hardly figured out how the sample might work).

Now... I know that a .NET DLL is not the same as the C++ DLLs that are used by the bot but i guess it should be possible to achieve the same with COM Interop... I hope I'm right.

Now I looked on the sample plugin with dependency walker and it exports a few functions that will be called by the bot-program.

My first step now is to try to build a dll in VB.NET (2010 express) that ecports one simple function... i just want to see the function in dependency walker for now.

What i did so far:

I followed the guide from MS (Walkthrough: Creating COM Objects with Visual Basic[^]) using the part "Creating COM Objects without the COM Class Template
" (and some other hints from different pages i found). All settings are ok as far as i can see and my "code" is as follows:

VB
Imports System.Runtime.InteropServices

<ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _
Public Class ComClass1
    Public Const ClassId As String = "C4889882-ECC6-4BBE-9B65-A9DCC30B90F8"
    Public Const InterfaceId As String = "6420CC9C-2B69-4DFD-A149-C694895D80BD"
    Public Const EventsId As String = "0A0ACD71-7651-4BE5-9128-FE8AECCAE623"

    Public Sub New()
        MyBase.New()
    End Sub

    <ComVisible(True)> _
    Public Function testfunction() As Boolean
        Return True
    End Function

End Class


As far as I understood "testfunction" should now be visible as an exported function of the DLL in dependency walker...
But... it doesn't appear (list of exported functions is empty).

The whole thing with COM-Interop and that stuff is completely new for me and I barely understood all the things I read during the last 5 or 6 hours googling... so I'm sure that I miss something on it.

I hope someone can kick me in the right direction.

Thanks in advance
-obi-
AnswerRe: COM Interop between C++ program and VB.NET DLL Pin
Bernhard Hiller22-Oct-12 20:57
Bernhard Hiller22-Oct-12 20:57 
GeneralRe: COM Interop between C++ program and VB.NET DLL Pin
_obi_22-Oct-12 21:23
_obi_22-Oct-12 21:23 
Questioncsv => txt file Pin
dubscat22-Oct-12 9:41
dubscat22-Oct-12 9:41 
AnswerRe: csv => txt file Pin
David Mujica22-Oct-12 10:51
David Mujica22-Oct-12 10:51 
GeneralRe: csv => txt file Pin
dubscat22-Oct-12 11:29
dubscat22-Oct-12 11:29 
GeneralRe: csv => txt file Pin
David Mujica23-Oct-12 3:25
David Mujica23-Oct-12 3:25 
GeneralRe: csv => txt file Pin
dubscat23-Oct-12 6:47
dubscat23-Oct-12 6:47 
GeneralRe: csv => txt file Pin
David Mujica23-Oct-12 8:10
David Mujica23-Oct-12 8:10 
GeneralRe: csv => txt file Pin
dubscat23-Oct-12 8:12
dubscat23-Oct-12 8:12 
GeneralRe: csv => txt file Pin
dubscat23-Oct-12 8:14
dubscat23-Oct-12 8:14 
GeneralRe: csv => txt file Pin
dubscat25-Oct-12 8:55
dubscat25-Oct-12 8:55 
GeneralRe: csv => txt file Pin
David Mujica26-Oct-12 3:14
David Mujica26-Oct-12 3:14 
AnswerRe: csv => txt file Pin
ChandraRam24-Oct-12 0:32
ChandraRam24-Oct-12 0:32 
GeneralRe: csv => txt file Pin
dubscat24-Oct-12 5:38
dubscat24-Oct-12 5:38 
GeneralRe: csv => txt file Pin
dubscat25-Oct-12 5:55
dubscat25-Oct-12 5:55 
GeneralRe: csv => txt file Pin
ChandraRam25-Oct-12 6:35
ChandraRam25-Oct-12 6:35 
GeneralRe: csv => txt file Pin
dubscat25-Oct-12 7:22
dubscat25-Oct-12 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.