home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / FERRAMEN / API_ASST / BFVBHLPR.BAS < prev    next >
Encoding:
BASIC Source File  |  1994-05-13  |  2.9 KB  |  76 lines

  1. Option Explicit
  2.  
  3. '**********************************************************************************************
  4.  
  5. ' GET 32BIT POINTERS TO VB & USER DEFINED DATA TYPES
  6.  
  7. ' HIGHLY recommended that you use the type safe declarations when implementing routine
  8. '-------------------------------------------------------------------------------------
  9.  
  10. Declare Function bfAddress4Any& Lib "BFVBHLPR.DLL" (lpany As Any)
  11.  
  12. ' Type Safe Declares
  13.  
  14. ' Strings
  15. Declare Function bfAddress4String& Lib "BFVBHLPR.DLL" Alias "bfAddress4Any" (ByVal lpszString$)
  16.  
  17. ' Integers
  18. Declare Function bfAddress4Int& Lib "BFVBHLPR.DLL" Alias "bfAddress4Any" (ByVal lpint%)
  19.  
  20. 'Longs
  21. Declare Function bfAddress4Long& Lib "BFVBHLPR.DLL" Alias "bfAddress4Any" (ByVal lplong&)
  22.  
  23. ' Type Safe Example for use with Structures (types)
  24. ' Declare Function bfAddress4RECT& Lib "BFVBHLPR.DLL" Alias "bfAddress4Any" (ByVal rc As RECT)
  25.  
  26. '-------------------------------------------------------------------------------------
  27.  
  28. ' GET POINTER TO VB STRING
  29.  
  30. ' THIS IS THE PROPER DECLARATION:  DO NOT USE ByVal w/ THIS ROUTINE
  31. Declare Function bfAddressVBStr& Lib "BFVBHLPR.DLL" (vbStr$)
  32.  
  33. '**********************************************************************************************
  34.  
  35. ' DWORD (long) to LOWORD / HIWORD
  36.  
  37. ' THIS IS THE PROPER DECLARATION:  DO NOT USE ByVal w/ nlo, nhi
  38. Declare Sub bfDWORDto2INT Lib "BFVBHLPR.DLL" (ByVal alng&, nlo%, nhi%)
  39.  
  40. '**********************************************************************************************
  41.  
  42. ' CONVERT 2 INTEGERS TO DWORD (long)
  43. Declare Function bf2IntsToDWORD& Lib "BFVBHLPR.DLL" (ByVal nlo%, ByVal nhi%)
  44.  
  45. '**********************************************************************************************
  46.  
  47. ' DISK SPACE ROUTINES
  48.  
  49. ' NOTE:  Values returned are in KB, multiply by 1024 for bytes
  50.  
  51. ' For nDrv parameter:  Drive 0 = Current Drive, 1 = A, 2 = B, 3 = C, etc.
  52. Declare Function bfFreeSpace& Lib "BFVBHLPR.DLL" (ByVal nDrv%)
  53. Declare Function bfUsedDiskSpace& Lib "BFVBHLPR.DLL" (ByVal nDrv%)
  54. Declare Function bfTotalDiskSpace& Lib "BFVBHLPR.DLL" (ByVal nDrv%)
  55.  
  56. '**********************************************************************************************
  57.  
  58. ' VB STRING ROUTINE(s) - GET VB STRING FROM C STRING (null terminated)
  59.  
  60.  
  61. ' Obtain a VB String from a long pointer to CString (LPSTR)
  62. Declare Function bfVBStrFromLPSTR$ Lib "BFVBHLPR.DLL" (ByVal lpstr&)
  63.  
  64. ' Obtain a VB String from a null terminated string
  65. ' NOTE: DO NOT use on VB Strings w/ embedded NULLs
  66. Declare Function bfVBStrFromString$ Lib "BFVBHLPR.DLL" Alias "bfVBStrFromLPSTR" (ByVal lpstring$)
  67.  
  68. '**********************************************************************************************
  69.  
  70. ' GET INTEGER FROM POINTER
  71. Declare Function bfIntFromLPINT% Lib "BFVBHLPR.dll" (ByVal lpint&)
  72.  
  73. ' MODIFY INTEGER VALUE USING A POINTER TO THE INTEGER
  74. Declare Sub bfChangeIntValueLPINT Lib "BFVBHLPR.DLL" (ByVal lpint&, ByVal new_value%)
  75.  
  76.