CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Location
    Pearl of the orient
    Posts
    304

    Arrow Creating a Win32 dll (from VB6.0 to C++.Net)

    I am trying to make a Win32 using C++.Net. Below is my code in VB6.0.
    Code:
    Public Function PokerGetPercentage(pocket As String, board As String, opponents As Long, accuracy As Long) As String
        Dim sPocket As String
        Dim sBoard  As String
        Dim result  As String
        
        Dim Poker   As PokerHand
        Set Poker = New PokerHand
        
        sPocket = StrConv(pocket, vbUnicode)
        sBoard = StrConv(board, vbUnicode)
        
        result = Poker.GetHandStrength(sPocket, sBoard, opponents, accuracy)
        PokerGetPercentage = StrConv(result, vbFromUnicode)
    End Function
    Thus far this is what I came up with.
    Code:
    extern LPSTR PokerGetPercentage(LPSTR pocket, LPSTR board, long opponents , long accuracy )
    {
    	return "ss";
    }
    My C++ is very basic and I find it difficult to convert my VB6.0 code to C++. Could anyone help? Poker is actually a class from a C# project.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Pearl of the orient
    Posts
    304

    Re: Creating a Win32 dll (from VB6.0 to C++.Net)

    Upon more digging I've found out that I don't really need a Win32 dll to pass something to AutoIt so this case is rested although not resolved so I will not mark it as one.

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

Featured