Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract Associated Icon to a Treeview
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00668799
Message ID:
00669320
Views:
15
>It looks like the code in message 656045 will accomplish what I am trying to do. However, it does not have the code behind the DWord function. What does that function do (so I can recreate that behavior)?
>
Troy,

In playing around with the code, I assumed (and aparently correctly) that the function returns a string representing a four byte integer to create a structure. I used my own routine for this, which is as follows:
FUNCTION IntegerToString
    
  LPARAMETERS pnInteger, pnbytes
    
  LOCAL lcresult, lnbytes, lnmask,;
    lninteger, lni, lnchar
  lcresult = ""
  IF PCOUNT() = 2
    lnbytes = pnbytes
  ELSE
    * Default to DWORD
    lnbytes = 4
  ENDIF
  lninteger = pnInteger
  lnmask = 255
  FOR lni = 1 TO lnbytes
    lnchar = BITAND(lninteger, lnmask)
    lcresult = lcresult + CHR(lnchar)
    lninteger = BITRSHIFT(lninteger, 8)
  NEXT
  RETURN lcresult
ENDFUNC
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform