I have a bunch of questions but will list a few. I referenced the Applebaum book and looked at examples, but some of the basics confound me. I'm trying to write VB6 code to interface with a "C/C++" DLL. In a VB6 module1.bas I have the following: Public Type STA_PROPS cbSize As Long STA_DPROP_DEVADDR As String '- Device Address 08 STA_DPROP_GATEWAY As String '- Gateway Address 10 STA_DPROP_NETMASK As String '- Network Mask 20 STA_DPROP_MASK As String 'Mask of used props 38 Which are chosen from: ' STA_DPROP_DATETIME '0x00000001 ///< Date/Time ' STA_DPROP_DEVID '0x00000002 ///< Device ID ' STA_DPROP_ALIAS '0x00000004 ///< Alias ' STA_DPROP_LOCATION '0x00000004 ///< Location ID (same as Alias - compatibility) ' STA_DPROP_DEVADDR '0x00000008 ///< Device Address ' STA_DPROP_GATEWAY '0x00000010 ///< Gateway Address ' STA_DPROP_NETMASK '0x00000020 ///< Network Mask ETC ' STA_DPROP_MASK '0x00FFFFFF ///< Mask of Used DevProp flags In my VB Form; Is the DPRPOP_MASK calculated correctly ? and would it be specified as Dim DPROP_MASK As String, or as long DPROP_MASK = &H38, or "0x00000038" or what How would I DIM the string mystring = "abcdefghij" Dim mystring As string * 10 or mystring * &HA or mystring How do I calculate the cbsize (Size of the structure) what if the structure had 2 LONG variables, and the above string, how would I calculate the size? Thanks for any help?
|