Click here to Skip to main content
15,902,875 members
Home / Discussions / C#
   

C#

 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep22-Apr-04 20:36
Vini Deep22-Apr-04 20:36 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Heath Stewart23-Apr-04 2:05
protectorHeath Stewart23-Apr-04 2:05 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep25-Apr-04 22:30
Vini Deep25-Apr-04 22:30 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Heath Stewart26-Apr-04 2:56
protectorHeath Stewart26-Apr-04 2:56 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
Vini Deep26-Apr-04 19:42
Vini Deep26-Apr-04 19:42 
GeneralRe: Marshaling the structure array member of Structure in C# Pin
poda21-Sep-10 0:16
poda21-Sep-10 0:16 
QuestionWhy didn't my raw socket work properly? Pin
pdsinfo18-Apr-04 18:29
pdsinfo18-Apr-04 18:29 
Generalwrapping .TLB to .DLL for .NET Pin
normanordas18-Apr-04 18:14
normanordas18-Apr-04 18:14 
I have a .tlb file(neteng.tlb) that works on a vb 6 program. This library has module-based methods that i can call anywhere and it works fine.

Next I wrapped this module-based DLL(neteng.tlb) to another VB 6 COM as you have said. I did that by adding a referenced first to "neteng.tlb" library then adding the following code to the class (NETENGAPI is a module inside "neteng.tlb"):

'------------------------------------
Option Explicit

Public Function NE_IsNetwork1(name As String) As Boolean
NE_IsNetwork1 = NETENGAPI.NE_IsNetwork(name)
End Function

Public Function NE_OpenNetwork1(name As String, mode As AccessModeEnum) As Long
NE_OpenNetwork1 = NETENGAPI.NE_OpenNetwork(name, mode)
End Function

Public Sub NE_InitNetworkEngine1()
Call NETENGAPI.NE_InitNetworkEngine
End Sub

Public Sub NE_ExitNetworkEngine1()
Call NETENGAPI.NE_ExitNetworkEngine
End Sub
'------------------------------------
Then save the file as Netengs.DLL (class name is NetEngEng)

===>>> Process Flow: neteng.tlb wrapped inside ->netengs.dll
Note:
Netengs.dll purpose was to call those module-based methods inside neteng.tlb thru the class NetEngEng so we can expose them when we migrate it to .NET assembly code.

I created another VB6 Prog to test netengs.dll if its gonna work (i add a referenced first to netengs.dll). See code below:.

Option Explicit
Dim shp As String
Dim net As NetEngs.NetEngEng

Private Sub Form_Load()
Set net = New NetEngEng

Call net.NE_InitNetworkEngine1

shp = "d:\tracking\shapes\roadcenter_mkt_only.nws"

'Dim net As New NetEngs.NetEngEng
Dim bool As Boolean

'bool = net.NE_IsNetwork1(shp)
bool = net.NE_IsNetwork1(shp)
If bool Then
MsgBox ("Is network")
Else
MsgBox ("Is not network")
End If

Dim ne As Long
ne = net.NE_OpenNetwork1(shp, 1)
If (ne = 0) Then
MsgBox "Network " + shp + " not found.", vbCritical
Exit Sub
End If

Call net.NE_ExitNetworkEngine1
End Sub
'-----------
but when i run the prog and it step into the code Call net.NE_InitNetworkEngine1 it raises this error:

The instruction at "0x00001de2" referenced at "0x00001de2". The memory could not be "read."

My neteng.dll that wraps neteng.tlb don't even work inside another vb 6 prog. Whats wrong with neteng.dll here? Am i missing something? It would be more disaster if i import this to interop assembly. Tnx!
GeneralRe: wrapping .TLB to .DLL for .NET Pin
Heath Stewart19-Apr-04 4:47
protectorHeath Stewart19-Apr-04 4:47 
GeneralRe: wrapping .TLB to .DLL for .NET Pin
normanordas22-Apr-04 16:04
normanordas22-Apr-04 16:04 
GeneralRe: wrapping .TLB to .DLL for .NET Pin
Heath Stewart23-Apr-04 1:53
protectorHeath Stewart23-Apr-04 1:53 
GeneralShowing custom tooltip Pin
Meysam Mahfouzi18-Apr-04 17:57
Meysam Mahfouzi18-Apr-04 17:57 
GeneralRe: Showing custom tooltip Pin
Heath Stewart19-Apr-04 4:49
protectorHeath Stewart19-Apr-04 4:49 
GeneralDotNet version problem Pin
azusakt18-Apr-04 16:09
azusakt18-Apr-04 16:09 
GeneralRe: DotNet version problem Pin
scadaguy18-Apr-04 16:49
scadaguy18-Apr-04 16:49 
Generalwindows media web control Pin
Marveyles18-Apr-04 15:11
Marveyles18-Apr-04 15:11 
GeneralRe: windows media web control Pin
Heath Stewart19-Apr-04 4:09
protectorHeath Stewart19-Apr-04 4:09 
Generalc# oledbdataadapter using access db and asp Pin
MeterMan18-Apr-04 13:23
MeterMan18-Apr-04 13:23 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:10
protectorHeath Stewart19-Apr-04 4:10 
GeneralRe: c# oledbdataadapter using access db and asp Pin
MeterMan19-Apr-04 4:28
MeterMan19-Apr-04 4:28 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 5:18
protectorHeath Stewart19-Apr-04 5:18 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:11
protectorHeath Stewart19-Apr-04 4:11 
GeneralPanels and transparency Pin
Flack18-Apr-04 10:01
Flack18-Apr-04 10:01 
GeneralRe: Panels and transparency Pin
Dave Kreskowiak18-Apr-04 12:53
mveDave Kreskowiak18-Apr-04 12:53 
Generaladding new user Pin
emysola18-Apr-04 8:50
emysola18-Apr-04 8:50 

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.