Results 1 to 2 of 2

Thread: Internal conversions

  1. #1

    Thread Starter
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Internal conversions

    When visual basic goes to deal with code from other languages, there is quite a few conversions involved behind the scenes. A simple example would be string. When you pass a string, it gets converted into a c style string. Also if memory serves me right, there is some unicode-to-ascii conversions done as well. Which you end up having to use a byte array to stop that conversion from being done.

    I'm curious if there is any complier options that could be used to control some of these conversions to help visual basic programmers plug into 3rd party code. Or perhaps future plans for the ability to define a interface for a exported function. IE: the ability to detail how a function should be called, such as calling conventions, and what conversions need to take place.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

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

    Re: Internal conversions

    You can use a StringBuilder instead of a byte array. The framework marshals StringBuilders to char*s. You'll have to modify your API declaration though.

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