Results 1 to 2 of 2

Thread: convert c++ to vb

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    convert c++ to vb

    I need to create a DLL that has the following 2 functions so I can interface my program with another program. Can anyone help me to make the code equivalent of the code below in VB?

    VB Code:
    1. 'Required dll functions
    2. int WINAPI getmove(int board[8][8], int color, double maxtime, char str[1024], int *playnow, int info, int moreinfo, struct CBmove *move);
    3. int WINAPI enginecommand(char command[256], char reply[1024]);

    where struct CBmove is defined as follows:

    VB Code:
    1. struct CBmove
    2. {
    3. int ismove;
    4. int newpiece;
    5. int oldpiece;
    6. struct coor from,to;
    7. struct coor path[12];
    8. struct coor del[12];
    9. int delpiece[12];
    10. }
    11.  
    12. struct coor
    13. {
    14. int x;
    15. int y;
    16. }

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: convert c++ to vb

    I'll have a go at the struct bit, not sure about the API...

    VB Code:
    1. type CBmove
    2. ismove as long
    3. newpiece as long
    4. oldpiece as long
    5. from as coor
    6. xTo as coor 'cant have "to" because its a reserved word
    7. path(0 to 11) as coor
    8. del(0 to 11) as coor
    9. delpiece(0 to 11) as long
    10. end type
    11.  
    12. type coor
    13. x as long
    14. y as long
    15. end type
    That's my guess anyway
    I don't live here any more.

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