huh, ik ben helemaal de draad kwijt:
Client
Server
De Assembly van de server
How tha hell kan ik vanuit een VB6 applicatie een VB.NET COM+ component aanspreken en functioneel krijgen. Momenteel krijg ik een activeX Component can't create object.
bij voorbaat dank
Client
code:
1
2
3
4
| Private Sub Command1_Click()
Dim lvobjServer As New Server.AccountVB
Text1.Text = lvobjServer.Debit(10)
End Sub |
Server
code:
1
2
3
4
5
6
7
8
9
10
| Imports System
Imports System.EnterpriseServices
<Transaction(TransactionOption.Required)> _
Public Class AccountVB : Inherits ServicedComponent
<AutoComplete()> Public Function Debit(ByVal Amount As Integer) As String
Return ContextUtil.TransactionId.ToString()
End Function
End Class |
De Assembly van de server
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| Imports System
Imports System.EnterpriseServices
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
' COM+ app name as it appears in the COM+ catalog
<Assembly: ApplicationName("TestApp")>
<Assembly: AssemblyKeyFile("../../key.snk")>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("FA755CB7-0739-47BB-9DA6-0E7F461F59A7")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
<Assembly: AssemblyVersion("1.0.*")> |
How tha hell kan ik vanuit een VB6 applicatie een VB.NET COM+ component aanspreken en functioneel krijgen. Momenteel krijg ik een activeX Component can't create object.
bij voorbaat dank