Results 1 to 5 of 5

Thread: How do I write this VB6 dll call in C#? [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    How do I write this VB6 dll call in C#? [RESOLVED]

    How do I call a legacy 32-bit dll from C#?

    The VB6 code would look like this:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function MyFunc Lib "my.dll" _
    4.           (ByVal cmd As String) As Boolean
    5.  
    6. Private Sub Command1_Click()
    7.  
    8.   If MyFunc("abc") Then
    9.     MsgBox "Cool!"
    10.   End If
    11.  
    12. End Sub

    How should that look in C#?

    Thanks!
    Last edited by BrianHawley; Jan 10th, 2004 at 08:58 AM.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width