Click here to Skip to main content
15,902,198 members
Home / Discussions / COM
   

COM

 
AnswerRe: How to call C# function from unmanaged C++ code.? Pin
Sauro Viti21-Jul-10 20:50
professionalSauro Viti21-Jul-10 20:50 
QuestionWhy CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 6:02
am 200920-Jul-10 6:02 
QuestionRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
Randor 20-Jul-10 6:08
professional Randor 20-Jul-10 6:08 
AnswerRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 21:06
am 200920-Jul-10 21:06 
AnswerRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
am 200920-Jul-10 21:21
am 200920-Jul-10 21:21 
GeneralRe: Why CreateWindowEx() function failed on 64 Bit window XP Pin
Randor 21-Jul-10 8:55
professional Randor 21-Jul-10 8:55 
Questionfile name in coleinsertdialog Pin
MKC00219-Jul-10 21:31
MKC00219-Jul-10 21:31 
QuestionType mismatch when calling a VB.NET COM class from VB6 Pin
AlexInter19-Jul-10 2:35
AlexInter19-Jul-10 2:35 
Hi all,

I have to implement a COM class with VB.NET. An object of this class has then to be created from a VB6 DLL. The code for the COM dll is very simple:
VB
Public Class AdapterWrapper
    Implements SchemaCompInterfaces.IEFAdapter

#Region "COM-GUIDs"
    Public Const ClassId As String = "58faad86-bbac-4b20-9ab5-fe32bdac0a68"
    Public Const InterfaceId As String = "f8dbb078-5f1e-4304-a390-3e8e88983f98"
    Public Const EventsId As String = "113d2163-f8db-4d99-88e5-58d13b8d2cf4"
#End Region
   
    Public Sub New()
        MyBase.New()
    End Sub
    Public WriteOnly Property CurrentSPFProjectStatus() As SchemaCompInterfaces.SPFProjectStatus Implements SchemaCompInterfaces.IEFAdapter.CurrentSPFProjectStatus
        Set(ByVal value As SchemaCompInterfaces.SPFProjectStatus)
        End Set
    End Property
    Public Function DocumentExistsInTool(ByRef oDocumentIObj As SchemaCompInterfaces.IObject) As Boolean Implements SchemaCompInterfaces.IEFAdapter.DocumentExistsInTool
    End Function


Following many more functions from the IEFAdapter interface...
The dll and tlb are created and registered.

The test code for the VB6 client to use this COM class is also very simple:
VB
Private Sub Command1_Click()
  Dim adapter As SchemaCompInterfaces.IEFAdapter
  Set adapter = Interaction.CreateObject("MyEFAdapter.AdapterWrapper")    
End Sub


Now when I'm running this code, I'm getting the Run-time error '13' Type mismatch in the CreateObject line. Late binding with
Dim adapter as Object
seems to work for my test code, but is not a solution for me, because I can't change the proprietary VB6 code where the COM object is created. So somehow the interface "SchemaCompInterfaces.IEFAdapter" is not known... Sigh | :sigh:

Any ideas how to get close to this problem?
In the project properties I checked the flag for registration with COM-Interop. Perhaps something to do with the ClassInterface?

I'm relatively new to VB, so don't answer too complex... Wink | ;)

Thanks in advance!
Alex
QuestionHow to develop 64 bit application using VS2005 Pin
am 200915-Jul-10 0:45
am 200915-Jul-10 0:45 
AnswerRe: How to develop 64 bit application using VS2005 Pin
«_Superman_»17-Jul-10 18:25
professional«_Superman_»17-Jul-10 18:25 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 18:09
am 200918-Jul-10 18:09 
GeneralRe: How to develop 64 bit application using VS2005 Pin
«_Superman_»18-Jul-10 18:42
professional«_Superman_»18-Jul-10 18:42 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 19:10
am 200918-Jul-10 19:10 
GeneralRe: How to develop 64 bit application using VS2005 Pin
am 200918-Jul-10 19:24
am 200918-Jul-10 19:24 
QuestionVS2010 vs VS2008 generated IDL differences that generates midl compilation error. Pin
Maximilien14-Jul-10 9:45
Maximilien14-Jul-10 9:45 
AnswerRe: VS2010 vs VS2008 generated IDL differences that generates midl compilation error. Pin
Richard MacCutchan14-Jul-10 22:12
mveRichard MacCutchan14-Jul-10 22:12 
QuestionHow to use COleDataObject Pin
MKC00213-Jul-10 4:14
MKC00213-Jul-10 4:14 
QuestionDll Error Pin
Enobong Adahada13-Jul-10 4:09
Enobong Adahada13-Jul-10 4:09 
AnswerRe: Dll Error Pin
Sauro Viti16-Jul-10 0:43
professionalSauro Viti16-Jul-10 0:43 
QuestionContext Menu Shell Extension (Invoked time) [modified] Pin
A_Fa12-Jul-10 19:32
A_Fa12-Jul-10 19:32 
QuestionCoInittialize Fails with large number of processes [modified] Pin
tony_Udz7-Jul-10 18:47
tony_Udz7-Jul-10 18:47 
QuestionException during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11227-Jul-10 2:20
asr11227-Jul-10 2:20 
AnswerRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Richard MacCutchan7-Jul-10 3:06
mveRichard MacCutchan7-Jul-10 3:06 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
asr11227-Jul-10 19:44
asr11227-Jul-10 19:44 
GeneralRe: Exception during assignment operation to a COM object - "Attempted to read or write protected memory" Pin
Richard MacCutchan7-Jul-10 21:19
mveRichard MacCutchan7-Jul-10 21:19 

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.